Versions Compared

Key

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

...

Find all polygon objects in a group named "Scene_Nodes" and print their names to the "Messages" panel:

 

Code Block
languagepy
# Get the group "Scene_Nodes" and its contained nodes
group = scene.getGroup("Scene_Nodes")
groupNodes = group.getNodes()
 

# Loop through every node and filter out the objects 
for entry in groupNodes:
	if (entry.getType() == TYPE_OBJECT):
 
		# If an object was found print out its name
		scene.message("Object name: " + entry.getName())