-
首页
-
C4D R23.110 C++ SDK
详细描述
函数
|
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
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
◆
GvDropHookFunc
Drop hook function pointer.
-
参数
-
-
返回
-
true
if successful, otherwise
false
.
◆
GvCalcHookFunc
Calculation hook function pointer.
-
参数
-
-
返回
-
true
if successful, otherwise
false
.
◆
GvMenuHookFunc
Menu hook function pointer.
-
参数
-
-
返回
-
true
if successful, otherwise
false
.
◆
GvMessHookFunc
Message hook function pointer.
-
参数
-
-
返回
-
true
if successful, otherwise
false
.
◆
GvAnimHookFunc
Animation hook function pointer.
-
参数
-
-
返回
-
true
if successful, otherwise
false
.
◆
GvDrawHookFunc
typedef void(* GvDrawHookFunc) (
GvDrawHook
&hook)
|
Draw hook function pointer.
-
参数
-
-
返回
-
true
if successful, otherwise
false
.
◆
GvHookCallback
Hook callback function pointer.
-
参数
-
[in]
|
doc
|
Document.
|
[in]
|
id
|
Hook ID.
|
-
返回
-
The scene hook.
◆
GvValueType
◆
GvIdTablePtr
Function Documentation
◆
GvGetWorld()
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()
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()
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()
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()
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()
Frees port description structures allocated with
GvGetAllDataTypes()
.
-
参数
-
[out]
|
info
|
The port description to free.
|
◆
GvRegisterOpClassType()
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()
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()
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()
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()
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()
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()
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()
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()
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]
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]
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]
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()
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]
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()
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]
◆
GvBuildOutValuesTable()
◆
GvBuildValuesTable()
[2/2]
◆
GvGetDataInfo()
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()
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]
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()
Frees the dynamic data in
data
.
-
参数
-
[in,out]
|
data
|
The dynamic data to free. The associated pointers are set to
nullptr
.
|
◆
GvClearDynamicData()
[1/2]
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]
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()
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]
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()
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()
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()
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
.