Graph View

详细描述

Groups

  DRAGTYPE_GVNODE
  DataTypes
  GRAPHVIEW_PRIORITY
  GVNodeIDs
  GV_CONSTANT
  GV_GROUP
  GV_INITIAL
  GV_MESSAGE_FIRST_DATA_ID
  GV_PORTS
  GV_PREFERENCES_ID
  GV_VERSION
  Graph View Internal
  GvAnimHookType
  GvBodyDefaultSize
  GvCalcFlags
  GvCalcHookType
  GvCalcState
  GvConnMode
  GvDataType
  GvDrawState
  GvFileIdent
  GvGuiConfigIDs
  GvInsertMode
  GvLayoutType
  GvMasterConfigIDs
  GvMessage
  GvOpSetDataMode
  GvOperatorDescriptionFlags
  GvOperatorFlags
  GvOperatorType
  GvPortDescFlags
  GvPortFlags
  GvPortID
  GvPortIO
  GvRunId
  GvState
  GvWorldConfigIDs
  ID_GV_DATA_TYPE
  ID_GV_OPERATOR
  ID_GV_OPGROUP_TYPE
  ID_GV_OWNER
  ID_GV_VALUE_TYPE
  ID_OPERATOR
  ID_PLUGIN
  ID_PREFS
  VERSION_OPERATOR

Classes

struct   GvPortListEntry
class   GvPortList
class   GvCalcTime
class   GvCalc
class   GvInit
class   GvValue
class   GvQuery
class   GvRun
class   GvCalcTable
class   GvNode
class   GvPort
class   GvNodeMaster
class   GvNodeGUI
class   GvWorld
struct   GV_OPCLASS_HANDLER
struct   GV_OPGROUP_HANDLER
struct   GV_VALUE_HANDLER
struct   GV_VALGROUP_HANDLER
struct   GV_DATA_HANDLER
struct   GvDestination
struct   GvPortDescription
struct   GvPortInfo
struct   GvPortDescInfo
struct   GvPortsDescInfo
struct   GvPortsInfo
struct   GvValuesInfo
struct   GvDynamicData
struct   GvOperatorDescription
struct   GvDropHook
struct   GvCalcHook
struct   GvMenuHook
struct   GvMessHook
struct   GvAnimHook
struct   GvDrawHook
struct   GvHook
class   GvOperatorData

Macros

#define  GV_NODEMASTER_RELEASE
#define  ID_GV_VALGROUP_TYPE_GENERAL
#define  ID_GV_OPCLASS_TYPE_GENERAL
#define  CUSTOMGUI_NORMAL
#define  GV_OPERATOR_PORTS_ID
#define  GV_OPERATOR_DATA_ID
#define  GV_NODE_INVALID_INDEX
#define  GV_PORT_INVALID_ID
#define  GV_PORT_INVALID_INDEX
#define  GV_PORT_INVALID_SUB_ID
#define  GV_USERDATA_INVALID_ID
#define  GV_OPERATOR_INVALID_ID
#define  GV_PORT_INVALID_DESC
#define  GV_RESOURCE_SYMBOL_MAX_LENGTH
#define  GV_DATAHANDLER_FLAGS_DISCLEVEL
#define  GV_OPERATORFLAGS_MASK
#define  GV_MULTIPLE_PORTS

Typedefs

typedef NodeData DataAllocator (void)
typedef Bool (*  GvDropHookFunc ) ( GvDropHook &hook)
typedef Bool (*  GvCalcHookFunc ) ( GvCalcHook &hook)
typedef Bool (*  GvMenuHookFunc ) ( GvMenuHook &hook)
typedef Bool (*  GvMessHookFunc ) ( GvMessHook &hook)
typedef Bool (*  GvAnimHookFunc ) ( GvAnimHook &hook)
typedef void(*  GvDrawHookFunc ) ( GvDrawHook &hook)
typedef BaseList2D *(*  GvHookCallback ) ( BaseDocument *doc, Int32 id)
typedef Int32   GvValueType
typedef Int32 GvIdTablePtr

函数

