THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/07/2011 at 12:20, xxxxxxxx wrote:
Originally posted by xxxxxxxx
maybe the code for the commando will become public? This would be nice for working with it :)
You can do the iteration by hand like this:
import c4d
from c4d import gui
def SearchOM(op) :
if not op: return
if op.GetDown() : return op.GetDown()
while not op.GetNext() and op.GetUp() :
op = op.GetUp()
return op.GetNext()
def main() :
obj = doc.GetFirstObject()
while obj:
objtype = obj.GetType()
mode = obj.GetEditorMode()
if objtype == c4d.Ostage and mode == c4d.MODE_UNDEF: #If the Stage tag has grey dots
obj.SetBit(c4d.BIT_ACTIVE) #Select it in the OM
break #We found the first one. So break out of the loop
obj = SearchOM(obj)
c4d.EventAdd()
if __name__=='__main__':
main()
The three modes for those little dots are: c4d.MODE_ON, c4d. MODE_OFF, c4d.MODE_UNDEF.
-ScottA