ScriptSpot

Forum topic · General Scripting

How to go through each node in the scene?

By xenoploid · 2009-06-21

Description

Trying to go through each node in the scene, regardless of: type, whether they are visible or not, or whether they are selected or not. I then want to look for custom attributes on each node. Seems like a simple thing, but all I can find for examples is going through the currently selected objects or Geometry of a particular type. Anyone help would be awesome. Thanks.

Brad

Comments (3)

for i in objects do ... for

Anubis · 2009-06-22

for i in objects do ...
for i in $* do ... -- same as above
-- example loop in objects with user defined key "wanted":
for i in $* where getUserProp i "wanted" do print i.name

Marco Brunetta · 2009-06-21

Check ObjectSet Values in the reference for more info.

alapsawy · 2009-06-21

for i in objects collect i