[Bf-scripts-dev] adding objects to a particular layer

Willian Padovani Germano wgermano at ig.com.br
Sat Feb 12 04:23:42 CET 2005


Melchior FRANZ wrote:

>I let a script generate several objects and parent them under another
>objects. Unfortunately, all the new objects are put into layer 0, not
>the layer where the parent is. How can I query/set the layer of/for an
>object?
>  
>
Check object.Layer in the link below.  It is not very friendly, a 20 bit 
bitmask where each bit set means the object is visible in the 
corresponding layer.  By default, from looking at the C file, objects 
are created at the first layer, number 1. We'd better add 
object.setLayer() and object.layer that accept lists of ints, as 
available with Window.ViewLayer().

http://www.blender.org/modules/documentation/236PythonDoc/Object.Object-class.html#Layer

-- 
Willian



More information about the Bf-scripts-dev mailing list