Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here is an example of how to set a color user attribute with an OpScript:

gb = GroupBuilder()
gb:set("value", FloatAttribute({0.01.00.0}, 3))
gb:set("type", StringAttribute("color"))
Interface.SetAttr("prmanStatements.attributes.user.myColor", gb:build())


While all user attributes can be set up as a GroupAttribute, color attributes are the only type that requires it.  Int, float, and string user attributes can be set directly, with their type inferred from the Katana attribute type:

...