LayerData Struct Reference

#include <c4d_basedocument.h>

Detailed Description

Holds information data about a layer in a document.

See also
BaseList2D::GetLayerData() BaseList2D::SetLayerData()

Public Member Functions

 LayerData ()
 

Public Attributes

Bool solo
 
Bool view
 
Bool render
 
Bool manager
 
Bool locked
 
Bool generators
 
Bool deformers
 
Bool expressions
 
Bool animation
 
Vector color
 
Bool xref
 

Constructor & Destructor Documentation

◆ LayerData()

LayerData ( )

Default constructor.

Member Data Documentation

◆ solo

Bool solo

Solo Mode.

Note
After setting the LayerData solo mode the document's NBIT::SOLO_LAYER bit has to be cleared:
// Get the list head for the document's layers.
GeListHead* list = doc->GetLayerObjectRoot();
if (list==nullptr)
return false;
LayerObject* layer = (LayerObject*)list->GetFirst();
if (layer==nullptr)
return true;
// Get the LayerData.
const LayerData* data = layer->GetLayerData(doc, true);
LayerData newdata(*data);
// Set the solo mode to false
newdata.solo = false;
doc->StartUndo();
// Set the new layer data with the changed solo mode.
doc->AddUndo(UNDO_CHANGE, layer);
layer->SetLayerData(doc, newdata);
// Clear the Solo bit.
doc->AddUndo(UNDO_BITS, doc);
doc->EndUndo();
void EventAdd(EVENT eventflag=EVENT::NONE)
const LayerData * GetLayerData(BaseDocument *doc, Bool rawdata=false)
Bool SetLayerData(BaseDocument *doc, const LayerData &data)
Definition: c4d_baselist.h:2044
Definition: c4d_basedocument.h:253
@ CLEAR
Clear bit.
@ SOLO_LAYER
Solo layer.
PyWideStringList * list
Definition: initconfig.h:447
const char * doc
Definition: pyerrors.h:226
Definition: c4d_basedocument.h:319

◆ view

Bool view

Visible in editor view.

◆ render

Bool render

Visible in render view.

◆ manager

Bool manager

Visible in Object Manager and Timeline.

◆ locked

Bool locked

Not selectable and no modification possible, grayed out in Object Manager.

◆ generators

Bool generators

Generators on/off.

◆ deformers

Bool deformers

Deformers on/off.

◆ expressions

Bool expressions

Expressions on/off.

◆ animation

Bool animation

Animation on/off.

◆ color

Vector color

Layer color.

◆ xref

Bool xref

Import with XRef.