GvWorld GvGetWorld (void)
const String   GvGetEmptyString (void)
const String   GvGetErrorString (const maxon::String &command, Int32 err)
void  GvGetPortList ( GvPortsDescInfo *info, GvPortIO port, GvPortList &portlist)
Bool   GvGetPortDescription ( GvPortsDescInfo *info, GvPortIO port, Int32 id, GvPortDescription *pd)
Bool   GvGetAllDataTypes ( GvPortDescInfo *info, UInt32 default_flag, Int32 first_id)
void  GvFreePortDescInfo ( GvPortDescInfo *info)
Bool   GvRegisterOpClassType ( GV_OPCLASS_HANDLER *data, Int32 struct_size)
Bool   GvRegisterOpGroupType ( GV_OPGROUP_HANDLER *data, Int32 struct_size)
Bool   GvRegisterValueType ( GV_VALUE_HANDLER *data, Int32 struct_size)
Bool   GvRegisterDataType ( GV_DATA_HANDLER *data, Int32 struct_size, const char *symbol=nullptr)
Bool   GvRegisterValGroupType ( GV_VALGROUP_HANDLER *data, Int32 struct_size)
GV_OPCLASS_HANDLER GvFindRegisteredOpClass ( GvOpClassID id)
GV_OPGROUP_HANDLER GvFindRegisteredOpGroup ( GvOpGroupID id)
const String   GvGetOperatorDetailedText ( GvOperatorData *op, GvNode *bn)
const String   GvGetOperatorTitle ( GvNode *bn, Int32 string_id)
void  GvFreeValuesTable ( GvNode *bn, maxon::BaseArray < GvValue * > &ports)
void  GvFreeValuesTable ( GvNode *bn, GvValuesInfo &info)
Bool   GvBuildInValuesTable ( GvNode *bn, maxon::BaseArray < GvValue * > &ports, GvCalc *c, GvRun *r, Int32 *ids)
Bool   GvBuildOutPortsTable ( GvNode *bn, maxon::BaseArray < GvPort * > &ports)
Bool   GvBuildValuesTable ( GvNode *bn, maxon::BaseArray < GvPort * > &in_ports, maxon::BaseArray < GvPort * > &out_ports)
Bool   GvCalculateInValuesTable ( GvNode *bn, GvRun *run, GvCalc *calc, GvValuesInfo &info, Int32 singleport=(( GvValueType )(-1)), BaseTime *time=nullptr)
Bool   GvBuildInValuesTable ( GvNode *bn, GvValuesInfo &info, GvCalc *c, GvRun *r, GvIdTablePtr ids)
Bool   GvBuildOutValuesTable ( GvNode *bn, GvValuesInfo &info)
Bool   GvBuildValuesTable ( GvNode *bn, GvValuesInfo &info, GvCalc *c, GvRun *r, GvIdTablePtr input_ids)
GvDataInfo GvGetDataInfo ( GvNode *bn, Int32 id)
Bool   GvCheckDataInfo ( GvNode *bn, Int32 id)
Bool   GvAllocDynamicData ( GvNode *bn, GvDynamicData &data, GvCalc *c, Int32 id)
void  GvFreeDynamicData ( GvDynamicData &data)
void  GvClearDynamicData ( GvDynamicData &data, GvRun *r)
void  GvClearDynamicData ( GvDynamicData &data)
Bool   GvAllocDynamicDataClear ( GvNode *bn, GvDynamicData &data, GvCalc *c, Int32 id)
Bool   GvAllocDynamicData ( GvNode *bn, GvDynamicData &data, GvDataInfo *info)
Bool   GvSetDataInContainer (const void *const data, GvValueID value_id, BaseContainer &bc, Int32 container_id, Int32 cpu_id=0)
GvNode GetNode ( GeListNode *bn)
Bool   GvRegisterOperatorPlugin ( GvOperatorID id, const maxon::String &str, Int32 info, DataAllocator *at, const maxon::String &description, Int32 disklevel, GvOpClassID op_class, GvOpGroupID op_group, Int32 op_owner, BaseBitmap *icon)

