NodeData::GetDEnabling() Manual

内容表

关于

NodeData based classic plugin classes can implement NodeData::GetDEnabling() . This allows to dynamically enable and disable parameters in the Attribute Manager.

NodeData::GetDEnabling() corresponds to C4DAtom::GetEnabling() .

用法

NodeData::GetDEnabling() is called with the DescID of each parameter. The function simply returns true if the given parameter should be enabled and false if the given parameter should be disabled.

Bool GetDEnabling( GeListNode * node, const DescID & id , const GeData & t_data, DESCFLAGS_ENABLE flags, const BaseContainer * itemdesc) { if (node == nullptr ) return false ;

// check parameter ID switch ( id [0]. id ) { case EXAMPLE_GENERATOR_PARAMETER_VALUE: { // get the value of another parameter GeData data; node-> GetParameter (EXAMPLE_GENERATOR_PARAMETER_BOOL, data, DESCFLAGS_GET::NONE );

// if true, then enable the parameter // if not, disable the parameter if (data. GetBool ()) return true ; else return false ;

break ; } }
return SUPER::GetDEnabling(node, id , t_data, flags, itemdesc); }

The arguments of the function are:

延伸阅读

GeData::GetBool
Bool GetBool(void) const
定义: c4d_gedata.h:421
DescID
定义: lib_description.h:327
GeListNode
Represents a C4DAtom that resides in a 4D list.
定义: c4d_baselist.h:1767
DESCFLAGS_ENABLE
DESCFLAGS_ENABLE
定义: ge_prepass.h:3132
GeData
定义: c4d_gedata.h:82
DESCFLAGS_GET::NONE
@ NONE
None.
Bool
maxon::Bool Bool
定义: ge_sys_math.h:53
C4DAtom::GetParameter
Bool GetParameter(const DescID &id, GeData &t_data, DESCFLAGS_GET flags)
BaseContainer
定义: c4d_basecontainer.h:46

Copyright  © 2014-2025 乐数软件    

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