Cooking with Producers

Producers are objects that cook the scene graph from a particular node. There are two kinds of producers available in Katana – geometry producers and render producers – which correspond to having implicit resolvers disabled or enabled.

API Reference

Nodes3DAPI.GetGeometryProducer(node=None, graphState=None, portIndex=0)

Get the GeometryProducer from a Node3D. The new producer will be located at the root location.

Returns None in the case of an error.

Parameters:
  • node (Node) – A Node3D or Render node.
  • graphState (GraphState) – GraphState (or None, or float frame time)
Return type:

GeometryProducer

See:

GetRenderProducer

Nodes3DAPI.GetRenderProducer(node=None, graphState=None, useMaxSamples=False, portIndex=0, applyRenderSelectedMask=True)

Get the renderable GeometryProducer from a Node3D. The new producer will be located at the root location.

The renderable producer has additional operations applied that resolve necessary attributes on the producer. This includes things like texture, material, and constraint resolution.

Returns None in the case of an error.

Parameters:
  • node (Node) – A Node3D or Render node.
  • graphState (GraphState) – GraphState (or None, or float frame time)
Return type:

GeometryProducer

See:

GetGeometryProducer

class GeoAPI.GeometryProducer

Bases: object

geometry producer

__init__

x.__init__(...) initializes x; see help(type(x)) for signature

__new__(S, ...) → a new object with type S, a subtype of T
getAttribute(name) → ScenegraphAttr

Get the sampled values for the named attribute. Will return None if the requested name is not included in getAttributeNames.

getAttributeNames() → list of str

Get the names of locally defined attributes.

getCacheID() → str

Get a cache ID based on what created this producer. This cache value should be constant for producers generating the same output.

getChildByName(name) → GeometryProducer

Find a child GeometryProducer. None will be returned if no child is found. This will only match a single child item, it will not match nested children.

Parameters:namestr
getClient() → Geolib3 client

Get the client backing this producer or None.

getDelimitedGlobalAttribute(name) → ScenegraphAttr

Get the name of a global child attribute. Use dot characters to separate levels of path hierarchy. Will return None if the attribute is not found.

Parameters:namestr
getDelimitedLocalAttribute(name) → ScenegraphAttr

Get the name of a local child attribute. Use dot characters to separate levels of path hierarchy. Will return None if the attribute is not found.

Parameters:namestr
getFirstChild() → GeometryProducer

Get the first child GeometryProducer or None.

getFlattenedGlobalXform() → list of float

Returns a 16 value array representing a global (worldspace) transform matrix for the producer’s location.

getFnAttribute(name) → FnAttribute

Get the sampled values for the named attribute. Will return None if the requested name is not included in getAttributeNames.

getFullName() → str

Get the full name of this GeometryProducer from the root.

See:getName
getGlobalAttribute(name) → ScenegraphAttr

Get the name of a global child attribute.

Parameters:namestr
getName() → str

Get the name of this GeometryProducer.

See:getFullName
getNextSibling() → GeometryProducer

Get the next sibling GeometryProducer or None.

getParent() → GeometryProducer

Get the parent GeometryProducer. Returns None when this is the root producer.

getPotentialChildren()
getProducerByPath(path) → GeometryProducer

Find a child GeometryProducer. None will be returned if no child is found. This will match any number of children deep, use a slash character to separate levels of hierarchy.

Parameters:pathstr
getRootProducer() → GeometryProducer

Get the root for a GeometryProducer. This will work if the given producer is already at the root.

getType() → str

Get the type of this GeometryProducer.

iterChildren() → iter

Get an iterator for all children.