Versions Compared

Key

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

...

Add this script to a "Batch Script" editor (F10) and execute it with Script > Run.

The script loos looks for daemons in the scene and groups them under a new "Daemon_Group" node:

Code Block
languagepy
daemons = scene.getDaemons()
group   = scene.addGroup()
 
group.setName("Daemon_Group")
 
for entry in daemons:
	group.add(entry.getName())

Hiding and Showing Nodes

Add this script to a "Batch Script" editor (F10) and execute it with Script > Run.

The script changes a node selection's visibility to hidden:

Code Block
languagepy
nodeSelection = scene.getSelectedNodes()

for entry in nodeSelection:
	entry.setParameter("Visible", False) # make the nodes visible again with ("Visible", True)

 

Simulation States

Add this script to a "Batch Script" editor (F10) and execute it with Script > Run.

The script sets the nodes from the "Rigid_Bodies" group to inactive:

Code Block
languagepy
group = scene.getGroup("Rigid_Bodies")
groupNodes = group.getNodes()
 
for entry in groupNodes:
	entry.setParameter("Simulation", "Inactive")