Hello,
I look for a way to build a list with all the objects, but only the objects in the "active" layers.
Is it possible?
Thanks for your help,
Dienben
Active Layer
Moderators: jesterKing, stiv
Yet another crappy interface, but it's possible:
Code: Select all
import Blender
layers=Blender.Window.ViewLayer()
print layers
binary=0
for layer in layers:
binary|= 1<<(layer-1)
objects=Blender.Object.Get()
ourlayerobjects=filter(lambda o: o.Layer&binary, objects)
for obj in ourlayerobjects:
print obj.name