LayerData Struct Reference

#include <c4d_basedocument.h>

详细描述

Holds information data about a layer in a document.

另请参阅
BaseList2D::GetLayerData() BaseList2D::SetLayerData()

公共成员函数

  LayerData ()

Public Attributes

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

构造函数 & 析构函数文档编制

◆  LayerData()

LayerData ( )

Default constructor.

Member Data Documentation

◆  solo

Bool solo

Solo Mode.

注意
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-> ChangeNBit ( NBIT::SOLO_LAYER , NBITCONTROL::CLEAR ); doc-> EndUndo (); EventAdd ();

◆  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

向量 color

Layer color.

◆  xref

Bool xref

Import with XRef.

LayerObject
定义: c4d_basedocument.h:245
GeListNode::ChangeNBit
Bool ChangeNBit(NBIT bit, NBITCONTROL bitmode)
BaseList2D::SetLayerData
Bool SetLayerData(BaseDocument *doc, const LayerData &data)
GeListHead::GetFirst
GeListNode * GetFirst()
定义: c4d_baselist.h:2037
BaseDocument::AddUndo
Bool AddUndo(UNDOTYPE type, void *data, Bool allowFromThread=false)
BaseDocument::GetLayerObjectRoot
GeListHead * GetLayerObjectRoot(void)
LayerData
定义: c4d_basedocument.h:311
BaseDocument::StartUndo
Bool StartUndo(void)
BaseDocument::EndUndo
Bool EndUndo(void)
EventAdd
void EventAdd(EVENT eventflag=EVENT::NONE)
NBIT::SOLO_LAYER
@ SOLO_LAYER
Solo layer.
GeListHead
定义: c4d_baselist.h:1980
NBITCONTROL::CLEAR
@ CLEAR
Clear bit.
BaseList2D::GetLayerData
const LayerData * GetLayerData(BaseDocument *doc, Bool rawdata=false)