Control Utilities

artv2.utilities.control_utilities

author:Jeremy Ernst
description:This module provides utilities for building and setting control shapes. There is a class that builds a simple interface that presents some of these features, like capturing/saving new control shapes, as well as editing the names of control shapes.

Special thanks to Vasil Shotarov : https://bindpose.com/creating-maya-control-shape-manager/

class ControlManagerUI(parent=None)[source]

This class provides a user interface with methods to store new control shapes and edit existing control shapes.

../../../_images/ControlShapeManager.png

Functions:

Capture Control Shape()

This allows you to create a new control shape in Maya, and then capture that data and save it to a text file for recreation later.

View Saved Shape List()

Opens a list widget that shows the shapes that have been saved to disk. You can also choose to preview them.

Edit Shapes()

Opens a list widget that allows you to rename or delete the shapes.
get_all_shapes()[source]

Gets and returns all shape files.

get_knots(crv_shape=None)[source]

Gets the knots for the given curve shape.

get_shape(crv=None)[source]

Returns a dictionary containing all the necessery information for rebuilding the passed in crv.

load_all_shapes()[source]

Loads all shapes into memory into a dictionary and returns that dictionary.

load_shape(path)[source]

Loads the data that makes up the control shape from the given file.

set_shape(crv, crv_shape_list)[source]

Creates a new shape on the crv transform, using the properties in the crvShapeDict.

show_window()[source]

Shows the ControlManagerUI window.

store_shape(shape_data, name)[source]

Stores the data that makes up the control shape to a file.

validate_curve(crv=None)[source]

Checks whether the transform we are working with is actually a curve and returns it’s shapes