crowdstoolutils module

crowdstoolutils.addcollisionlayer(kwargs)

Add a collision layer to an agent.

crowdstoolutils.addobstacle(kwargs)

Add obstacle object to the crowd simulation.

crowdstoolutils.addterrain(kwargs)

Add terrain object to the crowd simulation.

crowdstoolutils.allowAgentBake()
crowdstoolutils.applyPresetForKnownAgents(node, agentname=None)

Applies presets for built-in characters such as mocapbiped1. If agentname is not specified, it will be determined by inspecting the input geometry’s attributes.

crowdstoolutils.bakeAgent(subnet, agentname, clipname, foot_object_paths=[])

Creates a ROP network containing the Agent ROP, and a geometry object containing an Agent SOP. Returns a tuple containing the ROP Network, the Agent ROP, and the Agent SOP.

crowdstoolutils.bakeAgentInteractive(kwargs)
crowdstoolutils.buildChannelMenu(node)
crowdstoolutils.buildClipMenu(node, clip_properties_input=-1)

Build a menu containing the available clip names for an agent.

crowdstoolutils.buildDopClipMenu(node)

Build a menu containing the available clip names for an agent in the processed DOP object, including those defined in the clip properties.

crowdstoolutils.buildDopStateMenu(node)

Build a menu containing the states in the crowd simulation.

crowdstoolutils.buildDopTransformGroupMenu(node)

Build a menu containing the available transform groups for an agent in the processed DOP object.

crowdstoolutils.buildLayerMenu(node)

Build a menu containing the available layer names.

crowdstoolutils.buildMenuStringList(names)

Duplicates each element in a list of strings. For example, [“walk”, “run”] becomes [“walk”, “walk”, “run”, “run”]

crowdstoolutils.buildTransformGroupMenu(node)

Build a menu containing the available transform groups.

crowdstoolutils.buildTransformMenu(node)

Build a menu containing the transform names from an agent’s rig.

crowdstoolutils.chooseStatesToCreate(source_geo, dopnet)
crowdstoolutils.computeRotationLimits(node, instance)

Determine joint limits by analyzing the agent’s animation clips.

crowdstoolutils.configurejoints(kwargs)

Add an Agent Configure Joints node and a test simulation.

crowdstoolutils.createLimitsForCollisionLayer(node)

Add an auto-computed joint limit for each non-root transform with a shape attached to it in the collision layer.

crowdstoolutils.crowdagentcam(kwargs)

Create cameras attached to the agent transforms

crowdstoolutils.crowdlookat(kwargs)

Ask user for lookat object and which state to add it to the crowd sim

crowdstoolutils.crowdpaintdensity(kwargs)

Create setup to paint density for crowdsource

crowdstoolutils.crowdpath(kwargs)

Ask user for curve object and add it as path to the crowd sim.

crowdstoolutils.crowdtargetposition(kwargs)

Add a target position steering force that agents will try to reach

crowdstoolutils.findAgent(geo, group_str='')

Finds the agent primitive from the given geometry, or returns None.

crowdstoolutils.findAgentDefinitions(geo, group_str='')

Wrapper around hou.crowds.findAgentDefinitions that does some exception handling.

crowdstoolutils.findCrowdObject(dopnode)
crowdstoolutils.findCrowdSim()
crowdstoolutils.findCrowdSolver(dopnet)
crowdstoolutils.findDopAgentDefinitions(node)

Finds the unique agent definitions in the processed DOP object.

crowdstoolutils.findInputAgent(node)

Finds the agent primitive from the node’s input geometry, or returns None.

crowdstoolutils.findInputAgentDefinitions(node)

Finds the unique agent definitions from the node’s input geometry.

crowdstoolutils.findInputTriggerName(node)
crowdstoolutils.findStates(dopnet)

Returns a list of the crowd state nodes and state names.

crowdstoolutils.populate(agent_objects, source_object, default_state='')
crowdstoolutils.populateInteractive(kwargs)
crowdstoolutils.selectJoint(node, parmtuple, exclusive=True)

Open a tree chooser to select a joint name.

crowdstoolutils.selectSOPGeometry(prompt, allow_multisel=False, allowed_types=('geo', ))

Prompts the user for a geometry object selection, and verifies that the objects are non-empty. Returns the list of selected objects (if allow_multisel is True), or the single selected object otherwise.

crowdstoolutils.selectState(dopnet, message)

Prompts the user to select one of the states in the crowd simulation (or all states). Returns the crowd state DOP, or None if all states were selected.

crowdstoolutils.simulate(source_object)

Sets up a crowd simulation for the agents in source_object. Returns the merge nodes for states and transitions.

crowdstoolutils.simulateInteractive(kwargs)

Create crowd dop sim based on user input or default setup if none

crowdstoolutils.wireNodeInState(node, state_node, crowdsolver)

Wire the given node into the state’s stream. If state_node is None, the node is wired just before the crowd solver’s state input, so it will apply to all states.