
Search is based on keyword.
Ex: "Procedures"
Do not search with natural language
Ex: "How do I write a new procedure?"
Q100136: Copying attributes between any scene graph locations using an OpScript
Warning: This article contains links to external websites
SUMMARY
This article describes how to use a OpScript node to copy attributes between scene graph locations.
MORE INFORMATION
When working in Katana, attributes on locations can easily be set using a SetAttribute node. However, if you would like to copy an attribute that is set on one location to another location, you can achieve this using an OpScript node and a few lines of code.
Despite the name suggesting a similar function, the AttributeCopy node can not be used for this purpose.

local attrFrom = Interface.GetOpArg("user.attrFrom"):getValue()
local attrTo = Interface.GetOpArg("user.attrTo"):getValue()
local sourceLocation = Interface.GetOpArg("user.sourceLocation"):getValue()
Interface.CopyAttr(attrTo, attrFrom, true, sourceLocation)
Interface.SetAttr(attrTo, Interface.GetGlobalAttr( attrFrom, sourceLocation))
Keywords:
OpScript, AttributeCopy, SetAttribute, copy attributes, scenegraph locations, different hierarchy, source destination, Katana
Attachments
Sorry you didn't find this helpful
Why wasn't this helpful? (check all that apply)
Thanks for your feedback.
If you can't find what you're looking for or you have a workflow question, please try Foundry Support.
If you have any thoughts on how we can improve our learning content, please email the Documentation team using the button below.
Thanks for taking time to give us feedback.