#include <c4d_graphview_def.h>
Value handler. Use GvRegisterValueType() to register.
Public Attributes | |
| GvValueID | value_id |
| GvValueFlags | value_flags |
| void * | userdata |
| Bool(* | Alloc )(void *userdata, void *&data, Int32 nr_of_cpus) |
| void(* | Free )(void *userdata, void *&data, Int32 nr_of_cpus) |
| GvCalcError(* | Convert )(void *userdata, GvValueID source_id, const void *const source, GvValueID dest_id, void *dest, Int32 cpu_id) |
| GvCalcError(* | Calculate )(void *userdata, GvValueID id, const void *const source1, const void *const source2, void *dest, Int32 cpu_id, GvValueFlags calculation, Float parm1) |
| void(* | CopyFrom )(void *userdata, const void *const source, void *dest, Int32 cpu_id) |
| void(* | CopyTo )(void *userdata, const void *const source, void *dest, Int32 cpu_id) |
| Int32(* | GetConversionsFrom )(void *userdata, GvValueID *&table) |
| Int32(* | GetConversionsTo )(void *userdata, GvValueID *&table) |
| String(* | GetName )(void *userdata) |
| Bool(* | Read )(void *userdata, void *data, Int32 nr_of_cpus, HyperFile &hf, Int32 level) |
| Bool(* | Write )(void *userdata, const void *const data, Int32 nr_of_cpus, HyperFile &hf) |
| BaseBitmap *(* | GetIcon )(void *userdata) |
| const void *(* | GetDataInstance )(void *userdata, const void *const source, Int32 cpu_id) |
| GvValueID value_id |
Value ID.
| GvValueFlags value_flags |
Value flags: GvValueFlags.
| void* userdata |
User data.
Allocate an array of nr_of_cpus instances of the value and set data to point to this array.
| [in] | userdata | User data. |
| [out] | data | Assign a pointer to the allocated array. |
| [in] | nr_of_cpus | Number of CPUs to allocate values for. |
Free allocated values in Alloc.
| [in] | userdata | User data. |
| [out] | data | An array of nr_of_cpus values to free. Assigned nullptr afterwards. |
| [in] | nr_of_cpus | Number of CPUs to free values for. |
| GvCalcError(* Convert) (void *userdata, GvValueID source_id, const void *const source, GvValueID dest_id, void *dest, Int32 cpu_id) |
Convert source to dest if possible.
| [in] | userdata | User data. |
| [in] | source_id | Determines the type of source. |
| [in] | source | Source data. Points to GV data. The layout of the pointed data is determined by source_id. |
| [in] | dest_id | Determines the type of dest. |
| [out] | dest | Destination data. Points to GV data. The layout of the pointed data is determined by dest_id. |
| [in] | cpu_id | CPU ID. |
| GvCalcError(* Calculate) (void *userdata, GvValueID id, const void *const source1, const void *const source2, void *dest, Int32 cpu_id, GvValueFlags calculation, Float parm1) |
Perform a calculation.
| [in] | userdata | User data. |
| [in] | id | Determines the type of the data parameters. |
| [in] | source1 | First source data. Points to GV data. The layout of the pointed data is determined by id. |
| [in] | source2 | Second source data. Points to GV data. The layout of the pointed data is determined by id. |
| [out] | dest | Destination data. Points to GV data. The layout of the pointed data is determined by id. |
| [in] | cpu_id | CPU ID. |
| [in] | calculation | Calculation: GvValueFlags |
| [in] | parm1 | Parameter. |
Copy the data from an array in source to dest: *dest = source[cpu_id].
Copy the data from source to an array in dest: dest[cpu_id] = *source.
Report the value types that this value handler can convert from.
| [in] | userdata | User data. |
| [out] | table | Assign a pointer to a table of value IDs. The handler owns the pointed table. |
Report the value types that this value handler can convert to.
| [in] | userdata | User data. |
| [out] | table | Assign a pointer to a table of value IDs. The handler owns the pointed table. |
Get the value name.
| [in] | userdata | User data. |
Read the value to data from hf.
| [in] | userdata | User data. |
| [out] | data | Data to read to. Points to GV data. The layout of the pointed data is determined by value_id. |
| [in] | nr_of_cpus | Number of CPUs. |
| [in] | hf | Hyper file to read from. |
| [in] | level | Disc level. |
Write the value in data to hf.
| [in] | userdata | User data. |
| [in] | data | Data to write from. Points to GV data. The layout of the pointed data is determined by value_id. |
| [in] | nr_of_cpus | Number of CPUs. |
| [out] | hf | Hyper file to write to. |
| BaseBitmap*(* GetIcon) (void *userdata) |
Get the icon for the value.
Retrieve a pointer to the data in source: &source[cpu_id].
| [in] | userdata | User data. |
| [in] | source | Source data. Points to GV data. The layout of the pointed data is determined by value_id. |
| [in] | cpu_id | CPU ID. |