shared.scene_data

Generic module to hold, edit and query data to/from a Maya Node’s attribute.

It inherits Python’s dict class and overrides the __setitem__ and __getitem__ methods to store and retrieve data from a Maya node’s attribute.

Attributes

LOG

Classes

SceneDictionary

Dictionary-like interface for storing and retrieving data from Maya node attributes.

Module Contents

class SceneDictionary(node, attribute='sceneData')

Bases: collections.UserDict

Dictionary-like interface for storing and retrieving data from Maya node attributes.

This class inherits from UserDict and stores data as a stringified dictionary in a Maya node’s attribute. Data persists with the Maya scene.

Args:

node: Maya node name or wrapper to store data on. attribute: Name of the attribute to use for storage (default: “sceneData”).

validate_attribute()

Ensure the storage attribute exists on the node.

Creates the attribute if it doesn’t exist.

attribute = 'sceneData'
node
LOG