[Bf-python] Layer handling inconsistant
Campbell Barton
cbarton at metavr.com
Mon Apr 18 03:30:58 CEST 2005
At the moment Window.ViewLayer() and object.later use a different type
of variables and therefor cant be interchanged.
ob.layer is a flag and Window.ViewLayer() is a list
There realy shouldent be any issues with
/I want me new object to be on the current visible layers, or - change
my object to the visible layers.
/At the moment I have got around this by converting this list into a flag.
# Get the layer flag, this should realy be a part of blender.
layerFlag = 0
for l in Window.ViewLayer():
layerFlag |= 2 ** l-1 # Get the flag of the layer index
ob.layer = layerFlag
Mabe there needs to be a flag option for ViewLayer
Window.ViewLayer(flag=1)
Is this acceptable?
- Cam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20050418/b5b65da6/attachment.html>
More information about the Bf-python
mailing list