Macro Definition Documentation

◆  GV_NODEMASTER_RELEASE

#define GV_NODEMASTER_RELEASE

◆  ID_GV_VALGROUP_TYPE_GENERAL

#define ID_GV_VALGROUP_TYPE_GENERAL

General value group.

◆  ID_GV_OPCLASS_TYPE_GENERAL

#define ID_GV_OPCLASS_TYPE_GENERAL

General operator class.

◆  CUSTOMGUI_NORMAL

#define CUSTOMGUI_NORMAL

Normal custom GUI.

◆  GV_OPERATOR_PORTS_ID

#define GV_OPERATOR_PORTS_ID

◆  GV_OPERATOR_DATA_ID

#define GV_OPERATOR_DATA_ID

◆  GV_NODE_INVALID_INDEX

#define GV_NODE_INVALID_INDEX

◆  GV_PORT_INVALID_ID

#define GV_PORT_INVALID_ID

◆  GV_PORT_INVALID_INDEX

#define GV_PORT_INVALID_INDEX

◆  GV_PORT_INVALID_SUB_ID

#define GV_PORT_INVALID_SUB_ID

◆  GV_USERDATA_INVALID_ID

#define GV_USERDATA_INVALID_ID

◆  GV_OPERATOR_INVALID_ID

#define GV_OPERATOR_INVALID_ID

◆  GV_PORT_INVALID_DESC

#define GV_PORT_INVALID_DESC

◆  GV_RESOURCE_SYMBOL_MAX_LENGTH

#define GV_RESOURCE_SYMBOL_MAX_LENGTH

Resource symbol maximum length.

◆  GV_DATAHANDLER_FLAGS_DISCLEVEL

#define GV_DATAHANDLER_FLAGS_DISCLEVEL

GV_DATA_HANDLER has a GV_DATA_HANDLER::disclevel .

◆  GV_OPERATORFLAGS_MASK

#define GV_OPERATORFLAGS_MASK

Mask for GvOperatorFlags .

◆  GV_MULTIPLE_PORTS

#define GV_MULTIPLE_PORTS

All ports.

Typedef Documentation

◆  DataAllocator

typedef NodeData * DataAllocator(void)

◆  GvDropHookFunc

typedef Bool (* GvDropHookFunc) ( GvDropHook &hook)

Drop hook function pointer.

参数
[in] hook The hook data.
返回
true if successful, otherwise false .

◆  GvCalcHookFunc

typedef Bool (* GvCalcHookFunc) ( GvCalcHook &hook)

Calculation hook function pointer.

参数
[in] hook The hook data.
返回
true if successful, otherwise false .

◆  GvMenuHookFunc

typedef Bool (* GvMenuHookFunc) ( GvMenuHook &hook)

Menu hook function pointer.

参数
[in] hook The hook data.
返回
true if successful, otherwise false .

◆  GvMessHookFunc

typedef Bool (* GvMessHookFunc) ( GvMessHook &hook)

Message hook function pointer.

参数
[in] hook The hook data.
返回
true if successful, otherwise false .

◆  GvAnimHookFunc

typedef Bool (* GvAnimHookFunc) ( GvAnimHook &hook)

Animation hook function pointer.

参数
[in] hook The hook data.
返回
true if successful, otherwise false .

◆  GvDrawHookFunc

typedef void(* GvDrawHookFunc) ( GvDrawHook &hook)

Draw hook function pointer.

参数
[in] hook The hook data.
返回
true if successful, otherwise false .

◆  GvHookCallback

typedef BaseList2D *(* GvHookCallback) ( BaseDocument *doc, Int32 id)

Hook callback function pointer.

参数
[in] doc Document.
[in] id Hook ID.
返回
The scene hook.

◆  GvValueType

typedef Int32 GvValueType

◆  GvIdTablePtr

typedef Int32 * GvIdTablePtr

Function Documentation

◆  GvGetWorld()

GvWorld * GvGetWorld ( void  )

Retrieves the GV world.

返回
The GV world. Cinema 4D owns the pointed GV world.

