Open Search
    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();
    @ SOLO_LAYER
    Solo layer.
    PyWideStringList * list
    Definition: initconfig.h:447
    void EventAdd(EVENT eventflag=EVENT::NONE)
    const char * doc
    Definition: pyerrors.h:226
    LayerData()
    Default constructor.
    Definition: c4d_basedocument.h:390

    ◆ 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.