[Bf-python] Layer setting problem
Campbell Barton
cbarton at metavr.com
Wed Nov 15 18:09:45 CET 2006
At the moment ob1.Layers = ob2.Layers can raise an error if ob1 is in
localView
the simple solution is to mask off the last 8 bits when getting the
layers, but this means a script running in Local view cant creat a new
oject in that local view.
Would an acceptable solution be to allow local view bits to be set by doing
ob.Layer = layer & (G.vd->lay & 1<<21-1)
The bad thing about this is that it assumes that the object is in the
current scene. it could be bad for objects in other scenes however the
worst thing is local bits will be set.
More information about the Bf-python
mailing list