◆  GvGetEmptyString()

const String GvGetEmptyString ( void  )

Gets an empty string, just like String() would do.

返回
An empty string.

◆  GvGetErrorString()

const String GvGetErrorString ( const maxon::String 命令 ,
Int32   err  
)

Returns an error string for display in for example the status bar. The format is currently Status: <command> error! ,其中 error is determined by err .

参数
[in] 命令 The command string.
[in] err The error ID. Either a GvError value, in which case an appropriate error string is loaded, or another number that is passed through String::IntToString() .
返回
The error string.

◆  GvGetPortList()

void GvGetPortList ( GvPortsDescInfo info ,
GvPortIO   port ,
GvPortList portlist  
)

Gets the port list from the information in info.

参数
[in] info The port description. The caller owns the pointed port description.
[in] port The port IO mode: GvPortIO
[out] portlist Entries are added to this list.

◆  GvGetPortDescription()

Bool GvGetPortDescription ( GvPortsDescInfo info ,
GvPortIO   port ,
Int32   id ,
GvPortDescription pd  
)

Fills pd with information from info for the specified port.

参数
[in] info The port description. The caller owns the pointed port description.
[in] port The port IO mode: GvPortIO
[in] id The port ID.
[out] pd Filled with the port information about port id from info .
返回
true if succesful, otherwise false .

◆  GvGetAllDataTypes()

Bool GvGetAllDataTypes ( GvPortDescInfo info ,
UInt32   default_flag ,
Int32   first_id  
)

Fills info with data type information. Free the structure with GvFreePortDescInfo() .

参数
[in] info The port description to fill. The caller owns the pointed port description.
[in] default_flag The default flag for the GvPortDescInfo::flags array.
[in] first_id The first ID for the GvPortDescInfo::ids array. All data type IDs are offset by this amount.
返回
true if successful, otherwise false .

◆  GvFreePortDescInfo()

void GvFreePortDescInfo ( GvPortDescInfo info )

Frees port description structures allocated with GvGetAllDataTypes() .

参数
[out] info The port description to free.

◆  GvRegisterOpClassType()

Bool GvRegisterOpClassType ( GV_OPCLASS_HANDLER data ,
Int32   struct_size  
)

Registers an operator class. See GV_OPCLASS_HANDLER 了解更多信息。

参数
[in] data The handler structure. The caller owns the pointed structure.
Make sure that the passed structure has a long enough life time. The easiest way is to use a static or global variable.
[in] struct_size The size of the structure passed to data , i.e. sizeof (* data ).
返回
true if successful, otherwise false .

◆  GvRegisterOpGroupType()

Bool GvRegisterOpGroupType ( GV_OPGROUP_HANDLER data ,
Int32   struct_size  
)

Registers an operator group. See GV_OPGROUP_HANDLER 了解更多信息。

参数
[in] data The handler structure. The caller owns the pointed structure.
Make sure that the passed structure has a long enough life time. The easiest way is to use a static or global variable.
[in] struct_size The size of the structure passed to data , i.e. sizeof (* data ).
返回
true if successful, otherwise false .

◆  GvRegisterValueType()

Bool GvRegisterValueType ( GV_VALUE_HANDLER data ,
Int32   struct_size  
)

Registers a value type. See GV_VALUE_HANDLER 了解更多信息。

参数
[in] data The handler structure. The caller owns the pointed structure.
Make sure that the passed structure has a long enough life time. The easiest way is to use a static or global variable.
[in] struct_size The size of the structure passed to data , i.e. sizeof (* data ).
返回
true if successful, otherwise false .

◆  GvRegisterDataType()

Bool GvRegisterDataType ( GV_DATA_HANDLER data ,
Int32   struct_size ,
const char *  symbol = nullptr  
)

Registers a data type. See GV_DATA_HANDLER 了解更多信息。

参数
[in] data The handler structure. The caller owns the pointed structure.
Make sure that the passed structure has a long enough life time. The easiest way is to use a static or global variable.
[in] struct_size The size of the structure passed to data , i.e. sizeof (* data ).
[in] symbol The data type symbol. The caller owns the pointed character buffer.
返回
true if successful, otherwise false .

