NodeData::CopyTo() Manual

内容表

关于

NodeData based classic plugin classes can implement NodeData::CopyTo() . This is usually only needed if internal data is not stored in the element's BaseContainer . If implemented, this function is called when Cinema 4D copies the element. Implementing this function is also needed to correctly support the undo system.

注意
NodeData::CopyTo() is implemented typically also NodeData::Read() and NodeData::Write() should be implemented.

NodeData::CopyTo() corresponds to C4DAtom::CopyTo() .

用法

NodeData::CopyTo() is called when Cinema 4D copies the element. This can happen for various reasons and multiple times.

Bool CopyTo( NodeData * dest, GeListNode * snode, GeListNode * dnode, COPYFLAGS flags, AliasTrans * trn) { ExampleGenerator* const destObject = static_cast< ExampleGenerator* > (dest); if (destObject == nullptr ) return false ;

// copy internal data if (_branchHead) { GeListHead * destBranchHead = destObject->_branchHead; _branchHead->CopyTo(destBranchHead, flags, trn); }

destObject->_value = this->_value;
return SUPER::CopyTo(dest, snode, dnode, flags, trn); }

The arguments of the function are:

The copy-flags are:

延伸阅读

AliasTrans
定义: c4d_baselist.h:2977
COPYFLAGS
COPYFLAGS
定义: ge_prepass.h:2663
NodeData
定义: c4d_nodedata.h:38
GeListNode
Represents a C4DAtom that resides in a 4D list.
定义: c4d_baselist.h:1767
Bool
maxon::Bool Bool
定义: ge_sys_math.h:53
GeListHead
定义: c4d_baselist.h:1980

Copyright  © 2014-2025 乐数软件    

工业和信息化部: 粤ICP备14079481号-1