Creating agent groups

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")

module_name = ag.add_module("addMetadata")
ag.set_metadata_value(module_name, "active", AtomsCore.BoolMetadata.staticTypeStr(), True)
ag.set_metadata_value(module_name, "name", AtomsCore.StringMetadata.staticTypeStr(), "test")
ag.set_metadata_value(module_name, "type", AtomsCore.IntMetadata.staticTypeStr(), 1)
ag.set_metadata_value(module_name, "intValue", AtomsCore.IntMetadata.staticTypeStr(), 10)


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")

module_name = ag.add_module("addMetadata")
ag.set_metadata_value(module_name, "active", AtomsCore.BoolMetadata.staticTypeStr(), True)
ag.set_metadata_value(module_name, "name", AtomsCore.StringMetadata.staticTypeStr(), "test")
ag.set_metadata_value(module_name, "type", AtomsCore.IntMetadata.staticTypeStr(), 1)
ag.set_metadata_value(module_name, "intValue", AtomsCore.IntMetadata.staticTypeStr(), 10)

Copyright © 2017, Toolchefs LTD.