◆  GvRegisterValGroupType()

Bool GvRegisterValGroupType ( GV_VALGROUP_HANDLER data ,
Int32   struct_size  
)

Registers a value group type. See GV_VALGROUP_HANDLER 了解更多信息。

参数
[in] data The handler structure. The caller owns the pointed structure.
Make sure that the passed structure has a long enough life time. The easiest way is to use a static or global variable.
[in] struct_size The size of the structure passed to data , i.e. sizeof (* data ).
返回
true if successful, otherwise false .

◆  GvFindRegisteredOpClass()

GV_OPCLASS_HANDLER * GvFindRegisteredOpClass ( GvOpClassID   id )

Finds a registered operator class by ID.

参数
[in] id The operator class ID to find.
返回
The found class handler, or nullptr . Cinema 4D owns the pointed class handler.

◆  GvFindRegisteredOpGroup()

GV_OPGROUP_HANDLER * GvFindRegisteredOpGroup ( GvOpGroupID   id )

Finds a registered operator group by ID.

参数
[in] id The operator group ID to find.
返回
The found group handler, or nullptr . Cinema 4D owns the pointed group handler.

◆  GvGetOperatorDetailedText()

const String GvGetOperatorDetailedText ( GvOperatorData op ,
GvNode bn  
)

Gets the detailed text for an operator, containing bn -> GetTitle() and op -> GetText() .

参数
[in] op The operator to get the text for. The caller owns the pointed GvOperatorData .
[in] bn The node to get the title for. The caller owns the pointed GvNode .
返回
The operator detailed text.

◆  GvGetOperatorTitle()

const String GvGetOperatorTitle ( GvNode bn ,
Int32   string_id  
)

Gets the title for an operator, containing either bn -> GetTitle() or GeLoadString(string_id) if the title is empty.

参数
[in] bn The node to get the title for. The caller owns the pointed GvNode .
[in] string_id The string ID to load if the title is empty.
返回
The operator title.

◆  GvFreeValuesTable() [1/2]

void GvFreeValuesTable ( GvNode bn ,
maxon::BaseArray < GvValue * > &  ports  
)

Frees value tables allocated with the direct versions of the GvBuildValuesTable() 函数。

参数
[in] bn The node. The caller owns the pointed GvNode .
[out] ports TODO: (Sdkteam) describe

◆  GvFreeValuesTable() [2/2]

void GvFreeValuesTable ( GvNode bn ,
GvValuesInfo info  
)

Frees value tables allocated with the GvValuesInfo versions of the GvBuildValuesTable() 函数。

参数
[in] bn The node. The caller owns the pointed GvNode .
[out] info The values info structure to free. The freed pointers are set to nullptr .

◆  GvBuildInValuesTable() [1/2]

Bool GvBuildInValuesTable ( GvNode bn ,
maxon::BaseArray < GvValue * > &  ports ,
GvCalc c ,
GvRun r ,
Int32 ids  
)

Builds an input values table for bn for the specified ids .
使用 GvCalculateInValuesTable() to calculate the values, and then get the values from ports .
Free the values table with GvFreeValuesTable() .

参数
[in] bn The node. The caller owns the pointed GvNode .
[in] ports TODO: (Sdkteam) describe
[in] c The current calculation helper. The caller owns the pointed calculation helper.
[in] r The current run helper. The caller owns the pointed run helper.
[in] ids A zero terminated array of port IDs or one of these constants: GV_PORTS
返回
true if successful, otherwise false .

◆  GvBuildOutPortsTable()

Bool GvBuildOutPortsTable ( GvNode bn ,
maxon::BaseArray < GvPort * > &  ports  
)

Builds an output values table for bn . Then set the values in ports. Free the values table with GvFreeValuesTable() .

参数
[in] bn The node. The caller owns the pointed GvNode .
[out] ports TODO: (Sdkteam) describe
返回
true if successful, otherwise false .

◆  GvBuildValuesTable() [1/2]

