Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
Maya
from AtomsMaya.utils import agentgroup
from AtomsMaya.hostbridge.atomsgroup import MayaAtomsGroupHostBridge
cmds.tcAtoms(init=True)
agent_group = agentgroup.create_agent_group()
ag = MayaAtomsGroupHostBridge()
ag.set_app_obj(agent_group)
ag.add_module("gridLayout")
ag.add_module("stateMachine")
atoms_ag = ag.get_agent_group()
bm = atoms_ag.behaviourModule("stateMachine")
attributes = bm.attributes()
for k in sorted(attributes.getKeys()):
if k.endswith("_override"):
continue
attribute = attributes[k]
print(ag.get_metadata_value("stateMachine", k, attribute.typeStr()))
ag.set_metadata_value("stateMachine", "state", attributes["state"].typeStr(), 1)
Houdini
from AtomsHoudini.utils import scenesetup
from AtomsHoudini.hostbridge.atomsgroup import HoudiniAtomsGroupHostBridge
scenesetup.initialize_atoms_scene()
agent_group = scenesetup.create_agent_group_node()
ag = HoudiniAtomsGroupHostBridge()
ag.set_app_obj(agent_group)
ag.add_module("gridLayout")
ag.add_module("stateMachine")
atoms_ag = ag.get_agent_group()
bm = atoms_ag.behaviourModule("stateMachine")
attributes = bm.attributes()
for k in sorted(attributes.getKeys()):
if k.endswith("_override"):
continue
attribute = attributes[k]
print(ag.get_metadata_value("stateMachine", k, attribute.typeStr()))
ag.set_metadata_value("stateMachine", "state", attributes["state"].typeStr(), 1)