[Bf-funboard] Presentation vs Implementation

Ton Roosendaal bf-funboard@blender.org
Fri, 5 Dec 2003 13:44:16 +0100


Hi,

> I only talked about objects being "in" a layer because this is what
> it looks like to the user. In most cases I will talk about how
> something appears to be to the user, not how it is in implementation.

That's good, but for this specific situation I tried to explain  
implementation level as well. Sometimes functionality completely  
derives from implementation, which is certainly the case with the  
current layer system.

> What I understand from your first explanation is, that there are
> no layer datasets in which lists of objects that appear to be a
> layer's content would be stored.
> Instead every single object has a 32 bit value. One could guess
> that means obkects "know" "in" what "layers" they are.
> But if I understand you right, the layer buttons/shortcuts are
> used to change a global value, some kind of mask. The visibility
> of objects is determined by comparing their visibilty value
> with the mask. Have I got it?

Sorta! :-) There's no "global value" however. This mask value - as you  
call it - is a property of each Blender 3D window and each Blender  
Scene as well. By comparing the masks, defined is which objects are  
visible.
For this the Lock icon button next to the layerbuttons in 3D windows  
exist. By default the button is pressed, meaning that Scene layers are  
visualized here. By unlocking the layer buttons you can use the local  
layers of the 3D window itself, thus effectively creating temporal  
'working' layers.

Now we get into confusement... because what actually happens when you  
render? Officially only the Scene layers were supposed to render, but  
in some situations it was nice to allow the 3D Window layers to be  
rendered as well. In Blender's past I've been struggling with this a  
couple of times, and couldn't find the right logical method to define  
this.

A recent example: Someone provided a bug report, that that Blender  
didn't render the 'Local view' anymore, which was standard in older  
Blenders. I've fixed that in 2.30... (Important note: the 'Local view'  
feature is just a layer value... for this the layers 24-31 are  
reserved, which cannot be accessed by buttons.)
This fix means that when you press F12, it always renders the layers as  
set by the active (or only visible) 3D window. By using the 'lock'  
button it is for users possible to control whether the Scene layers are  
rendered, or the 3D Window layers. It's still quite confusing though...  
like what Peter "Ph" proposed; adding the 20 layer buttons to the F10  
menu would help visualizing this. But then still it is unclear which  
layers are actually used when you press the Render button there.

The current implementation of layers in Blender is far from perfect,  
but the complexity of the topic makes it hard to tackle. I don't have  
simple answers for this topic either. That's why my remark that the  
*real* topic here is not about layers in Blender, but about adding  
(new) methods to allow grouping and organizing Objects.

-Ton-

------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton@blender.org  
http://www.blender.org