Bool GvBuildValuesTable ( GvNode bn ,
maxon::BaseArray < GvPort * > &  in_ports ,
maxon::BaseArray < GvPort * > &  out_ports  
)

A combination of GvBuildInValuesTable() and GvBuildOutPortsTable() .

参数
[in] bn The node. The caller owns the pointed GvNode .
[out] in_ports TODO: (Sdkteam) describe
[out] out_ports TODO: (Sdkteam) describe
返回
true if successful, otherwise false .

◆  GvCalculateInValuesTable()

Bool GvCalculateInValuesTable ( GvNode bn ,
GvRun run ,
GvCalc calc ,
GvValuesInfo info ,
Int32   singleport = ((GvValueType)(-1)) ,
BaseTime time = nullptr  
)

Calls GvValue::Calculate() for all input ports in info .

参数
[in] bn The node. The caller owns the pointed GvNode .
[in] run The current run helper. The caller owns the pointed run helper.
[in] calc The current calculation helper. The caller owns the pointed calculation helper.
[out] info The values information structure with the value tables to calculate.
[in] singleport The port index. GV_MULTIPLE_PORTS (default) calculates all ports.
[in] time If not nullptr animation tracks of the node at time are evaluated before the calculation.
返回
true if successful, otherwise false .

◆  GvBuildInValuesTable() [2/2]

Bool GvBuildInValuesTable ( GvNode bn ,
GvValuesInfo info ,
GvCalc c ,
GvRun r ,
GvIdTablePtr   ids  
)

◆  GvBuildOutValuesTable()

Bool GvBuildOutValuesTable ( GvNode bn ,
GvValuesInfo info  
)

◆  GvBuildValuesTable() [2/2]

Bool GvBuildValuesTable ( GvNode bn ,
GvValuesInfo info ,
GvCalc c ,
GvRun r ,
GvIdTablePtr   input_ids  
)

◆  GvGetDataInfo()

GvDataInfo * GvGetDataInfo ( GvNode bn ,
Int32   id  
)

Gets data info for an element in the operator container of bn .

参数
[in] bn The node. The caller owns the pointed GvNode .
[in] id The container ID.
返回
The data type information. The GV world owns the pointed GvDataInfo .

◆  GvCheckDataInfo()

Bool GvCheckDataInfo ( GvNode bn ,
Int32   id  
)

Checks if there is a data info available for an element in the operator container of bn .

参数
[in] bn The node. The caller owns the pointed GvNode .
[in] id The container ID.
返回
true if there is a data info, otherwise false .

◆  GvAllocDynamicData() [1/2]

Bool GvAllocDynamicData ( GvNode bn ,
GvDynamicData data ,
GvCalc c ,
Int32   id  
)

Allocates a dynamic data structure suitable for an element in the operator container of bn .
Free the allocated data with GvFreeDynamicData() .

参数
[in] bn The node. The caller owns the pointed GvNode .
[out] data The dynamic data to allocate.
[in] c The current calculation helper. The caller owns the pointed calculation helper.
[in] id The container ID.
返回
true if successful, otherwise false .

◆  GvFreeDynamicData()

void GvFreeDynamicData ( GvDynamicData data )

Frees the dynamic data in data .

参数
[in,out] data The dynamic data to free. The associated pointers are set to nullptr .

◆  GvClearDynamicData() [1/2]

void GvClearDynamicData ( GvDynamicData data ,
GvRun r  
)

Clears the dynamic data in data , i.e. performs a GV_CALC_CLR calculation. This version of the function clears the data for the CPU specified by r -> GetCpuID() .

参数
[in,out] data The dynamic data to clear.
[in] r The current run helper. The caller owns the pointed run helper.

◆  GvClearDynamicData() [2/2]

void GvClearDynamicData ( GvDynamicData data )

Clears the dynamic data in data , i.e. performs a GV_CALC_CLR calculation. This version of the function clears the data for all CPUs.

参数
[in,out] data The dynamic data to clear.

◆  GvAllocDynamicDataClear()

