Getting objects from LayerObject
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/02/2011 at 18:01, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11.532
Platform:
Language(s) : C++ ;---------
Hi,I'm trying to iterate over all the layers in a document (the layers that appear in the layer manager) and print out the objects in each layer.
I can get the root LayerObject:
GeListHead *layers = doc->GetLayerObjectRoot(); [CODE] and use that to iterate over the layers. But for each LayerObject, how would I access the objects in the LayerObject? I can get the BaseContainer from BaseList2D, but I'm not sure how to access the layer objects from the BaseContainer, if that's where they're stored. Any advice? Thanks!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/02/2011 at 02:52, xxxxxxxx wrote:
From what I see it works the other way around. You iterate through all objects/materials/tags etc. and check to which LayerObject they belong with BaseList2D::GetLayerObject().
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/02/2011 at 10:33, xxxxxxxx wrote:
Yeah, I was afraid of that.
If I open the Layer Browser, select a layer, then select one of the icons (such as the "Visible" icon), the action is applied to every object in that layer.
How does the Layer Browser know which objects are in the layer? Does it calculate that on the fly by iterating over all the objects and checking if the LayerObject matches itself? Or does it store the objects in some container that is not accessable via the API?
Thanks!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/02/2011 at 11:45, xxxxxxxx wrote:
Howdy,
If I'm understanding it correctly, I think the Layer Browser simply holds a LayerData structure for each layer:
struct LayerData
{
public:
Boolsolo
[URL-REMOVED];
Boolview
[URL-REMOVED];
Boolrender
[URL-REMOVED];
Boolmanager
[URL-REMOVED];
Boollocked
[URL-REMOVED];
Boolgenerators
[URL-REMOVED];
Booldeformers
[URL-REMOVED];
Boolexpressions
[URL-REMOVED];
Boolanimation
[URL-REMOVED];
Vector
[URL-REMOVED]color
[URL-REMOVED];
};... then you access the LayerData structure from BaseList2D::GetLayerData() through each BaseList2D node.
Each individual manager accesses the LayerData through each BaseList2D node to see how it should process the node.
So, if my understanding of it is correct, the Layer Browser actually would do nothing more than store layer settings.
Adios,
Cactus Dan
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/02/2011 at 02:53, xxxxxxxx wrote:
As Dan said the Layer Browser doesn't know about the objects for each layer. It just stores the LayerData for each layer.
cheers,
Matthias