Bool GvAllocDynamicDataClear ( GvNode bn ,
GvDynamicData data ,
GvCalc c ,
Int32   id  
)

A combination of GvAllocDynamicData() and GvClearDynamicData() .

参数
[in] bn The node. The caller owns the pointed GvNode .
[out] data The dynamic data to allocate and clear.
[in] c The current calculation helper. The caller owns the pointed calculation helper.
[in] id The container ID.
返回
true if successful, otherwise false .

◆  GvAllocDynamicData() [2/2]

Bool GvAllocDynamicData ( GvNode bn ,
GvDynamicData data ,
GvDataInfo info  
)

Allocates a dynamic data structure suitable for for the data type described in info . Free the allocated data with GvFreeDynamicData() .

参数
[in] bn The node. The caller owns the pointed GvNode .
[out] data The dynamic data to allocate.
[in] info Data type specification.
返回
true if successful, otherwise false .

◆  GvSetDataInContainer()

Bool GvSetDataInContainer ( const void *const  data ,
GvValueID   value_id ,
BaseContainer bc ,
Int32   container_id ,
Int32   cpu_id = 0  
)

Sets data in bc at container_id .

参数
[in] data The data to set. The caller owns the pointed data.
Points to GV data. The layout of the pointed data is determined by value_id .
[in] value_id Determines the type of data .
[in] bc The container to set the value in.
[in] container_id The container ID to set.
[in] cpu_id The CPU ID.
返回
true if successful, otherwise false .

◆  GetNode()

GvNode * GetNode ( GeListNode bn )

A safe cast from GeListNode to GvNode .

参数
[in] bn The list node to cast. The caller owns the pointed node.
返回
The cast node pointer.

◆  GvRegisterOperatorPlugin()

Bool GvRegisterOperatorPlugin ( GvOperatorID   id ,
const maxon::String str ,
Int32   info ,
DataAllocator at ,
const maxon::String description ,
Int32   disklevel ,
GvOpClassID   op_class ,
GvOpGroupID   op_group ,
Int32   op_owner ,
BaseBitmap icon  
)

Registers an operator plugin with Cinema 4D .

参数
[in] id A unique plugin ID. Must be obtained from http://www.plugincafe.com
[in] str The name of the plugin.
To affect the order that plugins are displayed in menus add "#$n" as a prefix to this name, where n is a number.
Lower numbers are displayed before higher numbers. If name is "--" it will show up as a menu separator.
[in] info The settings for the plugin. Possible flags are: PLUGINFLAG GvOperatorFlags
[in] at The allocator for the operator plugin. This is a pointer to a function that creates a new instance of GvOperatorData with NewObj .
[in] description The name of the description resource file to use for the operator plugin without .res extension, for example "GVoperator" .
The name has to be unique, i.e. "Tdisplay" cannot be used for 2 different descriptions. See 描述 Resource for more information.
[in] disklevel The plugin level is similar to a version number. The default level is 0 .
Increase this for new revisions of a plugin to allow for forward and backward compatibility.

As an example you may have updated a plugin. If you now need to write additional information for new settings or changed types for old settings you can increase the level.
During loading either a 0 is passed (if the file was written by the old plugin) or 1 (if the file was written by the new plugin). This allows to easily write/read new values.
For forward and backward compatibility to work any existing read order from a given level must not be changed. Cinema 4D skips any new settings automatically if they have not been read.

disklevel is only useful if variables are written/read in NodeData::Write / NodeData::Read .
[in] op_class The operator class. Either a class registered with GvRegisterOpClassType() or ID_GV_OPCLASS_TYPE_GENERAL .
[in] op_group The operator group. Either a group registered with GvRegisterOpGroupType() or one of these: ID_GV_OPGROUP_TYPE
[in] op_owner The owner ID. Either 0 or a unique ID for a custom plugin family.
[in] icon The icon for the operator. The bitmap is copied.
The icon should be of size 32x 32 , but will be scaled if needed.
It must also be 24 bits and should if possible include an alpha to support pattern backgrounds.
返回
true if the plugin was registered, otherwise false .