Namespaces | |
birender | |
Swap/Intel/Motorola Conversions | |
void | lSwap (void *adr, Int cnt=1) |
void | wSwap (void *adr, Int cnt=1) |
void | lIntel (void *adr, Int cnt=1) |
void | wIntel (void *adr, Int cnt=1) |
void | lMotor (void *adr, Int cnt=1) |
void | wMotor (void *adr, Int cnt=1) |
void | llSwap (void *adr, Int cnt=1) |
void | llIntel (void *adr, Int cnt=1) |
void | llMotor (void *adr, Int cnt=1) |
Background Handler | |
void | GeAddBackgroundHandler (BackgroundHandler *handler, void *tdata, Int32 typeclass, Int32 priority) |
Bool | GeRemoveBackgroundHandler (void *tdata, Int32 typeclass) |
Bool | GeStopBackgroundThreads (Int32 typeclass, BACKGROUNDHANDLERFLAGS flags, BaseThread *thread) |
Bool | GeCheckBackgroundThreadsRunning (Int32 typeclass, Bool all) |
Status | |
void | StatusClear () |
void | StatusSetSpin () |
void | StatusSetBar (Int32 p) |
void | StatusSetText (const maxon::String &str) |
void | StatusNetClear () |
void | StatusSetNetLoad (STATUSNETSTATE status) |
void | StatusSetNetBar (Int32 p, const GeData &dat) |
void | StatusSetNetText (const maxon::String &str) |
Create | |
SUBSTANCE_IMPORT_RESULT | ImportSubstance (BaseDocument *const doc, const Filename &fn, SUBSTANCE_IMPORT_COPY ©File, Bool errPopup, Bool addUndo, Bool createMaterial, BaseList2D **assetPtr) |
BaseMaterial * | CreateMaterial (BaseList2D *const asset, Int32 graphIndex, SUBSTANCE_MATERIAL_MODE mode) |
BaseShader * | CreateSubstanceShader (BaseList2D *const asset) |
Bool | AssignChannelToMaterial (BaseList2D *const asset, Material *const c4dMaterial, Int32 channelId, Int32 outputUid, Bool addUndo) |
Get and Insert | |
BaseList2D * | GetFirstSubstance (BaseDocument *const doc) |
void | GetSubstances (BaseDocument *const doc, AtomArray *arr, Bool onlySelected) |
Bool | InsertLastSubstance (BaseDocument *const doc, BaseList2D *asset) |
Graphs, Inputs, Outputs | |
void * | GetSubstanceGraph (BaseList2D *const asset, void *const prevGraph, String &name) |
void * | GetSubstanceInput (BaseList2D *const asset, void *const graph, void *const prevInput, UInt32 &inputUid, Int32 &firstId, Int32 &numElements, SUBSTANCE_INPUT_TYPE &type, String &name) |
void * | GetSubstanceOutput (BaseList2D *const asset, void *const graph, void *const prevOutput, UInt32 &outputUid, SUBSTANCE_OUTPUT_TYPE &type, String &name, BaseBitmap **bmpPtr) |
Preferences | |
SUBSTANCE_MATERIAL_MODE | PrefsGetMaterialModeSetting () |
Int32 | PrefsGetPreviewSetting () |
Misc | |
Bool | MaterialUsesSubstance (BaseMaterial *const mat) |
BaseBitmap * | GetSubstanceMosaicPreview (BaseList2D *const asset, Int32 w, Int32 h) |
Private | |
void | UpdateImageInputPaths (BaseList2D *const asset, String &path) |
void | CloneReferencedSubstances (BaseDocument *const doc, BaseShader *const shd, BaseDocument *const ddoc, BaseShader *const dshd) |
void | CloneReferencedSubstancesObject (BaseDocument *const docSrc, BaseObject *const opSrc, BaseDocument *const docDst, BaseObject *const opDst) |
void | InsertSubstancePreviewScene (BaseDocument *const doc, BaseList2D *const asset) |
const BaseBitmap * | GetContentBrowserOverlay () |
typedef void(* PickSessionCallBack) (Int32 flags, const PickSessionDataStruct *psd) |
Pick session callback. Called when a pick session has been started.
Used to change the state of the pick session button for instance and to check if a pick session has been canceled.
[in] | flags | Flags: PICKSESSION_FLAG_CANCELED. |
[in] | psd | The passed pick session data structure. |
using ProgressDelegate = maxon::Delegate<Bool(Float percent)> |
used by LoadDocument to inform about the progress of the operation. Return True to continue the operation, False to cancel the operation.
typedef BM_INFO* BM_REF |
typedef Int32 PROGRESS_ID |
typedef GeData MasterCallBackFunc(GeDialog *master, const BaseContainer &msg) |
Callback function.
[in] | master | The registered dialog pointer. |
[in] | msg | The message container: MCB |
typedef maxon::Delegate<maxon::Result<void>FieldInput&, const FieldInfo&)> FieldLambdaInput |
typedef maxon::Delegate<maxon::Result<void>const FieldInput&, const FieldOutputBlock&, const FieldInfo&)> FieldLambdaOutput |
using GradientRenderDataTuple = maxon::Tuple<maxon::GradientRenderData, maxon::GradientRenderData> |
typedef void HtmlViewerCustomGuiURLCallback(void *user_data, const maxon::String &url, Bool hasError, Int32 encoding, void *reserved) |
HTML viewer GUI URL callback. Has to be registered/unregistered with HtmlViewerCustomGui::SetURLCallback().
[in] | user_data | The user data. |
[in] | url | The URL. |
[in] | encoding | The URL encoding: URL_ENCODING |
[in,out] | reserved | Reserved. |
typedef maxon::Opt<maxon::BaseArray<Char> > HtmlViewerCustomGuiResourceRequestInterceptCallback(void *user_data, const maxon::String &url, Int32 encoding, void *reserved) |
HTML viewer GUI resource request interception callback. Has to be registered/unregistered with HtmlViewerCustomGui::SetResourceRequestInterceptCallback().
[in] | user_data | The user data. |
[in] | url | The URL. |
[in] | encoding | The URL encoding: URL_ENCODING |
[in,out] | reserved | Reserved. |
using CustomIconGetIdDelegate = maxon::Delegate<Int32()> |
using CustomIconDrawDelegate = maxon::Delegate<void(IconData& dat)> |
typedef Bool(* VisitChildrenCallback) (void *root, void *obj, void *userdata, void *data1, void *data2, Bool &bCont) |
Callback for TreeViewFunctions::VisitChildren. Called for each child.
[in] | root | The tree view root. |
[in] | obj | The child object. |
[in] | userdata | The user data. |
[in] | data1 | The first data. |
[in] | data2 | The second data. |
[out] | bCont | Set to true to continue browsing, otherwise to false. |
Called to process host message for the MaterialPreviewData when initialized with this callback.
[in] | lMessage | The message: MATPREVIEW |
[in] | pData | The message data. |
[in] | pUserData | A clone of the user data. |
User callback set by SplineData::SetUserCallback.
[in] | id | The type of call: SPLINE_CALLBACK |
[in] | d | The callback data. Can be either SplineDataCallbackDraw, SplineDataCallbackCursorInfo or SplineDataCallbackCoreMessage depending on the callback call id. |
typedef FalloffData* FalloffDataAllocator() |
FalloffData allocator.
using FieldOutputRef = maxon::StrongRef<FieldOutput> |
typedef Filename RelativeFilename |
Filename path is relative.
typedef maxon::Tuple<maxon::Url, Bool> TexturePathTuple |
typedef Bool(* PluginHelpDelegate) (const maxon::String &opType, const maxon::String &baseType, const maxon::String &group, const maxon::String &property) |
Plugin help support callback. Can be used to display context sensitive help when the user selects "Show Help" for an object or attribute.
[in] | opType | The object type name, for example "OATOM". |
[in] | baseType | The name of the base object type that opType is derived from, usually the same as opType. |
[in] | group | The name of the group in the attribute manager, for example "ID_OBJECTPROPERTIES". |
[in] | property | The name of the object property, for example "ATOMOBJECT_SINGLE". |
typedef void IlluminanceSurfacePointModel(VolumeData *sd, RayLightCache *rlc, IlluminanceSurfacePointData *dat) |
Callback definition for surface point illumination models.
[in] | sd | The volume data for the point being calculated. Cinema 4D owns the pointed volume data. |
[in] | rlc | The light data cache for the point being calculated. Cinema 4D owns the pointed data. |
[in] | dat | The illuminance surface point data. |
typedef LatLongRange SphereArc |
Represents an arc on a sphere. Private.
typedef maxon::Vec3<maxon::Float32, 1> Vector32 |
Single-Precision Vector. A vector contains three components X, Y and Z
typedef maxon::Vec3<maxon::Float64, 1> Vector64 |
Double-Precision Vector. A vector contains three components X, Y and Z
typedef maxon::Vec3<maxon::Float64, 1> Vector |
typedef maxon::Vec2<maxon::Float64, 1> Vector2d |
typedef maxon::Vec2<maxon::Float64, 1> Vector2d64 |
typedef maxon::Mat3<maxon::Vector64> Matrix64 |
typedef maxon::Mat3<maxon::Vector32> Matrix32 |
typedef maxon::Mat3<maxon::Vector64> Matrix |
typedef void* Hndl |
typedef maxon::Bool Bool |
typedef maxon::Char Char |
typedef maxon::UChar UChar |
typedef maxon::Int16 Int16 |
typedef maxon::UInt16 UInt16 |
typedef maxon::Int32 Int32 |
typedef maxon::UInt32 UInt32 |
typedef maxon::Int64 Int64 |
typedef maxon::UInt64 UInt64 |
typedef maxon::Int Int |
typedef maxon::UInt UInt |
typedef maxon::Float Float |
typedef maxon::Float64 Float64 |
typedef maxon::Float32 Float32 |
typedef maxon::Utf32Char Utf32Char |
32 bit unicode (UTF-32) character.
typedef maxon::Utf16Char Utf16Char |
16 bit unicode character.
using Matrix4d32 = maxon::SqrMat4<Vector4d32> |
Single-precision Matrix4.
using Matrix4d64 = maxon::SqrMat4<Vector4d64> |
Double-precision Matrix4.
using Matrix4d = maxon::SqrMat4<Vector4d> |
Matrix4 for double-precision Cinema 4D versions.
using FieldOutputBlock = FieldOutputBlockTemplate<false> |
using ConstFieldOutputBlock = FieldOutputBlockTemplate<true> |
using NetworkIpAddr = maxon::NetworkIpAddr |
using NetworkInterface = maxon::NetworkInterface |
using ZeroConfService = maxon::ZeroConfServiceRef |
using ProcessEditorPreviewImageFn = maxon::Delegate<maxon::Result<void>(BaseBitmap const* &bitmap, UInt32 & checksum)> |
using ModifyFilenameDelegate = maxon::Delegate<maxon::Result<void>(Int32 message, const Filename& oldName, const Filename& newName)> |
typedef const void* ConstUVWHandle |
Handle for read-only UVW data. See also: UVWTag.
typedef void* NormalHandle |
Handle for normal data. See also: NormalTag.
typedef const void* ConstNormalHandle |
Handle for read-only normal data. See also: NormalTag.
typedef void* VertexColorHandle |
Handle for vertex color data. See also VertexColorTag.
typedef const void* ConstVertexColorHandle |
Handle for read-only vertex color data. See also VertexColorTag.
using Vector4d32 = maxon::Vector4d32 |
using Vector4d64 = maxon::Vector4d64 |
using Vector4d = maxon::Vector4d |
|
strong |
ACCESSED_OBJECTS_MASK is used for AccessedObjectsCallback to tell which data of an object is accessed.
Enumerator | |
---|---|
NONE | |
MATRIX | The matrix will be accessed (including e.g. frozen matrix). This doesn't include the global matrix. |
DATA | Data accessible via Get/SetParameter (including data stored in the BaseContainer and the DIRTYFLAGS::DATA bit) will be accessed. |
BITS | The Bits (BaseList2D::GetBit) of the object will be accessed. |
NBITS | The NBits (GeListNode::GetNBit) of the object will be accessed. |
FALLOFF | The falloff member will be accessed. |
MEMBER | Some other member (neither matrix, data container/parameter, bits, nor falloff) of the object will be accessed. |
DEFORM_MODE | The deform mode of a generator/deformer will be accessed. |
CACHE_FLAG | The cache of the object will be accessed. This includes cache-related data such as the dependence list, cache proxy tags, or the IsDirty/ClearDirty/Touch-controlled dirty information. During generator execution this has a hierarchical meaning, so when a generator tells that it may read from an object's cache, it is allowed to read nested caches as well. Don't use this flag directly, use CACHE instead. |
CACHE | The cache of the object will be accessed. Combination of CACHE_FLAG and BITS as CACHE_FLAG implies BITS. |
VARIABLE_TAG | A VariableTag of the object will be accessed. May only be used for METHOD_ID::GET_VIRTUAL_OBJECTS or METHOD_ID::MODIFY_OBJECT. |
NON_VARIABLE_TAG | A non-VariableTag of the object will be accessed. May only be used for METHOD_ID::GET_VIRTUAL_OBJECTS or METHOD_ID::MODIFY_OBJECT. |
ANY_TAG | A tag of the object will be accessed. May only be used for METHOD_ID::GET_VIRTUAL_OBJECTS or METHOD_ID::MODIFY_OBJECT. Combination of VARIABLE_TAG and NON_VARIABLE_TAG. |
DESCRIPTION | The dirty information DIRTYFLAGS::DESCRIPTION will be accessed. |
ALL | All flags combined (except GLOBAL_MATRIX and CHILD_CACHE). |
GLOBAL_MATRIX_FLAG | The global matrix will be accessed. This flag may only be used for read access. Don't use this flag directly, use GLOBAL_MATRIX instead. |
CHILD_CACHE | Only a child cache of the cache will be affected. Don't use this flag directly, it will be set internally together with CACHE_FLAG to take into account that whenever a cache is modified and it is part of a parent cache, the parent cache is affected as well. |
GLOBAL_MATRIX | The global matrix will be accessed. Combination of GLOBAL_MATRIX_FLAG and MATRIX as GLOBAL_MATRIX_FLAG implies MATRIX. |
METHOD_ID is used for BaseList2D::GetAccessedObjects to tell for which method accessed objects shall be obtained. Non-negative values represent calls to the generic BaseTag/BaseObject::Execute method with the METHOD_ID as execution priority. Negative values represent calls to specific methods such as GetVirtualObjects.
Enumerator | |
---|---|
MIN_EXECUTION_ID | Minimum value which encodes a call to BaseTag/BaseObject::Execute with the METHOD_ID as execution priority. |
NONE | No method call. |
GET_VIRTUAL_OBJECTS | BaseObject::GetVirtualObjects method of generators. For spline generators this includes the methods GetContour and CheckDirty. |
MODIFY_OBJECT | BaseObject::ModifyObject method of deformers and tags, also used for matrix modifier tags and variable tags with fields. |
GET_VIRTUAL_OBJECTS_AND_MODIFY_OBJECT | BaseObject::GetVirtualObjects and/or BaseObject::ModifyObject. This special method id can be used for BaseList2D::GetAccessedObjectsRec and its related functions GetAccessedObjectsOfHierarchy, GetAccessedObjectsOfChildren, GetAccessedObjectsOfFirstChildHierarchy. It will call GetAccessedObjects on generators and modifiers and makes sure that this includes all modifiers which effect a generator. E.g., if you call GetAccessedObjectsRec on a generator, GetAccessedObjects will be called not only on the generator but also on its modifier children, modifier tags, matrix modifier tags, and variable tags with fields. This method id must NOT be used for direct calls to GetAccessedObjects. You don't have to check for GET_VIRTUAL_OBJECTS_AND_MODIFY_OBJECT in implementations of GetAccessedObjects, the replacement by GET_VIRTUAL_OBJECTS or MODIFY_OBJECT is done internally before GetAccessedObjects implementations are called. |
GV_CALCULATE | |
SAMPLE | Sampling methods of falloffs and fields, including InitFalloff. |
CHECK_DIRTY | CheckDirty method of falloffs, fields and deformers. The CheckDirty method of spline generators is subsumed in GET_VIRTUAL_OBJECTS. |
EFFECTOR | Effector methods. |
|
strong |
|
strong |
|
strong |
Describes the script contexts that can be conveyed by ScriptInfoData
events.
|
strong |
Describes scripting languages that can be conveyed by ScriptInfoData
events.
Enumerator | |
---|---|
UNKOWN | Used for all unknown syntaxes. |
PYTHON | Used for Standard CPython syntax. |
OSL | Used for Open Shading Language syntax. |
|
strong |
Attribute Manager filter flags.
|
strong |
Enumerator | |
---|---|
NONE | No flags. |
CLAMPOUTPUT | Clamp the output values from the FieldList. |
ENABLEDIRECTIONBYDEFAULT | Have direction enabled by default on new layers. |
ENABLECOLORBYDEFAULT | Have color enabled by default on new layers. |
DISABLEVALUEBYDEFAULT | Disable the value channel by default on new layers. |
SIMPLEGUI | Use a simplified GUI, this is only possible if there is only a single standard field layer in the datatype. |
ENABLEROTATIONBYDEFAULT | Have direction enabled by default on new layers. |
|
strong |
|
strong |
enum DEFAULTVALUETYPE |
Enumerator | |
---|---|
DEFAULTVALUE | Dummy value for the default value GeData constructor. |
enum VOIDVALUETYPE |
Enumerator | |
---|---|
VOIDVALUE | Dummy value for the |
enum LLONGVALUETYPE |
Enumerator | |
---|---|
LLONGVALUE | Dummy value for the |
|
strong |
enum CurveTypeEnum |
enum SurfaceTypeEnum |
enum MappedCurveTypeEnum |
enum LineCurveTypeEnum |
enum ConicCurveTypeEnum |
enum ConicTypeEnum |
enum PlaneSurfaceTypeEnum |
|
strong |
|
strong |
|
strong |
|
strong |
enum _DONTCONSTRUCT |
enum _EMPTYCONSTRUCT |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
anonymous enum |
Enumerator | |
---|---|
TAB_TABS | Normal tabs. |
TAB_NOSELECT | No tabs. |
TAB_CYCLE | Popup buttons instead of tabs. |
TAB_RADIO | Radio buttons instead of tabs. |
TAB_VLTABS | Vertical tabs, left-sided. |
TAB_VRTABS | Vertical tabs, right-sided. |
BFV_CENTER | Centered vertically. |
BFV_TOP | Aligned to the top. |
BFV_BOTTOM | Aligned to the bottom. |
BFV_FIT | Fit. BFV_BOTTOM|BFV_TOP. |
BFV_SCALE | Scale if there is more space. |
BFV_SCALEFIT | |
BFV_MASK | Masks out flags. |
BFH_CENTER | Centered horizontally. |
BFH_LEFT | Aligned to the left. |
BFH_RIGHT | Aligned to the right. |
BFH_FIT | |
BFH_SCALE | Scale if there is more space. |
BFH_SCALEFIT | |
BFH_MASK | Masks out flags. |
DR_MULTILINE_MONOSPACED | Monospaced font. |
DR_MULTILINE_SYNTAXCOLOR | Python syntax highlighting. |
DR_MULTILINE_STATUSBAR | Display a statusbar with the cursor position. |
DR_MULTILINE_HIGHLIGHTLINE | Highlight lines. |
DR_MULTILINE_READONLY | Read-only multi-line field. |
DR_MULTILINE_PYTHON | Python line return handling. |
DR_MULTILINE_WORDWRAP | Word wrap multi-line field. |
DR_MULTILINE_SETLOGGER | |
DR_MULTILINE_SETPYTHONSCOPE | |
DR_MULTILINE_NO_DARK_BACKGROUND | Uses not dark but normal background color.
|
DR_MULTILINE_NO_BORDER | No border.
|
DR_MULTILINE_NO_SCROLLBARS | Shows all the text without scrollbars.
|
DR_MULTILINE_BOLD | Bold font.
|
DR_MULTILINE_DROP_TEXT_QUOTED | Drag & drop BaseList2d name with quotes.
|
DR_MULTILINE_RESERVED_MONOSPACED | Internal use.
|
DR_MULTILINE_RESERVED_SYNTAXCOLOR | Internal use.
|
DR_MULTILINE_RESERVED_STATUSBAR | Internal use.
|
DR_MULTILINE_RESERVED_HIGHLIGHTLINE | Internal use.
|
DR_MULTILINE_LINECOUNT | Default multiline line count.
|
DR_MULTILINE_SUBMITONENTER | Submits the text when pressing enter. |
DR_COLORFIELD_NO_BRIGHTNESS | Disables the brightness control. |
DR_COLORFIELD_NO_COLOR | Disables the color control. |
DR_COLORFIELD_BODYPAINT | Uses the BodyPaint style. Deprecated since R17. Not needed anymore: now just one style. |
DR_COLORFIELD_ICC_BASEDOC | Uses the color profile of the current BaseDocument. |
DR_COLORFIELD_ICC_BPTEX | Uses the color profile of the current BodyPaint texture. |
DR_COLORFIELD_NO_MODE_BUTTONS | Hides the color mode buttons.
|
DR_COLORFIELD_NO_COMPACT | Hides the Compact Mode button.
|
DR_COLORFIELD_NO_COLORWHEEL | Hides the Color Wheel mode button.
|
DR_COLORFIELD_NO_SPECTRUM | Hides the Color Spectrum mode button.
|
DR_COLORFIELD_NO_PICTURE | Hides the Color From Picture mode button.
|
DR_COLORFIELD_NO_RGB | Hides the RGB sliders mode button.
|
DR_COLORFIELD_NO_HSV | Hides the HSV sliders mode button.
|
DR_COLORFIELD_NO_KELVIN | Hides the Kelvin Color Temperature mode button.
|
DR_COLORFIELD_NO_MIXER | Hides the Color Mixer mode button.
|
DR_COLORFIELD_NO_SWATCHES | Hides the Swatches mode button.
|
DR_COLORFIELD_NO_SCREENPICKER | Hides the ScreenPicker mode button.
|
DR_COLORFIELD_ENABLE_COMPACT | Enables the Compact Mode.
|
DR_COLORFIELD_ENABLE_COLORWHEEL | Enables the Special Color Wheel mode (Special modes are exclusive each other: use only one at a time).
|
DR_COLORFIELD_ENABLE_SPECTRUM | Enables the Special Color Spectrum mode (Special modes are exclusive each other: use only one at a time).
|
DR_COLORFIELD_ENABLE_PICTURE | Enables the Special Color from Picture mode (Special modes are exclusive each other: use only one at a time).
|
DR_COLORFIELD_ENABLE_RGB | Enables the RGB sliders mode.
|
DR_COLORFIELD_ENABLE_HSV | Enables the HSV sliders mode.
|
DR_COLORFIELD_ENABLE_KELVIN | Enables the Kelvin Color Temperature mode.
|
DR_COLORFIELD_ENABLE_MIXER | Enables the Color Mixer mode.
|
DR_COLORFIELD_ENABLE_SWATCHES | Enables the Swatches mode.
|
DR_COLORFIELD_RGB_HIDE_HEX | Hides the Hexadecimal color field in the RGB Mode.
|
DR_COLORFIELD_POPUP | Private.
|
DR_COLORFIELD_AS_UI_COLOR | Turns the color chooser gui into a color chooser for ui colors(colors that are not color managed). |
DROLDWIN_SDK | |
DR_BUTTON_STYLE_NORMAL | Normal button style. |
DR_BUTTON_STYLE_EMPHASIZED | Accentuated button style. |
DR_BUTTON_STYLE_DIMMED | Attenuated button style. |
GADGET_FLAG_HANDLE_SCROLL_GROUP | @markprivate CoreUI user area handles scroll group on its own. |
DIALOGRESOURCE_ |
|
strong |
enum cinema::ACCESSED_OBJECTS_MASK cinema::MAXON_ENUM_FLAGS | ( | ACCESSED_OBJECTS_MASK | ) |
enum cinema::METHOD_ID Int32 cinema::MAXON_ENUM_ORDERED_LIST | ( | METHOD_ID | ) |
enum cinema::GET_ACCESSED_OBJECTS_FLAGS cinema::MAXON_ENUM_FLAGS | ( | GET_ACCESSED_OBJECTS_FLAGS | ) |
Loads the global icon with ID resource_id.
Cinema 4D registers hundreds of its icons at program start and this way you can access them, for example RESOURCEIMAGE_MOVE is the move symbol. It is also possible to access the icons for commands.
[in] | resource_id | The resource ID to load. |
BaseBitmap* cinema::InitResourceBitmap | ( | Int32 | resource_id | ) |
Loads the global icon with ID resource_id as a bitmap.
Cinema 4D registers hundreds of its icons at program start and this way you can access them, for example RESOURCEIMAGE_MOVE is the move symbol. It is also possible to access the icons for commands.
[in] | resource_id | The resource ID to load. |
BaseBitmap* cinema::GetBitmapFromLockList | ( | BaseDocument * | doc, |
Filename & | fn, | ||
Int32 | frame, | ||
LayerSet * | lsl, | ||
LockList *& | lockList, | ||
INITRENDERRESULT * | initRenderResult = nullptr |
||
) |
Gets a bitmap from a locklist.
[in] | doc | The document to which the locklist belongs. |
[in] | fn | Filename of the texture. |
[in] | frame | Frame number. |
[in] | lsl | Layer set. |
[out] | lockList | The locklist to which this bitmap belongs. |
[out] | initRenderResult | Result of loading the textures. Can be nullptr. |
void cinema::Unlock | ( | LockList *& | lockList | ) |
Unlocks a locklist. The parameter must be the same that was returned from GetBitmapFromLockList.
[in] | lockList | Locklist to unlock. |
Bool cinema::IsMarkedForDeletion | ( | const LockList * | lockList | ) |
Checks if a locklist is marked for deletion.
[in] | lockList | Locklist to check. |
maxon::Result<maxon::DataDictionary> cinema::GetImageSettingsDictionary | ( | const BaseContainer * | data, |
Int32 | filterId | ||
) |
Extracts the DataDictionary from the BaseContainer.
The DataDictionary stores the image format settings.
[in] | data | BaseContainer to extract. |
[in] | filterId | Filter id to separate settings between different filters. |
maxon::Result<void> cinema::SetImageSettingsDictionary | ( | const maxon::DataDictionary & | settings, |
BaseContainer * | data, | ||
Int32 | filterId | ||
) |
Replaces the DataDictionary in the BaseContainer.
The DataDictionary stores the image format settings.
[in] | settings | Settings to replace |
[out] | data | BaseContainer to modify. |
[in] | filterId | Filter id to separate settings between different filters. |
Bool cinema::BitmapSaverPluginSupport | ( | BitmapSaverPlugin * | bp, |
Int | flags | ||
) |
Bool cinema::BitmapSaverPluginIsMovie | ( | BitmapSaverPlugin * | bp | ) |
Bool cinema::HandleShaderPopupI | ( | BaseList2D * | parent, |
BaseShader *& | current, | ||
Int32 | value, | ||
Int | param | ||
) |
Simplifies the task of shader operations: undo handling, removing existing shaders, keeping track of the shader trees etc. ('I' stands for isolated.)
[in] | parent | Element that carries the shaders. The caller owns the pointed object. |
[in] | current | Currently set element, might be deleted, in which case the pointer is set to nullptr. The caller owns the pointed shader. |
[in] | value | The operation: SHADERPOPUP |
[in] | param | The parameter. Depends on value |
Bool cinema::BuildShaderPopupMenuI | ( | BaseContainer * | menu, |
BaseList2D * | parent, | ||
BaseShader * | current, | ||
Int | param | ||
) |
Private.
Bool cinema::HandleShaderPopup | ( | const BaseContainer & | bc, |
const DescID & | descid, | ||
Int32 | value, | ||
Int | param | ||
) |
Simplifies the task of shader operations: undo handling, removing existing shaders, keeping track of the shader trees etc.
[in] | bc | A container with links to BaseList2D elements. These must be stored under increasing IDs (starting with 1). |
[in] | descid | The description ID under which the shaders are stored. |
[in] | value | The operation: SHADERPOPUP |
[in] | param | The parameter. Depends on value |
Bool cinema::BuildShaderPopupMenu | ( | BaseContainer * | menu, |
const BaseContainer & | bc, | ||
const DescID & | descid, | ||
Int | param | ||
) |
Private.
Retrieves the name for the given channel type ID.
[in] | channelid | The channel type: CHANNEL |
BaseDocument* cinema::GetActiveDocument | ( | ) |
Gets the active document within the Cinema 4D editor.
BaseDocument* cinema::GetFirstDocument | ( | ) |
Gets the first document in the list of documents within Cinema 4D.
Asks Cinema 4D to load a file. This can be a document, an image, a layout or a lib4d/cat4d file.
[in] | name | The name of the file to load. |
[in] | allowAsync | True to allow loading the file async. Pleasee note that the function returns before loading is finished in that case. |
void cinema::InsertBaseDocument | ( | BaseDocument * | doc | ) |
Inserts a document into the list of documents within Cinema 4D.
[in] | doc | The document to insert. Cinema 4D takes over the ownership of the pointed document. |
void cinema::SetActiveDocument | ( | BaseDocument * | doc | ) |
Sets the document in the editor that the user is editing, this is the active document.
[in] | doc | The document to become active. The caller owns the pointed document. |
Bool cinema::CloseAllDocuments | ( | ) |
Closes all open documents.
void cinema::KillDocument | ( | BaseDocument *& | doc | ) |
Removes and frees all resources of the passed document.
[in,out] | doc | The document to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards. |
BaseDocument* cinema::LoadDocument | ( | const Filename & | name, |
SCENEFILTER | loadflags, | ||
BaseThread * | thread, | ||
maxon::String * | errorString = nullptr , |
||
const ProgressDelegate & | progressDelegate = ProgressDelegate() |
||
) |
Similar to LoadFile() but this time the document is not put into the editors list of documents and it gives control over the loaded document.
[in] | name | The name of the file to load the document from. |
[in] | loadflags | The scene filter flags for the loader: SCENEFILTER |
[in] | thread | The current thread, or nullptr for the main Cinema 4D thread. The caller owns the pointed thread. |
[out] | errorString | Assigned a string if an error occurred. |
[in] | progressDelegate | ProgressDelegate to receive the progress. see ProgressDelegate. |
Bool cinema::MergeDocument | ( | BaseDocument * | doc, |
const Filename & | name, | ||
SCENEFILTER | loadflags, | ||
BaseThread * | thread, | ||
maxon::String * | errorString = nullptr , |
||
const ProgressDelegate & | progressDelegate = ProgressDelegate() |
||
) |
Merges the file name into the document doc.
[in] | doc | The document to merge the loaded document name into. The caller owns the pointed document. |
[in] | name | The file to merge into doc. |
[in] | loadflags | The scene filter flags for the loader: SCENEFILTER |
[in] | thread | The current thread, or nullptr for the main Cinema 4D thread. The caller owns the pointed thread. |
[out] | errorString | Assigned a string if an error occurred. |
[in] | progressDelegate | ProgressDelegate to receive the progress. see ProgressDelegate. |
Bool cinema::SaveDocument | ( | BaseDocument * | doc, |
const Filename & | name, | ||
SAVEDOCUMENTFLAGS | saveflags, | ||
Int32 | format | ||
) |
Saves a document to a file.
[in] | doc | The document to save to a file. The caller owns the pointed document. |
[in] | name | The file to save the document to. |
[in] | saveflags | A combination of the flags for saving a document: SAVEDOCUMENTFLAGS |
[in] | format | The file format to save the document as: FORMAT_FILES |
BaseDocument* cinema::IsolateObjects | ( | BaseDocument * | doc, |
const AtomArray & | t_objects | ||
) |
A helper routine to copy the objects t_objects of document doc to a new document returned.
All materials associated are also copied over and the links are corrected.
[in] | doc | The document that contains the objects in the array t_objects. The caller owns the pointed document. |
[in] | t_objects | The objects to isolate. |
RENDERRESULT cinema::RenderDocument | ( | BaseDocument * | doc, |
const BaseContainer & | rdata, | ||
ProgressHook * | prog, | ||
void * | private_data, | ||
BaseBitmap * | bmp, | ||
RENDERFLAGS | renderflags, | ||
BaseThread * | th, | ||
WriteProgressHook * | wprog = nullptr , |
||
void * | data = nullptr |
||
) |
Renders a document to a bitmap.
[in] | doc | The document to render. Can be a clone of the real document to save memory usage. The caller owns the pointed document. |
[in] | rdata | The render data. |
[in] | prog | The progress bar hook. Can be nullptr. The caller owns the pointed progress hook. |
[in] | private_data | The private data for the progress hook prog, or nullptr. The caller owns the pointed private data. |
[in] | bmp | The bitmap to render to, this must have been allocated and initialized with the right size. The caller owns the pointed bitmap. |
[in] | renderflags | A combination of the render flags: RENDERFLAGS |
[in] | th | The thread to test for a break or nullptr. |
[in] | wprog | The write progress hook for the render operation.The caller owns the pointed write progress hook. |
[in] | data | The private data for the write progress hook wprog. |
Bool cinema::SaveProject | ( | BaseDocument * | doc, |
SAVEPROJECT | flags, | ||
Filename | targetPath, | ||
maxon::BaseArray< AssetEntry > * | assets = nullptr , |
||
maxon::BaseArray< AssetEntry > * | missingAssets = nullptr |
||
) |
Saves the document as a project (menu "Save Project with Assets").
[in] | doc | The document to save as project. The caller owns the pointed document. |
[in] | flags | A combination of the save project flags: SAVEPROJECT |
[in] | targetPath | The path to save the project to. |
[out] | assets | Filled by the found assets. |
[out] | missingAssets | Filled by the missing assets. |
GETALLASSETSRESULT cinema::GetAllAssets | ( | BaseDocument * | doc, |
Bool | allowDialogs, | ||
maxon::BaseArray< AssetEntry > & | assets, | ||
Filename & | lastPath, | ||
ASSETDATA_FLAG | flags = ASSETDATA_FLAG::NONE |
||
) |
Retrieves all assets from a document. It is e.g. used by "Save Project with Assets" menu and SaveProject().
[in] | doc | The document to get the assets from. The caller owns the pointed document. |
[in] | allowDialogs | If true this function can open dialogs. For example a file select dialog will be opened if a node of the scene points to a file which does not exist anymore. |
[in] | assets | Assigned the assets in document doc. |
[out] | lastPath | Filled with the last path used. If a file dialog is opened and the user selects the missing file on the hard disk, the folder of this asset is assigned to lastPath. The developer can store this value somewhere and pass it next time so Cinema 4D know where to look first before asking the user again. |
[in] | flags | Flags to decide which assets should be collected: ASSETDATA_FLAG |
Bool cinema::InteractiveModeling_Rewind | ( | BaseDocument * | doc | ) |
Private.
Bool cinema::InteractiveModeling_Restart | ( | BaseDocument * | doc | ) |
Used for modeling tools with GUI input. Applies the last modeling undo so that new values of the modeling tool can be applied.
Here is an example from the edge cut code:
[in] | doc | The document for the operation. The caller owns the pointed document. |
void cinema::RunAnimation | ( | BaseDocument * | doc, |
Bool | forward, | ||
Bool | stop | ||
) |
Controls the animation in a document.
[in] | doc | The document to animate. Usually GetActiveDocument(). The caller owns the pointed document. |
[in] | forward | If true the direction is set to forward, otherwise it is set to backward. |
[in] | stop | If true the animation is stopped, otherwise it is running. |
void cinema::SetDocumentTime | ( | BaseDocument * | doc, |
const BaseTime & | time | ||
) |
Controls the time of a document.
[in] | doc | The document to set the time. Usually GetActiveDocument(). The caller owns the pointed document. |
[in] | time | The time to set. |
Bool cinema::StopExternalRenderer | ( | ) |
Stops the external renderer.
void cinema::DrawTools | ( | const AtomArray * | activeobjects, |
const AtomArray * | activetags, | ||
BaseDocument * | doc, | ||
BaseDraw * | bd, | ||
BaseThread * | bt, | ||
TOOLDRAW | drawflags, | ||
Bool | inversez | ||
) |
Private.
Retrieves the default value for the specified MoData array id.
[in] | id | The MoData array ID: MODATA_IDS |
Retrieves the default type for the specified MoData array id.
[in] | id | The MoData array ID: MODATA_IDS |
enum cinema::STRENGTHMASK cinema::MAXON_ENUM_FLAGS | ( | STRENGTHMASK | ) |
Bool cinema::RegisterEffectorPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
DataAllocator * | g, | ||
const maxon::String & | description, | ||
BaseBitmap * | icon, | ||
Int32 | disklevel | ||
) |
Registers an effector plugin.
[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 plugin info flags: OBJECT PLUGINFLAG |
[in] | g | The allocator for the effector plugin. This is a pointer to a function that creates a new instance of EffectorData with NewObj(). |
[in] | description | The name of the description resource file to use for the effector plugin without .res extension, for example "oespline". The name has to be unique, i.e. "Tdisplay" cannot be used for 2 different descriptions. See Description Resource for more information. |
[in] | icon | The icon for the command. The bitmap is copied. The icon should be of size 32x32, but will be scaled if needed. It must also be 24 bits and should if possible include an alpha to support pattern backgrounds. |
[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. |
enum cinema::SCRIPT_CONTEXT cinema::MAXON_ENUM_LIST | ( | SCRIPT_CONTEXT | ) |
enum cinema::SCRIPT_LANGUAGE cinema::MAXON_ENUM_LIST | ( | SCRIPT_LANGUAGE | ) |
String cinema::GetScriptDefaultCode | ( | const SCRIPT_CONTEXT & | context | ) |
BaseObject* cinema::GeneratePrimitive | ( | const BaseDocument * | doc, |
Int32 | type, | ||
const BaseContainer & | bc, | ||
Float | lod, | ||
Bool | isoparm, | ||
BaseThread * | bt = nullptr |
||
) |
Creates a built-in Cinema 4D primitive objects.
[in] | doc | The document for the primitive object. The caller owns the pointed document. |
[in] | type | The primitive type: Primitive Types |
[in] | bc | The settings for the primitive. |
[in] | lod | The level of detail to use for the primitive. |
[in] | isoparm | Pass true to create a isoparm of the object. |
[in] | bt | The thread to test for a break or nullptr. The caller owns the pointed thread. |
BaseObject* cinema::GenerateSplinePrimitive | ( | const BaseDocument * | doc, |
Int32 | type, | ||
const BaseContainer & | bc, | ||
Float | lod, | ||
BaseThread * | bt = nullptr |
||
) |
Creates a built-in Cinema 4D primitive spline objects.
[in] | doc | The document for the spline primitive object. The caller owns the pointed document. |
[in] | type | The spline primitive type: Spline Primitive Types |
[in] | bc | The settings for the spline primitive. |
[in] | lod | The level of detail to use for the primitive. |
[in] | bt | The thread to test for a break or nullptr. The caller owns the pointed thread. |
MAXON_ATTRIBUTE_FORCE_INLINE const PointObject* cinema::ToPoint | ( | const T * | op | ) |
Casts a BaseObject* to a PointObject*.
MAXON_ATTRIBUTE_FORCE_INLINE PointObject* cinema::ToPoint | ( | T * | op | ) |
MAXON_ATTRIBUTE_FORCE_INLINE const PolygonObject* cinema::ToPoly | ( | const T * | op | ) |
Casts a BaseObject* to a PolygonObject*.
MAXON_ATTRIBUTE_FORCE_INLINE PolygonObject* cinema::ToPoly | ( | T * | op | ) |
MAXON_ATTRIBUTE_FORCE_INLINE const SplineObject* cinema::ToSpline | ( | const T * | op | ) |
Casts a BaseObject* to a SplineObject*.
MAXON_ATTRIBUTE_FORCE_INLINE SplineObject* cinema::ToSpline | ( | T * | op | ) |
MAXON_ATTRIBUTE_FORCE_INLINE const LineObject* cinema::ToLine | ( | const T * | op | ) |
Casts a BaseObject* to a LineObject*.
MAXON_ATTRIBUTE_FORCE_INLINE LineObject* cinema::ToLine | ( | T * | op | ) |
Calculates the normal of a polygon.
[in] | padr | The points array. |
[in] | v | The polygon. |
Helper function to modify a user chosen subdivision value.
Example:
[in] | val | The user chosen LOD value. |
[in] | lod | The LOD value, from BaseDocument::GetLOD(). |
[in] | min | The minimum LOD. |
[in] | max | The maximum LOD. |
Bool cinema::DisjointMesh | ( | PointObject * | op | ) |
Separates the mesh of the object to make each polygon/line segment independent.
Each polygon/line will be given its own points thereby separating them so they can be moved independently, such as the Explosion object.
[in] | op | The Point object to disjoint. The caller owns the pointed Point object. |
SplineObject* cinema::FitCurve | ( | Vector * | padr, |
Int32 | pcnt, | ||
Float | error, | ||
BaseThread * | bt | ||
) |
Creates a Spline object that has the best fit through the given points.
[in] | padr | The points to fit a curve to. The caller owns the pointed array. |
[in] | pcnt | The number of points in the point array padr. |
[in] | error | Sets how closely the curve must match the passed points. The range for this is 0 to MAXRANGE. The lower the value then the closer the curve will match. |
[in] | bt | The current thread, or nullptr for the main Cinema 4D thread. The caller owns the pointed thread. |
Turns the polygon mesh into triangles.
[in] | padr | The points of the object to triangulate. The caller owns the pointed array. |
[in] | pcnt | The number of points in the points array padr. |
[out] | vadr | The polygons for the object. Assigned the triangulated polygons. The caller owns the pointed array. Can be assigned nullptr, always check. |
[out] | vcnt | Assigned the triangulated count i.e. the number of polygons in the returned polygons array vadr. |
Bool cinema::TriangulateStandard | ( | const Vector * | padr, |
Int32 | pcnt, | ||
Int32 * | list, | ||
Int32 | lcnt, | ||
CPolygon *& | vadr, | ||
Int32 & | vcnt, | ||
BaseThread * | thread | ||
) |
Triangulates the spline described by (padr,pcnt) and (list,lcnt) returning the result in (vadr,vcnt).
[in] | padr | The input points. The caller owns the pointed array. |
[in] | pcnt | The number of input points in padr. |
[in] | list | The input segments. A list with a Int32 for each segment, telling its length within the point array padr. The caller owns the pointed array. |
[in] | lcnt | The number of input segments in list. |
[out] | vadr | Assigned the output polygon array. The caller owns the pointed array. |
[out] | vcnt | The number of polygons in vadr. |
[in] | thread | The current thread, or nullptr for the main Cinema 4D thread. The caller owns the pointed thread. |
Bool cinema::TriangulateRegular | ( | const Vector * | pinp, |
Int32 | pinp_cnt, | ||
Int32 * | list, | ||
Int32 | lcnt, | ||
Vector *& | padr, | ||
Int32 & | pcnt, | ||
CPolygon *& | vadr, | ||
Int32 & | vcnt, | ||
Float | regular_width, | ||
BaseThread * | thread | ||
) |
Triangulates the spline described by (pinp,pinp_cnt) and (list,lcnt) returning the result in (padr,pcnt) and (vadr,vcnt). Generates new points in a regular mesh specified by regular_width.
[in] | pinp | The input points. The caller owns the pointed array. |
[in] | pinp_cnt | The number of input points in pinp. |
[in] | list | The input segments. A list with a Int32 for each segment, telling its length within the point array padr. The caller owns the pointed array. |
[in] | lcnt | The number of input segments in list. |
[out] | padr | Assigned the output point array. The caller owns the pointed array. |
[out] | pcnt | The number of output points in padr. |
[out] | vadr | Assigned the output polygon array. The caller owns the pointed array. |
[out] | vcnt | The number of output polygons in vadr. |
[in] | regular_width | The width of the regular mesh. |
[in] | thread | The current thread, or nullptr for the main Cinema 4D thread. The caller owns the pointed thread. |
BaseObject* cinema::GenerateText | ( | const BaseDocument * | doc, |
const BaseContainer * | cp, | ||
BaseThread * | bt, | ||
Bool | separate | ||
) |
Creates a text object.
[in] | cp | The container with settings for the text object. |
[in] | bt | The current thread, or nullptr for the main Cinema 4D thread. The caller owns the pointed thread. |
[in] | separate | true if the letters should be separate, otherwise false. |
Bool cinema::CheckDisplayFilter | ( | BaseObject * | op, |
DISPLAYFILTER | filter | ||
) |
Checks if an object is covered by a display filter.
Example:
[in] | op | The object to check. The caller owns the pointed object. |
[in] | filter | The filter bitmask: DISPLAYFILTER |
Bool cinema::CheckEditorVisibility | ( | BaseObject * | op | ) |
Checks if an object is visible in the viewport including evaluation of parent hierarchies and layers. Combine with CheckDisplayFilter() to get the visibility in a certain BaseDraw.
[in] | op | The object to check. |
Int32 cinema::IntersectionTest | ( | PolygonObject * | op, |
BaseDraw * | bd, | ||
Float | x, | ||
Float | y, | ||
const Matrix & | mg, | ||
Float * | z, | ||
MODELINGCOMMANDMODE | mode, | ||
UChar * | pPointSelect, | ||
Int32 | lSelectCount | ||
) |
Checks for a polygon intersection at position (x/y) in the view bd with object op and global matrix mg.
The resulting Z depth is assigned to z.
[in] | op | The polygon object to check. The caller owns the pointed polygon object. |
[in] | bd | The base draw to check the intersection in. The caller owns the pointed base draw. |
[in] | x | The X coordinate to check. |
[in] | y | The Y coordinate to check. |
[in] | mg | The global matrix of the object. |
[out] | z | Assigned the Z coordinate of the intersection if found. |
[in] | mode | The intersection mode: MODELINGCOMMANDMODE
|
[in] | pPointSelect | An optional point selection. The caller owns the pointed array. |
[in] | lSelectCount | The number of points in pPointselect. |
Vector cinema::ComputeLightColor | ( | BaseObject * | op, |
Bool | editor, | ||
Float | reference | ||
) |
Computes the color of a light source. Private.
Computes the color of a light source. Private.
BaseObject* cinema::GetVirtualLineObject | ( | BaseObject * | op, |
const HierarchyHelp * | hh, | ||
const Matrix & | mloc, | ||
Bool | keep_spline, | ||
Bool | recurse, | ||
Matrix * | mres, | ||
Bool * | dirty | ||
) |
Gets a LineObject or SplineObject from a spline generator.
[in] | op | The spline object. The caller owns the pointed base object. |
[in] | hh | The HierarchyHelp usually passed from ObjectData::GetVirtualObjects(). The caller owns the pointed hierarchy help. |
[in] | mloc | The local matrix of the spline object. |
[in] | keep_spline | true to generate a SplineObject or false for a LineObject. |
[in] | recurse | If true and the object op itself did not generate a line object then Cinema 4D will search through all children and caches of op if any of those objects generates the line form. |
[out] | mres | Assigned the local matrix of the object that created the line form. |
[out] | dirty | Assigned true if the object that generated the spline was modified. In this case the generator knows that it must rebuild its cache. |
UVWTag* cinema::GenerateUVW | ( | const BaseObject * | op, |
const Matrix & | opmg, | ||
const TextureTag * | tp, | ||
const Matrix & | texopmg, | ||
BaseView * | view | ||
) |
Generates a UVW tag for an object.
[in] | op | The object to generate the UVW coordinates for. The caller owns the pointed base object. |
[in] | opmg | The object's global matrix. |
[in] | tp | The texture tag to generate the UVW coordinates from. The caller owns the pointed texture tag. |
[in] | texopmg | The global matrix of the object that carries the texture tag. |
[in] | view | The current view or nullptr. The caller owns the pointed base view. |
void cinema::CutReal | ( | BaseContainer & | data, |
Int32 | id, | ||
Float | min, | ||
Float | max | ||
) |
Limits the float value with the specified id in the container data between min and max.
[in] | data | The container with the value. |
[in] | id | The ID of the float value. |
[in] | min | The minimum value. |
[in] | max | The maximum value. |
void cinema::CutVector | ( | BaseContainer & | data, |
Int32 | id, | ||
Float | min, | ||
Float | max | ||
) |
Limits the vector value with the specified id in the container data between min and max.
[in] | data | The container with the value. |
[in] | id | The ID of the vector value. |
[in] | min | The minimum value. |
[in] | max | The maximum value. |
Bool cinema::CalculateVisiblePoints | ( | BaseDraw * | bd, |
PolygonObject * | op, | ||
Vector * | padr, | ||
UChar * | pset, | ||
Bool | select_visibonly | ||
) |
Checks which points in the points array padr of op are visible in the view bd.
[in] | bd | The base draw to check. The caller owns the pointed base draw. |
[in] | op | The polygon object to check. The caller owns the pointed polygon object. |
[in] | padr | The points array. The caller owns the pointed points array. |
[in] | pset | Assigned an array of size PointObject::GetPointCount() with the visibility status for each point: 1 if the point is visible otherwise 0 . |
[in] | select_visibonly | If true only points that are truly visible are included, otherwise e.g. points from the back of an object are included. |
BasePlugin* cinema::FindPlugin | ( | Int32 | id, |
PLUGINTYPE | type | ||
) |
Finds a plugin from its id and type.
[in] | id | The plugin ID. |
[in] | type | The plugin type: PLUGINTYPE |
BasePlugin* cinema::GetFirstPlugin | ( | ) |
Gets the first registered plugin in the plugin list.
Bool cinema::FilterPluginList | ( | AtomArray & | arr, |
PLUGINTYPE | type, | ||
Bool | sortbyname | ||
) |
Browses recursively through the plugin list looking for plugin of the specified type.
For example, to find all bitmap saver plugins use:
[out] | arr | Filled with the found plugins. |
[in] | type | The plugin type to filter: PLUGINTYPE |
[in] | sortbyname | If true then the found plugins are sorted alphabetically by name. |
void cinema::RemovePlugin | ( | BasePlugin * | plug | ) |
Private.
void cinema::BuildGlobalTagPluginContainer | ( | BaseContainer * | plugincontainer, |
Int32 * | id, | ||
UInt & | newFeatureVersion | ||
) |
Private.
Filename* cinema::GetLocalFilename | ( | ) |
Private.
BasePlugin* cinema::CreatePluginEntry | ( | const maxon::String & | foldername, |
BasePlugin * | bp | ||
) |
Private.
void cinema::SetLocalHierarchy | ( | BasePlugin * | parent, |
BasePlugin * | pred | ||
) |
Private.
Backtracks the origin of a tag to where it most likely came from. This includes cloning, cache copies and alembic proxies.
[in] | startTag | The tag to start the search from. |
Multiplies t1 and t2.
[in] | t1 | Left-operand time. |
[in] | t2 | Right-operand time. |
Divides t1 and t2.
[in] | t1 | Left-operand time. |
[in] | t2 | Right-operand time. |
Adds t1 and t2.
[in] | t1 | Left-operand time. |
[in] | t2 | Right-operand time. |
Subtracts t1 and t2.
[in] | t1 | Left-operand time. |
[in] | t2 | Right-operand time. |
Equality operator. Checks if t1 and t2 are equal.
[in] | t1 | Left-operand time. |
[in] | t2 | Right-operand time. |
Less than operator. Checks if t1 is less than t2.
[in] | t1 | Left-operand time. |
[in] | t2 | Right-operand time. |
Inequality operator. Checks if t1 and t2 are not equal.
[in] | t1 | Left-operand time. |
[in] | t2 | Right-operand time. |
Less than or equal operator. Checks if t1 is less than or equal to t2.
[in] | t1 | Left-operand time. |
[in] | t2 | Right-operand time. |
Greater than or equal operator. Checks if t1 is greater than or equal to t2.
[in] | t1 | Left-operand time. |
[in] | t2 | Right-operand time. |
Greater than operator. Checks if t1 is greater than t2.
[in] | t1 | Left-operand time. |
[in] | t2 | Right-operand time. |
BM_TILE* cinema::BfBitmapTileGet | ( | BM_REF | bm, |
const RECT32 * | src_rect, | ||
Int32 | width, | ||
Int32 | height, | ||
Int32 | tile_mode, | ||
Int32 | flags | ||
) |
Private.
Bool cinema::BfConvertTileToBasebmp | ( | const BM_TILE * | tile, |
const RECT32 * | tile_rect, | ||
BaseBitmap * | bmp, | ||
Int32 | zero | ||
) |
Private.
Bool cinema::BfBitmapTileScale | ( | BM_REF | bm, |
BM_TILE * | src_bm, | ||
BM_TILE * | dst_bm, | ||
RECT32 * | src_rect, | ||
RECT32 * | dst_rect | ||
) |
Private.
PROGRESS_ID cinema::BfProgressNew | ( | BM_REF | bm | ) |
Private.
Int32 cinema::BfProgressDelete | ( | BM_REF | bm, |
PROGRESS_ID | pid | ||
) |
Private.
Int32 cinema::BfProgressUpdate | ( | BM_REF | bm, |
PROGRESS_ID | pid, | ||
Int32 | current_value, | ||
Int32 | max_value, | ||
const maxon::String & | text | ||
) |
Private.
BaseContainer cinema::GetGlobalFilterPrefs | ( | Int32 | pluginid | ) |
Private.
Bool cinema::SetGlobalFilterPrefs | ( | Int32 | pluginid, |
const BaseContainer & | prefs | ||
) |
Private.
void* cinema::GetEditorWindow | ( | ) |
Retrieves Cinema 4D's window handle (HWND
). Private.
Bool cinema::RegisterCommandPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
BaseBitmap * | icon, | ||
const maxon::String & | help, | ||
CommandData * | dat | ||
) |
Registers a command plugin.
[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 command plugin info flags: PLUGINFLAG_COMMAND PLUGINFLAG |
[in] | icon | The icon for the command. The bitmap is copied. The icon should be of size 32x32, but will be scaled if needed. It must also be 24 bits and should if possible include an alpha to support pattern backgrounds. |
[in] | help | The tool tips and status bar help text for the command. When using strings it is advised to use the resources string (.str) files and the GeLoadString() function. This keeps the plugin easy to localize for any language to support and makes full use of the language features of Cinema 4D. |
[in] | dat | The command data instance for the plugin. Cinema 4D takes over the ownership of the pointed command data. |
Bool cinema::RegisterManagerInformation | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info | ||
) |
Registers manager information for use when registering shortcuts with AddShortcut().
[in] | id | A unique plugin ID. Must be obtained from http://www.plugincafe.com |
[in] | str | The manager name. |
[in] | info | The manager info flags: PLUGINFLAG |
Bool cinema::RegisterCTrackPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
DataAllocator * | npalloc, | ||
const maxon::String & | description, | ||
Int32 | disklevel | ||
) |
Registers a custom timeline track plugin.
[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 plugin info flags: PLUGINFLAG |
[in] | npalloc | The allocator for the track plugin. This is a pointer to a function that creates a new instance of CTrackData with NewObj(). |
[in] | description | The name of the description resource file to use for the track plugin without .res extension, for example "CTpla". The name has to be unique, i.e. "Tdisplay" cannot be used for 2 different descriptions. See Description 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 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. |
Bool cinema::RegisterCustomDataTypePlugin | ( | const maxon::String & | str, |
Int32 | info, | ||
CustomDataTypeClass * | dat, | ||
Int32 | disclevel | ||
) |
Registers a custom data type plugin.
[in] | str | The name of the plugin. |
[in] | info | The custom data type plugin info flags: CUSTOMDATATYPE_INFO PLUGINFLAG |
[in] | dat | An instance for the custom data type plugin. Cinema 4D takes over the ownership of the pointed data instance. |
[in] | disclevel | 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 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 CustomDataTypeClass::WriteData/ CustomDataTypeClass::ReadData. |
Bool cinema::RegisterResourceDataTypePlugin | ( | const maxon::String & | str, |
Int32 | info, | ||
ResourceDataTypeClass * | dat, | ||
Int32 | disclevel | ||
) |
Registers a resource data type plugin.
[in] | str | The name of the plugin. |
[in] | info | The resource data type plugin info flags: PLUGINFLAG |
[in] | dat | An instance for the resource data type plugin. Cinema 4D takes over the ownership of the pointed data instance. |
[in] | disclevel | 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 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 CustomDataTypeClass::WriteData/ CustomDataTypeClass::ReadData. |
CUSTOMDATATYPEPLUGIN* cinema::FindCustomDataTypePlugin | ( | Int32 | type | ) |
Finds registered data type plugin structures from data type ID.
[in] | type | The data type ID. |
RESOURCEDATATYPEPLUGIN* cinema::FindResourceDataTypePlugin | ( | Int32 | type | ) |
Finds registered resource data type plugin structures from data type ID.
[in] | type | The resource data type ID. |
Retrieves the data type ID from a resource data type ID.
[in] | resourcetype | The resource data type ID. |
BaseContainer cinema::GetCustomDataTypeDefault | ( | Int32 | type | ) |
Retrieves the default settings for a data type.
[in] | type | The data type ID. |
void cinema::FillBaseCustomGui | ( | BaseCustomGuiLib & | lib | ) |
Fills the custom GUI library structure lib with the default implementations.
[in] | lib | The custom GUI library structure to fill. |
enum cinema::AMFILTERFLAGS cinema::MAXON_ENUM_FLAGS | ( | AMFILTERFLAGS | ) |
enum cinema::FIELDLIST_FLAGS cinema::MAXON_ENUM_FLAGS | ( | FIELDLIST_FLAGS | ) |
enum cinema::FONTCHOOSER_POPUP_RESULT cinema::MAXON_ENUM_LIST | ( | FONTCHOOSER_POPUP_RESULT | ) |
Bool cinema::OpenFontChooserPopup | ( | const BaseContainer & | font, |
maxon::Delegate< void(FONTCHOOSER_POPUP_RESULT, const BaseContainer &)> | callback, | ||
Bool | useReducedFontList = false , |
||
Int32 | screenPositionX = -1 , |
||
Int32 | screenPositionY = -1 |
||
) |
Opens a font chooser popup at the specified position that can be closed by clicking outside or with ESC.
[in] | font | The initial font container. |
[out] | callback | Function called on user action with the result and the choosen font data. If FONTCHOOSER_POPUP_RESULT is OK, then choosen font is stored in the BaseContainer. If FONTCHOOSER_POPUP_RESULT is CANCEL, BaseContainer received is empty. |
[in] | useReducedFontList | If true, restrict the available fonts to 'core' families only |
[in] | screenPositionX | The Y position of the popup. See note above. |
[in] | screenPositionY | The Y position of the popup. See note above. |
void cinema::FillCustomIconSettingsFromBaseList2D | ( | CustomIconSettings & | settings, |
const BaseContainer & | data, | ||
Int32 | defaultIconId, | ||
Bool | fillDefault | ||
) |
Private.
Bool cinema::GetCustomIcon | ( | GetCustomIconData & | cid, |
const CustomIconSettings & | settings, | ||
Bool | drawBeforeColoring = false , |
||
CustomIconGetIdDelegate * | getIdCallback = nullptr , |
||
CustomIconDrawDelegate * | drawCallback = nullptr |
||
) |
void cinema::FreeInclusionTable | ( | InclusionTable *& | pTable | ) |
Frees inclusion tables created by InExcludeData::BuildInclusionTable.
[out] | pTable | The inclusion table to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards. |
Bool cinema::HandleKerningMessages | ( | GeListNode * | node, |
Int32 | msgId, | ||
Int32 | kerningDescID, | ||
Int32 | textDescID, | ||
void * | msgData, | ||
KerningVpGuiHelper * | guihelper | ||
) |
Takes care of all the messages that are important for the kerning viewport GUI to work.
[in] | node | Pass node from a NodeData::Message. |
[in] | msgId | Pass msgId from a NodeData::Message. |
[in] | kerningDescID | Pass descID from a NodeData::Message. |
[in] | textDescID | The description ID of the text's string. |
[in] | msgData | Pass msgData from a NodeData::Message. |
[in] | guihelper | Pass the pointer to an allocated instance of a NodeData's KerningVpGuiHelper. |
Bool cinema::CalculateLockListResolution | ( | BaseDocument * | doc, |
const Filename & | filename, | ||
Int32 * | xres, | ||
Int32 * | yres | ||
) |
Internal.
Bool cinema::CalculateLockListFilename | ( | BaseDocument * | doc, |
Filename & | fn, | ||
const LayerSet * | lsl | ||
) |
Internal.
void cinema::FreeInclusionTable | ( | MatAssignTable *& | pTable | ) |
Frees inclusion tables created by MatAssignData::BuildInclusionTable.
[out] | pTable | The inclusion table to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards. |
Bool cinema::SetDParameterPreview | ( | BaseContainer * | pContainer, |
const GeData * | pData, | ||
DESCFLAGS_SET & | lFlags, | ||
Int32 | lID | ||
) |
Convenience function to use in NodeData::SetDParameter() of nodes with a material preview in the description:
[in] | pContainer | The container of the node sent to NodeData::SetDParameter(). The caller owns the pointed container. |
[in] | pData | The t_data sent to NodeData::SetDParameter(). The caller owns the pointed data. |
[in] | lFlags | The flags sent to NodeData::SetDParameter(). |
[in] | lID | The ID of the material preview. |
Bool cinema::GetDParameterPreview | ( | BaseContainer * | pContainer, |
GeData * | pData, | ||
DESCFLAGS_GET & | lFlags, | ||
Int32 | lID, | ||
Int32 | lCount, | ||
BaseMaterial * | pMaterial | ||
) |
Convenience function to use in NodeData::GetDParameter() of material nodes with a material preview in the description:
[in] | pContainer | The container of the node sent to NodeData::GetDParameter(). The caller owns the pointed container. |
[in] | pData | The t_data sent to NodeData::GetDParameter(). The caller owns the pointed data.. |
[in] | lFlags | The flags sent to NodeData::GetDParameter(). |
[in] | lID | The ID of the material preview. |
[in] | lCount | The dirty count. |
[in] | pMaterial | The material. The caller owns the pointed material. |
Bool cinema::GetDParameterPreview | ( | BaseContainer * | pContainer, |
GeData * | pData, | ||
DESCFLAGS_GET & | lFlags, | ||
Int32 | lID, | ||
Int32 | lCount, | ||
BaseShader * | pShader | ||
) |
Convenience function to use in NodeData::GetDParameter() of shader nodes with a material preview in the description:
[in] | pContainer | The container of the node sent to NodeData::GetDParameter(). The caller owns the pointed container. |
[in] | pData | The t_data sent to NodeData::GetDParameter(). The caller owns the pointed data.. |
[in] | lFlags | The flags sent to NodeData::GetDParameter(). |
[in] | lID | The ID of the material preview. |
[in] | lCount | The dirty count. |
[in] | pShader | The shader. The caller owns the pointed shader. |
BaseContainer cinema::GetPreviewScenes | ( | Bool | bIncludeFlat2D, |
Bool | bIncludeDefault = false , |
||
Int32 | lObjectID = -1 |
||
) |
Retrieves a list of preview scenes. Use the returned container's elements in menus.
[in] | bIncludeFlat2D | Include Flat 2D. |
[in] | bIncludeDefault | Include Default. |
[in] | lObjectID | An object ID. |
Bool cinema::HandlePreviewSceneMessage | ( | Int32 | lID, |
MatPreviewType & | t, | ||
maxon::String & | strScene | ||
) |
Generates the type and the scene name from the menu item generated by GetPreviewScenes().
[in] | lID | The selected menu ID. |
[out] | t | Assigned the preview type. |
[out] | strScene | Assigned the scene name. |
Bool cinema::AddUserPreviewScene | ( | const Filename & | fn, |
Int32 | lID, | ||
maxon::String * | pstrName | ||
) |
Adds a user scene that optionally only shows up in materials with type lID. The pstrName may be nullptr, in which case the file name is used.
[in] | fn | The user scene name. |
[in] | lID | The material ID, or -1 to make the preview scene available for all materials. |
[in] | pstrName | An optional user scene name. The string is copied. The caller owns the pointed string. |
RENDERRESULT cinema::RenderMaterialPreview | ( | const Filename & | docpath, |
BaseMaterial * | pMatClone, | ||
BaseMaterial * | pOrigMat, | ||
BaseThread * | pThread, | ||
BaseBitmap * | pDest, | ||
BaseDocument * | pOriginalDoc, | ||
Float | rCurrentTime, | ||
Int32 | lFlags = 0 |
||
) |
Called by Cinema 4D to calculate the material preview for the Material Manager. Private.
RENDERRESULT cinema::RenderShaderPreview | ( | const Filename & | docpath, |
BaseShader * | pShaderClone, | ||
BaseShader * | pOrigShader, | ||
BaseThread * | pThread, | ||
BaseBitmap * | pDest, | ||
BaseDocument * | pOriginalDoc, | ||
Float | rCurrentTime, | ||
Int32 | lFlags = 0 |
||
) |
Called by Cinema 4D to calculate the shader preview for the Material Manager. Private.
RENDERRESULT cinema::RenderCustomPreview | ( | RenderPreviewImageCallback | fn, |
void * | pUserData, | ||
Int32 | lUserID, | ||
BaseThread * | pThread, | ||
BaseBitmap * | pDest, | ||
Int32 | lFlags = 0 |
||
) |
Called by Cinema 4D to calculate a custom preview. Private.
Bool cinema::RegisterCustomGuiPlugin | ( | const maxon::String & | str, |
Int32 | info, | ||
CustomGuiData * | dat | ||
) |
Registers a custom GUI plugin.
[in] | str | The name of the plugin. |
[in] | info | The custom GUI plugin info flags: CUSTOMGUI_SUPPORT PLUGINFLAG |
[in] | dat | An instance for the custom GUI plugin. Cinema 4D takes over the ownership of the pointed data instance. |
CUSTOMGUIPLUGIN* cinema::FindCustomGuiPlugin | ( | Int32 | type | ) |
Finds registered custom GUI plugin structures from a type ID.
[in] | type | The type ID. |
cinema::MAXON_DATATYPE | ( | GeData | , |
"net.maxon.data.gedata" | |||
) |
void cinema::FillFalloffPlugin | ( | FALLOFFPLUGIN * | fp, |
Int32 | info, | ||
FalloffDataAllocator * | g | ||
) |
Private.
Bool cinema::RegisterFalloffPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
FalloffDataAllocator * | g, | ||
const maxon::String & | description | ||
) |
Registers a falloff plugin.
[in] | id | A unique plugin ID. Must be obtained from http://www.plugincafe.com. |
[in] | str | The name of the plugin. |
[in] | info | The falloff plugin info flags: PLUGINFLAG |
[in] | g | The allocator for the falloff plugin. This is a pointer to a function that creates a new instance of FalloffData with NewObj(). |
[in] | description | The name of the description resource file to use for the falloff plugin without .res extension, for example "ofalloff_falloffname". The name has to be unique, i.e. "ofalloff_falloffname" cannot be used for 2 different descriptions. See Description Resource for more information. |
void* cinema::AllocFalloff | ( | Int32 | type | ) |
Allocates a falloff.
[in] | type | The falloff type. |
FIELDSAMPLE_FLAG cinema::ExtractSampleFlags | ( | const ConstFieldOutputBlock & | block | ) |
Read the sample flags from the array content of a FieldOutputBlock.
[in] | block | The outputs to extract flags from. |
Bool cinema::ValidateFieldOutputBlockWithFlags | ( | const FieldOutputBlock & | block, |
FIELDSAMPLE_FLAG | flags | ||
) |
Validate the content of a block making sure that the block itself is valid and array allocation respect the specified flags. "block" flags must be a perfect 1 to 1 match with the specified flags for the function to succeed. if "block" is missing a flag or has an unneeded flag, validation will fail.
[in] | block | The block to validate. |
[in] | flags | The flags to compare the block against.. |
Bool cinema::RegisterFieldPlugin | ( | Int32 | id, |
const maxon::String & | name, | ||
const maxon::String & | help, | ||
Int32 | info, | ||
DataAllocator * | g, | ||
const maxon::String & | description, | ||
BaseBitmap * | icon, | ||
Int32 | disklevel | ||
) |
Registers a FieldObject plugin
[in] | id | A unique plugin ID. Must be obtained from http://www.plugincafe.com. |
[in] | name | 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] | help | The help displayed on mouse hover over this FieldLayers icon. |
[in] | info | The field plugin info flags: PLUGINFLAG OBJECT PLUGINFLAG |
[in] | g | The allocator for the object plugin. This is a pointer to a function that creates a new instance of FieldData with NewObj(). |
[in] | description | The name of the description resource file to use for the object plugin without .res extension, for example "Fobjectname". The name has to be unique, i.e. "Tdisplay" cannot be used for 2 different descriptions. See Description Resource for more information. |
[in] | icon | The icon for the object. The bitmap is copied. The icon should be of size 32x32, but will be scaled if needed. It must also be 24 bits and should if possible include an alpha to support pattern backgrounds. |
[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 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. |
Bool cinema::RegisterFieldLayerPlugin | ( | Int32 | id, |
const maxon::String & | name, | ||
const maxon::String & | help, | ||
const maxon::String & | pickInstruction, | ||
Int32 | info, | ||
DataAllocator * | g, | ||
const maxon::String & | description, | ||
BaseBitmap * | icon, | ||
Int32 | disklevel, | ||
FieldLayerAcceptDragFunction * | dragFunc = nullptr |
||
) |
Registers a FieldLayer plugin
[in] | id | A unique plugin ID. Must be obtained from http://www.plugincafe.com. |
[in] | name | 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] | help | The help displayed on mouse hover over this FieldLayers icon. |
[in] | pickInstruction | The pick instruction. |
[in] | info | The FieldLayer plugin info flags: FIELDLAYER PLUGINFLAG |
[in] | g | The allocator for the FieldLayer plugin. This is a pointer to a function that creates a new instance of FieldLayerData with NewObj(). |
[in] | description | The name of the description resource file to use for the FieldLayer plugin without .res extension, for example "FLlayername". The name has to be unique, i.e. "Tdisplay" cannot be used for 2 different descriptions. See Description Resource for more information. |
[in] | icon | The icon for the FieldLayer. The bitmap is copied. The icon should be of size 32x32, but will be scaled if needed. It must also be 24 bits and should if possible include an alpha to support pattern backgrounds. |
[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 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] | dragFunc | (Optional) If non-null, the drag function, this is used to determine whether this layer can accept an object type (which will be passed via the SetLinkedObject function) within the FieldList. |
void cinema::GeGetCurrentTime | ( | LocalFileTime * | out | ) |
Gets the current time.
[out] | out | Filled with the current time. The caller owns the pointed file time. |
String cinema::DateToString | ( | const LocalFileTime & | t, |
Bool | date_only | ||
) |
Converts the value of a LocalFileTime into a string.
[in] | t | The file time to convert. |
[in] | date_only | If true only the date part will be converted. |
Shows the file/path in the Finder (Mac) or Explorer (Windows).
[in] | fn | The file/path to show. |
[in] | open | If true the file will be opened by the assigned application. |
maxon::String cinema::ToString | ( | const Filename & | val, |
const maxon::FormatStatement * | formatStatement, | ||
maxon::Bool | checkDatatype = false |
||
) |
maxon::Url cinema::MaxonConvert | ( | const Filename & | fn, |
MAXONCONVERTMODE | convertMode | ||
) |
Filename cinema::MaxonConvert | ( | const maxon::Url & | fn | ) |
Bool cinema::RegisterBitmapLoaderPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
BitmapLoaderData * | dat | ||
) |
Registers a bitmap loader plugin.
[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 plugin info flags: PLUGINFLAG PLUGINFLAG_BITMAPLOADER |
[in] | dat | A data instance for the bitmap loader plugin. Cinema 4D takes over the ownership of the pointed plugin. |
Bool cinema::RegisterBitmapSaverPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
BitmapSaverData * | dat, | ||
const maxon::String & | suffix | ||
) |
Registers a bitmap saver plugin.
[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 plugin info flags: PLUGINFLAG PLUGINFLAG_BITMAPSAVER |
[in] | dat | A data instance for the bitmap saver plugin. Cinema 4D takes over the ownership of the pointed plugin. |
[in] | suffix | The file format suffix. |
Bool cinema::RegisterSceneLoaderPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
DataAllocator * | g, | ||
const maxon::String & | description | ||
) |
Registers a scene loader plugin.
[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 plugin info flags: PLUGINFLAG PLUGINFLAG_SCENELOADER PLUGINFLAG_SCENEFILTER |
[in] | g | The allocator for the scene loader plugin. This is a pointer to a function that creates a new instance of SceneLoaderData with NewObj(). |
[in] | description | The name of the description resource file to use for the track plugin without .res extension, for example "Ffiltername". The name has to be unique, i.e. "Tdisplay" cannot be used for 2 different descriptions. See Description Resource for more information. |
Bool cinema::RegisterSceneSaverPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
DataAllocator * | g, | ||
const maxon::String & | description, | ||
const maxon::String & | suffix | ||
) |
Registers a scene saver plugin.
[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 plugin info flags: PLUGINFLAG PLUGINFLAG_SCENEFILTER |
[in] | g | The allocator for the scene saver plugin. This is a pointer to a function that creates a new instance of SceneSaverData with NewObj(). |
[in] | description | The name of the description resource file to use for the track plugin without .res extension, for example "Ffiltername". The name has to be unique, i.e. "Tdisplay" cannot be used for 2 different descriptions. See Description Resource for more information. |
[in] | suffix | The file format suffix. |
maxon::String cinema::GeGetUserName | ( | ) |
Returns the name of the user registered in the active account.
VERSIONTYPE cinema::GeGetVersionType | ( | ) |
Retrieves the type of Cinema 4D application that is running.
maxon::Result<void> cinema::GetGeneralLicensingInformation | ( | maxon::String & | productId, |
maxon::String & | systemId, | ||
maxon::String & | userId, | ||
maxon::String & | licenseId, | ||
maxon::String & | userName | ||
) |
Returns information about the currently used license and system.
[out] | productId | The product id of the active license. |
[out] | systemId | A unique system identifier. |
[out] | userId | The user id that the active license is assigned with. |
[out] | licenseId | A unique license session identifier. |
[out] | userName | The user / account name that the active license is assigned with. |
maxon::Result<maxon::String> cinema::ExportLicenses | ( | ) |
Returns licensing information as shown in the ExportLicenses menu command including productId, systemId, userId etc.
maxon::Result<void> cinema::AddLicenseItem | ( | const maxon::InternedId & | licenseItemId, |
Float | versionNumber, | ||
Bool | checkOnly, | ||
maxon::CustomLicenseItemDelegate && | licenseUpdateCallback | ||
) |
Private. AddLicenseItem adds extra licenses to query for each license check. This allows to verify extra features bundled with the app.
[in] | licenseItemId | Id to check. |
[in] | versionNumber | Current version number of the feature. '0' if no version number is required. |
[in] | checkOnly | True if the license should only checked for availability. In that case the license will not be consumed and displayed only in error case. |
[in] | licenseUpdateCallback | Callback which will be triggered with each license update for this type. |
maxon::Bool cinema::CheckLicenseFeature | ( | const maxon::InternedId & | featureId | ) |
CheckLicenseFeature queries certain license features. This includes predefined is as well as license items added with AddLicenseItem().
[in] | featureId | Id to check. e.g. ENTITLEMENTFEATURES::ISBETA |
Bool cinema::HasFullFeatureSet | ( | ) |
Determines whether the type of Cinema 4D application has no feature limitations. Certain editions like C4D Lite do not allow for all features.
Bool cinema::IsNet | ( | ) |
Checks if either a NET server or client application is running.
Bool cinema::IsServer | ( | ) |
Checks if a NET server application is running.
Bool cinema::IsClient | ( | ) |
Checks if a NET client application is running.
void cinema::GeShowMouse | ( | Int32 | v | ) |
Sets the type of mouse pointer.
[in] | v | The mouse pointer: MOUSE |
Bool cinema::GeGetScreenDimensions | ( | Int32 | x, |
Int32 | y, | ||
Bool | whole_screen, | ||
Int32 * | sx1, | ||
Int32 * | sy1, | ||
Int32 * | sx2, | ||
Int32 * | sy2 | ||
) |
Retrieves the screen dimensions in pixels.
[in] | x | The screen X coordinates to identify which display information is read (for multi-display setups). |
[in] | y | The screen Y coordinates to identify which display information is read (for multi-display setups). |
[in] | whole_screen | true if dimensions of the whole screen (including task bar etc.) are returned, otherwise false. |
[out] | sx1 | Assigned the minimum X coordinate (left). |
[out] | sy1 | Assigned the minimum Y coordinate (top). |
[out] | sx2 | Assigned the maximum X coordinate (right). |
[out] | sy2 | Assigned the maximum Y coordinate (bottom). |
Int32 cinema::GeGetTimer | ( | ) |
Retrieves the current timer count in milliseconds.
Float64 cinema::GeGetMilliSeconds | ( | ) |
Get the current timer count in milliseconds.
String cinema::GeGetLineEnd | ( | ) |
Retrieves a string that contains the type of line ending characters for the running OS.
Int32 cinema::GeGetDefaultFPS | ( | ) |
Retrieves the default frames per second.
UInt32 cinema::GeGetCinemaInfo | ( | CINEMAINFO | info | ) |
Retrieves information about Cinema 4D's application runtime.
[in] | info | The information type: CINEMAINFO |
GEMB_R cinema::GeOutString | ( | const maxon::String & | str, |
GEMB | flags | ||
) |
OPERATINGSYSTEM cinema::GeGetCurrentOS | ( | ) |
Retrieves the type of OS that is running Cinema 4D.
BYTEORDER cinema::GeGetByteOrder | ( | ) |
Retrieves the byte order for the platform that Cinema 4D is running on.
Retrieves the color values for the default Cinema 4D gray.
[out] | r | Assigned the red component of the gray color. |
[out] | g | Assigned the green component of the gray color. |
[out] | b | Assigned the blue component of the gray color. |
Opens a color chooser dialog for the user to select a color.
[in,out] | col | The initial color for the dialog and assigned the chosen color. |
[in] | flags | Usually 0 or one of the following flags to use the correct color profile for display: DR_COLORFIELD_ICC_BASEDOC or DR_COLORFIELD_ICC_BPTEX. |
Bool cinema::GeChooseColorAlpha | ( | maxon::ColorA * | col, |
Int32 | flags | ||
) |
Opens a color chooser dialog for the user to select a color with alpha.
[in,out] | col | The initial color for the dialog and assigned the chosen color. |
[in] | flags | Usually 0 or one of the following flags to use the correct color profile for display: DR_COLORFIELD_ICC_BASEDOC or DR_COLORFIELD_ICC_BPTEX. |
Bool cinema::GeOpenHTML | ( | const maxon::String & | webaddress | ) |
Opens a URL in the user's default web browser.
[in] | webaddress | The URL to open. |
Bool cinema::GeChooseFont | ( | BaseContainer * | bc | ) |
Opens a font chooser dialog for the user to select a font.
[in] | bc | Assigned the selected font settings. |
void cinema::GeGetGuiFont | ( | maxon::OSFontDefinition & | out | ) |
Internal. Returns the c4d UI font.
void cinema::GeGetMonoFont | ( | maxon::OSFontDefinition & | out | ) |
Internal. Returns the c4d monospaced font.
Bool cinema::GeRegisterPlugin | ( | PLUGINTYPE | type, |
Int32 | id, | ||
const maxon::String & | str, | ||
void * | data, | ||
Int32 | datasize | ||
) |
Deprecated. Use the individual functions for each plugin type instead.
See Plugin Types.
void cinema::GePrint | ( | const maxon::String & | str | ) |
Outputs a string to the Cinema 4D console window. This routine is deprecated - use maxon::Application instead, which has an improved interface.
[in] | str | The string to display in the console window. |
void cinema::GeConsoleOut | ( | const maxon::String & | str | ) |
Outputs a string to the Cinema 4D debug console window.
This reoutine is deprecated - use maxon::DiagnosticOutput instead, which has an improved interface. See Debug Information.
[in] | str | The string to display in the debug console window. |
Retrieves information from a movie file.
[in] | fn | The filename of the movie file to retrieve the information from. |
[out] | frames | Assigned the number of frames. |
[out] | fps | Assigned the number of frames per second. |
Opens a standard rename dialog.
[in,out] | str | The string with the name to change. Assigned the new name. The caller owns the pointed string. |
Int32 cinema::GetC4DVersion | ( | ) |
Retrieves the version of Cinema 4D that is running.
String cinema::GeGetDegreeChar | ( | ) |
Retrieves the degree character (°).
String cinema::GeGetPercentChar | ( | ) |
Retrieves the percent character (%).
void cinema::lSwap | ( | void * | adr, |
Int | cnt = 1 |
||
) |
Swaps the bytes of Int values. (Converting between big endian and little endian.)
[in] | adr | The address of the memory. The caller owns the pointed memory buffer or variable at adr. |
[in] | cnt | The number of elements in the memory buffer at adr (1 for a single element or variable). |
void cinema::wSwap | ( | void * | adr, |
Int | cnt = 1 |
||
) |
Swaps the low and high bytes of UInt values. (Converting between big endian and little endian.)
[in] | adr | The address of the memory. The caller owns the pointed memory buffer or variable at adr. |
[in] | cnt | The number of elements in the memory buffer at adr (1 for a single element or variable). |
void cinema::lIntel | ( | void * | adr, |
Int | cnt = 1 |
||
) |
Convert Int values to Intel format. If already in Intel (i.e on a PC) the values remain unchanged.
[in] | adr | The address of the memory. The caller owns the pointed memory buffer or variable at adr. |
[in] | cnt | The number of elements in the memory buffer at adr (1 for a single element or variable). |
void cinema::wIntel | ( | void * | adr, |
Int | cnt = 1 |
||
) |
Converts UInt values to Intel format. If already in Intel (i.e on a PC) the values remain unchanged.
[in] | adr | The address of the memory. The caller owns the pointed memory buffer or variable at adr. |
[in] | cnt | The number of elements in the memory buffer at adr (1 for a single element or variable). |
void cinema::lMotor | ( | void * | adr, |
Int | cnt = 1 |
||
) |
Converts Int values to Motorola format. If already in Motorola (i.e on a Mac) the values remain unchanged.
[in] | adr | The address of the memory. The caller owns the pointed memory buffer or variable at adr. |
[in] | cnt | The number of elements in the memory buffer at adr (1 for a single element or variable). |
void cinema::wMotor | ( | void * | adr, |
Int | cnt = 1 |
||
) |
Convert UInt values to Motorola format. If already in Motorola (i.e on a Mac) then the values remain unchanged.
[in] | adr | The address of the memory. The caller owns the pointed memory buffer or variable at adr. |
[in] | cnt | The number of elements in the memory buffer at adr (1 for a single element or variable). |
void cinema::llSwap | ( | void * | adr, |
Int | cnt = 1 |
||
) |
Swaps the bytes of Int64 values. (Converting between big endian and little endian.)
[in] | adr | The address of the memory. The caller owns the pointed memory buffer or variable at adr. |
[in] | cnt | The number of elements in the memory buffer at adr (1 for a single element or variable). |
void cinema::llIntel | ( | void * | adr, |
Int | cnt = 1 |
||
) |
Converts Int64 values to Intel format. If already in Intel (i.e on a PC) the values remain unchanged.
[in] | adr | The address of the memory. The caller owns the pointed memory buffer or variable at adr. |
[in] | cnt | The number of elements in the memory buffer at adr (1 for a single element or variable). |
void cinema::llMotor | ( | void * | adr, |
Int | cnt = 1 |
||
) |
Converts Int64 values to Motorola format. If already in Motorola (i.e on a Mac) the values remain unchanged.
[in] | adr | The address of the memory. The caller owns the pointed memory buffer or variable at adr. |
[in] | cnt | The number of elements in the memory buffer at adr (1 for a single element or variable). |
void cinema::GeAddBackgroundHandler | ( | BackgroundHandler * | handler, |
void * | tdata, | ||
Int32 | typeclass, | ||
Int32 | priority | ||
) |
Adds a background handler with the given typeclass and priority. Remove it with GeRemoveBackgroundHandler().
A background handler is a hook that Cinema 4D processes when idle.
The advantage over a regular thread or timer is that it always will be called at a certain position. As a result it will not block other Cinema 4D operations (noticeable slowdown).
Cinema 4D itself uses background handler for example to redraw the view if it was stopped, to render material previews, to update the material preview in AM & MM, to draw the ants in BodyPaint etc.
[in] | handler | The background handler. |
[in] | tdata | The private data. This will be passed on to the handler. |
[in] | typeclass | A unique plugin ID. Must be obtained from http://www.plugincafe.com There can be many handlers with the same class as long as they have different tdata. |
[in] | priority | The handler priority. Higher absolute values are evaluated before lower. A negative value means that it does not block positive priorities. Examples: #define BACKGROUNDHANDLER_PRIORITY_RENDERACTIVEMATERIAL 5000
#define BACKGROUNDHANDLER_PRIORITY_REDRAWVIEW 4000
#define BACKGROUNDHANDLER_PRIORITY_RENDERINACTIVEMATERIALS 3000
#define BACKGROUNDHANDLER_PRIORITY_RENDEREXTERNAL -1000
#define BACKGROUNDHANDLER_PRIORITY_REDRAWANTS -2000
#define BACKGROUNDHANDLER_PRIORITY_PREVIEWCACHE 6000
#define BACKGROUNDHANDLER_PRIORITY_PREVIEWCACHE_ANIMATION 2000
#define BACKGROUNDHANDLER_PRIORITY_PREVIEWCACHE_ASYNC 3500
However, if e.g. an inactive material is being rendered the view will not be redrawn until the other thread finishes. |
Removes background handlers added with GeAddBackgroundHandler().
[in] | tdata | The registered data. |
[in] | typeclass | The registered type class ID. |
Bool cinema::GeStopBackgroundThreads | ( | Int32 | typeclass, |
BACKGROUNDHANDLERFLAGS | flags, | ||
BaseThread * | thread | ||
) |
Stops all running background threads of the given typeclass. If typeclass==0 all threads are stopped.
[in] | typeclass | The type class ID to stop, or 0 for all classes. |
[in] | flags | If typeclass is BACKGROUNDHANDLER_TYPECLASS_C4D then the flags have the following meaning:: BACKGROUNDHANDLERFLAGS For own type classes define flags as needed, they will be routed to the background handler function. For example GeStopBackgroundThreads(BACKGROUNDHANDLER_TYPECLASS_C4D, BACKGROUNDHANDLER_FLAGS_EDITORRENDDER) will only stop the editor renderer (if it was running).GeStopBackgroundThreads(0, BACKGROUNDHANDLERFLAGS::SHUTDOWN) will kill anything running. |
[in] | thread | Optional thread or nullptr. If passed the return value can be false if the thread is stopped while it is trying to acquire the resources for this call. |
Checks if any of the background threads matching typeclass is running. If typeclass==0 all threads are checked.
For example GeCheckBackgroundThreadsRunning(BACKGROUNDHANDLER_TYPECLASS_C4D, true)
checks if Cinema 4D is doing anything right now.
If all=false was passed it would not check for the external renderer and ants (which are always running in a BodyPaint selection).
[in] | typeclass | The type class ID to check, or 0 for all classes. |
[in] | all | If true, negative priorities are also checked. |
void cinema::SetMousePointer | ( | Int32 | l | ) |
Sets the type of mouse pointer.
[in] | l | The mouse pointer: MOUSE |
Displays a bitmap into the Picture Viewer.
[in] | fn | The filename of the bitmap to display. |
Bool cinema::ShowBitmap | ( | BaseBitmap * | bm | ) |
Displays a bitmap into the Picture Viewer.
[in] | bm | The bitmap to display. |
void cinema::StopAllThreads | ( | ) |
Stops all running threads.
void cinema::StopDrawViewsThread | ( | ) |
Stops all draw views thread.
void cinema::StatusClear | ( | ) |
Clears the status bar text.
void cinema::StatusSetSpin | ( | ) |
Sets the status bar progress bar spinning. Needs to be triggered for every spin step.
Use this to indicate that a plugin is still processing even if the progress bar is not increasing.
void cinema::StatusSetBar | ( | Int32 | p | ) |
Sets the status bar progress bar.
[in] | p | The percentage of the progress (0-100). |
void cinema::StatusSetText | ( | const maxon::String & | str | ) |
Sets the status bar text.
[in] | str | The text to display. |
void cinema::StatusNetClear | ( | ) |
Clears the NET status bar text.
void cinema::StatusSetNetLoad | ( | STATUSNETSTATE | status | ) |
Sets the NET status bar to status state.
[in] | status | The NET status state: STATUSNETSTATE |
Sets the NET status bar progress and custom color.
[in] | p | The percentage of the progress (0-100). |
[in] | dat | The color for the NET status bar. Can be a color constant COLOR_BG, COLOR_TEXT, etc. or a color Vector. |
void cinema::StatusSetNetText | ( | const maxon::String & | str | ) |
Sets the NET status bar text.
[in] | str | The text to display. |
Adds a custom event. Results in a CoreMessage()
.
[in] | messageid | The message ID. A unique plugin ID. Must be obtained from http://www.plugincafe.com Use a unique plugin ID to make sure that there is no collision. |
[in] | p1 | The first private data for the sent message. |
[in] | p2 | The second private data for the sent message. |
void cinema::EventAdd | ( | EVENT | eventflag = EVENT::NONE | ) |
Adds a global event to Cinema 4D's event queue. Results in a CoreMessage()
.
[in] | eventflag | The event to add: EVENT |
Sends a synchronous event message (for example to make the Timeline, Timeslider etc. do an instant redraw).
[in] | messageid | The synchronous message to send: EVMSG |
[in] | destid | Private. |
[in] | p1 | Private. |
[in] | p2 | Private. |
Redraws the editor views.
[in] | flags | The draw flags: DRAWFLAGS |
[in] | bd | The view to redraw when DRAWFLAGS::ONLY_BASEDRAW is set in flags. |
Bool cinema::SendModelingCommand | ( | Int32 | command, |
ModelingCommandData & | data | ||
) |
Executes a builtin modelling operation as for example extruding a polygon selection or selecting all points of an object.
Invoking a modelling command requires passing a ModelingCommandData instance which qualifies the command. Not all commands require all fields of the ModelingCommandData to be set, but it is recommended to at least always set the fields op, bc, and doc. When doc
is set, the command operand op
must be part of that document. The commands MCOMMAND_JOIN, MCOMMAND_MAKEEDITABLE, MCOMMAND_CURRENTSTATETOOBJECT, and MCOMMAND_SPLINE_PROJECT always require doc
to be set.
SendModelingCommand
and in cases where a modelling command must be executed outside from the main thread, this must always be done in a dummy document.Example for in-place modifying an object in a loaded document:
Example for modifying an object in a dummy document from a threaded context:
[in] | command | The identifier of the command to execute. See MCOMMAND, ModelingToolsParameters, ModelingToolsNoParameters. |
[in] | data | The data for the command. Can be filled with the result for some commands. |
maxon::Result<TexturePathList> cinema::GetGlobalTexturePaths | ( | const Filename * | docPath | ) |
Retrieves the global texture paths.
[in] | docPath | The path of the document. This will be used to complete relative texture paths. Pass nullptr if you want to get the unmodified paths only. |
maxon::Result<void> cinema::SetGlobalTexturePaths | ( | const TexturePathList & | paths | ) |
Sets the global texture paths.
Bool cinema::GenerateTexturePath | ( | const Filename & | docpath, |
const Filename & | srcname, | ||
const Filename & | suggestedfolder, | ||
Filename * | dstname, | ||
NetRenderService * | service = nullptr , |
||
BaseThread * | bt = nullptr |
||
) |
Generates the texture filename for a given texture image.
[in] | docpath | The filename of the document for the texture. |
[in] | srcname | The filename of the image. |
[in] | suggestedfolder | A suggested folder path for the image. Can be an empty Filename. |
[out] | dstname | Assigned the generated path. |
[in] | service | An optional NET render service for the operation. The caller owns the pointed service. |
[in] | bt | An optional thread for the operation. The caller owns the pointed thread. |
Checks if the texture texfilename is in the search path for files located in docpath.
[in] | texfilename | The texture file name. |
[in] | docpath | The document path. |
void cinema::FlushTexture | ( | const Filename & | docpath, |
const maxon::String & | name, | ||
const Filename & | suggestedfolder | ||
) |
Flushes the given texture.
[in] | docpath | The filename of the document with the texture. |
[in] | name | The name of the texture to flush. |
[in] | suggestedfolder | A suggested folder path for the image. Can be an empty Filename. |
void cinema::FlushUnusedTextures | ( | ) |
Flushes all unused textures.
BaseContainer cinema::GetWorldContainer | ( | ) |
Retrieves the main Cinema 4D settings container.
BaseContainer* cinema::GetWorldContainerInstance | ( | ) |
Retrieves the main Cinema 4D settings container that can be changed directly.
void cinema::GetAdditionalWorldContainerData | ( | BaseContainer & | bc | ) |
Gets additional world container data (see GetWorldContainerInstance).
[out] | bc | A container which receives the data. the container is not cleared before data is written. |
maxon::Result<maxon::BaseArray<maxon::Url> > cinema::GetRecentDocumentsList | ( | Bool | isBodyPaint | ) |
Retrieves the recent documents list.
[in] | isBodyPaint | Set to reteive BodyPaint's list. |
maxon::Id cinema::GetActiveNodeSpaceId | ( | ) |
Returns the active node space. This is a program-wide global UI setting.
void cinema::SaveWorldPreferences | ( | ) |
Saves the main Cinema 4D preferences.
void cinema::SetWorldContainer | ( | const BaseContainer & | bc | ) |
Sets the main Cinema 4D settings container.
See GetWorldContainer() for values.
[in] | bc | The settings container. |
Retrieves a main Cinema 4D color.
[in] | colid | The color ID to get: VIEWCOLOR |
[in] | defaultColor | Pass a valid pointer to get the default color. |
Sets one of the main Cinema 4D colors.
[in] | colid | The color ID to set: VIEWCOLOR |
[in] | col | The new color. |
void cinema::ErrorStringDialog | ( | CHECKVALUERANGE | type, |
Float | x, | ||
Float | y, | ||
CHECKVALUEFORMAT | is | ||
) |
Displays an error dialog for incorrectly entered values.
[in] | type | The check value range type: CHECKVALUERANGE |
[in] | x | The lowest value. |
[in] | y | The highest value. |
[in] | is | The values type: CHECKVALUEFORMAT |
Reads private serial information for a plugin. Cinema 4D will store this data encrypted.
[in] | pluginid | A unique plugin ID. Must be obtained from http://www.plugincafe.com |
[in] | buffer | The buffer to take the data. |
[in] | size | The size of the buffer. This must not exceed 3500. |
[in] | pluginid | A unique plugin ID. Must be obtained from http://www.plugincafe.com |
[in] | buffer | The buffer with the data. |
[in] | size | The size of the buffer. This must not exceed 3500. |
Reads user-specific data (e.g. login data for a user account).
[in] | pluginid | A unique plugin ID. Must be obtained from http://www.plugincafe.com |
[in] | buffer | The data buffer. The caller owns the pointed buffer. |
[in] | size | The buffer size. |
Writes user-specific data (e.g. login data for a user account).
[in] | pluginid | A unique plugin ID. Must be obtained from http://www.plugincafe.com |
[in] | buffer | The data buffer. The caller owns the pointed buffer. |
[in] | size | The buffer size. |
BaseContainer* cinema::GetWorldPluginData | ( | Int32 | id | ) |
Retrieves a container stored with SetWorldPluginData() from the Cinema 4D preferences.
[in] | id | The plugin ID that the container was stored with. |
Bool cinema::SetWorldPluginData | ( | Int32 | id, |
const BaseContainer & | bc, | ||
Bool | add = true |
||
) |
Stores a container in the Cinema 4D preferences.
[in] | id | The plugin ID that the container should be associated with. |
[in] | bc | The container to set. |
[in] | add | If true, the container values are merged with the ones currently stored for the ID. Otherwise the previous values are lost. |
BaseContainer* cinema::GetToolPluginData | ( | BaseDocument * | doc, |
Int32 | id | ||
) |
Retrieves a tool plugin container stored in a document.
[in] | doc | The document. The caller owns the pointed document. |
[in] | id | The tool plugin ID. |
Bool cinema::GeIsActiveToolEnabled | ( | ) |
Checks if the active tool is ghosted.
ToolPlugin* cinema::GetActiveTool | ( | ) |
Gets the active tool. Private.
Bool cinema::GeGetLanguage | ( | Int32 | index, |
maxon::String * | extension, | ||
maxon::String * | name, | ||
Bool * | default_language | ||
) |
Enumerates information about the available languages.
Start with index==0 and then iterate with index++ until the function returns false.
[in] | index | The language index. |
[out] | extension | Assigned the language extension. |
[out] | name | Assigned the human readable language name. |
[out] | default_language | Assigned true if this is the default language, otherwise false. |
Sets the standard suffix of a given bitmap saver plugin.
e.g. if name is "C:\test" and id is 1106 (Photoshop PSD) then the returned Filename will be "C:\test.psd".
[in] | name | The filename. |
[in] | id | The ID of the bitmap saver plugin. |
IDENTIFYFILE cinema::GeIdentifyFile | ( | const Filename & | name, |
UChar * | probe, | ||
Int32 | probesize, | ||
IDENTIFYFILE | recognition, | ||
BasePlugin ** | bp | ||
) |
Identifies the file in name.
[in] | name | The file to check. |
[in] | probe | The start of a small chunk of data from the start of the file for testing this file type. Usually the probe size is 1024 bytes. The caller owns the pointed data. |
[in] | probesize | The size of the probe array. |
[in] | recognition | The identification flags: IDENTIFYFILE |
[in] | bp | For image formats this is filled with a pointer to the image loader that was identified. |
GeListHead* cinema::GetScriptHead | ( | Int32 | type | ) |
Retrieves the list head for scripts (ID_COFFEESCRIPT).
[in] | type | Currently 0 is user scripts and 1 is system scripts. The user scripts are located in library/scripts whereas system scripts are in resource/scripts.) |
Int32 cinema::GetDynamicScriptID | ( | BaseList2D * | bl | ) |
Retrieves the dynamic ID of the ID_COFFEESCRIPT script bl.
Every script gets a dynamic ID when loaded, which is just like a regular plugin ID.
This is necessary in many parts of the program. It is only when loading and saving the scripts that the unique (script) names are used; the ID is created dynamically at loading time.
[in] | bl | The script to get the ID for. The caller owns the pointed script. |
void cinema::SetActiveScriptObject | ( | Int32 | type | ) |
Define the script to be displayed in the Script Manager.
[in] | type | The script ID. Retrieve it with GetDynamicScriptID. |
BaseList2D* cinema::CreateNewPythonScript | ( | String & | name, |
const String & | body | ||
) |
Create a new temporary python script.
[in,out] | name | The script name. Pass an empty string to automatically generated one. |
[in] | body | The script content. |
BaseList2D* cinema::LoadPythonScript | ( | const Filename & | fn | ) |
Load a python script.
[in] | fn | The script name. Pass an empty filename to automatically generated one. |
Bool cinema::GetCommandLineArgs | ( | C4DPL_CommandLineArgs & | args | ) |
Retrieves the command line arguments used to start Cinema 4D in args.
[in] | args | Filled with the command line arguments. |
Retrieves a user presentable name from an object type ID. For example GetObjectName(Onull)
returns "Null".
[in] | type | An object type ID. |
Retrieves a user presentable name from a tag type ID.
[in] | type | A tag type ID. |
Int32 cinema::GetObjectType | ( | const maxon::String & | name | ) |
The inverse of GetObjectName(). Returns an object type from an object name.
[in] | name | An object name. |
Int32 cinema::GetTagType | ( | const maxon::String & | name | ) |
The inverse of GetTagName(). Returns a tag type from a tag name.
[in] | name | A tag name. |
Bool cinema::GeRegistryAdd | ( | Int32 | sub_id, |
REGISTRYTYPE | main_id, | ||
void * | data | ||
) |
Private.
Bool cinema::GeRegistryRemove | ( | Int32 | sub_id, |
REGISTRYTYPE | main_id | ||
) |
Private.
Registry* cinema::GeRegistryFind | ( | Int32 | sub_id, |
REGISTRYTYPE | main_id | ||
) |
Private.
Registry* cinema::GeRegistryGetLast | ( | REGISTRYTYPE | main_id | ) |
Private.
Registry* cinema::GeRegistryGetFirst | ( | REGISTRYTYPE | main_id | ) |
Private.
Sends a plugin message to other plugins. These messages can be received with PluginMessage()
. The message is sent to all plugin modules.
[in] | id | The ID of the message. |
[in] | data | The message data. It is highly recommended as caller to own the pointed object and to not rely on the receiver to take the ownership. |
Bool cinema::CheckIsRunning | ( | CHECKISRUNNING | type | ) |
Checks if a task is running.
[in] | type | The task: CHECKISRUNNING |
Retrieves the default filename for a category.
In the following example the name DEFAULTFILENAME_SHADER_VOLUME is placed in front of the shader name, placing the material in the Shader category:
[in] | id | The category ID: DEFAULTFILENAME_SHADER |
void cinema::FindInManager | ( | BaseList2D * | bl | ) |
Finds and makes bl visible in its manager.
[in] | bl | The object to find. The caller owns the pointed object. |
void cinema::GeSleep | ( | Int32 | milliseconds | ) |
Sleeps for milliseconds ms. Deprecated. Do not use for idle loops. Wait()/GetResult() for condition variables/jobs/threads must be used.
[in] | milliseconds | The time to sleep in milliseconds. |
Bool cinema::GeIsMainThread | ( | ) |
Checks if code is run from within the main thread of Cinema 4D.
Bool cinema::GeIsMainThreadAndNoDrawThread | ( | ) |
Checks if code is run from within the main thread of Cinema 4D and if the main thread does not execute any drawing code currently.
void cinema::GeDebugOut | ( | const Char * | s, |
... | |||
) |
Prints a string to the debug console using vsprintf()
syntax.
MAXON_TARGET_DEBUG
is defined. [in] | s | The string to print. Limited to 2048 characters. Following parameters are format for vsprintf() . |
void cinema::GeDebugOut | ( | const maxon::String & | s | ) |
Prints a string to the debug console.
MAXON_TARGET_DEBUG
is defined. [in] | s | The string to print. Limited to 2048 characters. |
GeData cinema::SendCoreMessage | ( | Int32 | coreid, |
const BaseContainer & | msg, | ||
Int32 | eventid = 0 |
||
) |
Sends a core message.
Examples:
[in] | coreid | The core message ID: COREMSG_CINEMA. |
[in] | msg | The message container: COREMSG |
[in] | eventid | The event ID. |
String cinema::GetMacModel | ( | const maxon::String & | machinemodel | ) |
On a Mac GetMachineFeatures()
.GetString(MACHINEINFO_MACHINEMODEL) returns the model name which is set in the OS like "iMac4,1" or "MacBookPro8,2".
If this string is pass to GetMacModel() a much more human readable string like "iMac Intel Core 2 Duo (aluminum enclosure) (Mid 2007)" or "MacBook Pro Intel Core i5, Intel Core i7, 13 (Early 2011)".
[in] | machinemodel | The machine model returned by GetMachineFeatures() .GetString(MACHINEINFO_MACHINEMODEL). |
BaseContainer cinema::GetMachineFeatures | ( | MACHINEFEATURESTYPE | type = MACHINEFEATURESTYPE::HARDWARE_OGL | ) |
Retrieves the features of the computer.
[in] | type | The machine features type: MACHINEFEATURESTYPE Since R18. |
Bool cinema::GeGetMemoryStat | ( | BaseContainer & | stat | ) |
Retrieves Cinema 4D memory statistics.
[in] | stat | Assigned the memory statistics: C4D_MEMORY_STAT |
Bool cinema::PopupEditText | ( | Int32 | screenx, |
Int32 | screeny, | ||
Int32 | width, | ||
Int32 | height, | ||
const maxon::String & | changeme, | ||
maxon::Delegate< void(POPUPEDITTEXTCALLBACK, maxon::String &)> | func | ||
) |
Opens a small popup window at (screenx, screeny) where the user can edit the changeme string. The result is reported to the func callback.
[in] | screenx | The X screen coordinate of the window. |
[in] | screeny | The Y screen coordinate of the window. |
[in] | width | The width of the window. |
[in] | height | The height of the window. |
[in,out] | changeme | The string to change. |
[in] | func | The callback function. |
void cinema::StartEditorRender | ( | Bool | active_only, |
Bool | raybrush, | ||
Int32 | x1, | ||
Int32 | y1, | ||
Int32 | x2, | ||
Int32 | y2, | ||
BaseThread * | bt, | ||
BaseDraw * | bd, | ||
Bool | newthread | ||
) |
Starts the editor renderer.
[in] | active_only | true for active object only. |
[in] | raybrush | true for ray brush mode. |
[in] | x1 | The X coordinate of the first corner of the render rectangle. |
[in] | y1 | The Y coordinate of the first corner of the render rectangle. |
[in] | x2 | The X coordinate of the second corner of the render rectangle. |
[in] | y2 | The Y coordinate of the second corner of the render rectangle. |
[in] | bt | The thread for the operation. The caller owns the pointed thread. |
[in] | bd | The view to draw to. The caller owns the pointed view. |
[in] | newthread | If true, then the editor render is done asynchronously. In that case pass nullptr for the thread. |
Converts val to a string.
[in] | val | The value to convert to a string. Must be of type Float, Int32 or BaseTime. |
[in] | format | The format: FORMAT_NUMBERS |
[in] | fps | The frames per second, for time values. |
[in] | bUnit | If true the unit is included in the formatted string. |
GeData cinema::StringToNumber | ( | const maxon::String & | text, |
Int32 | format, | ||
Int32 | fps, | ||
const LENGTHUNIT * | lengthunit = nullptr |
||
) |
Converts a string to a data value of type Float or Int32.
[in] | text | The string to convert to a value. |
[in] | format | The format: FORMAT_NUMBERS |
[in] | fps | The frames per second, for time values. |
[in] | lengthunit | Can be used to override the units conversion. By default it will use the document's units. For example a string of "50" will result in 0.5 if the document's units are Meters and the unit display setting is centimeters. If lengthunit is specified its value will be used instead of the document's units setting. |
Executes commands.
[in] | id | The command ID. |
[in] | subid | The sub ID. (Used for scripts.) |
Gets the name of a command.
[in] | id | The command ID. |
Gets the help string of a command.
[in] | id | The ID of the command. |
Checks if a command is enabled.
[in] | id | The ID of the command. |
Checks if a command is checked.
[in] | id | The ID of the command. |
Bool cinema::GetSystemEnvironmentVariable | ( | const maxon::String & | varname, |
maxon::String & | result | ||
) |
Retrieves system environment variables.
[in] | varname | The environment variable name. |
[out] | result | Assigned the retrieved value, if available. |
Bool cinema::AskForAdministratorPrivileges | ( | const maxon::String & | msg, |
const maxon::String & | caption, | ||
Bool | allowsuperuser, | ||
void ** | token | ||
) |
Private.
void cinema::EndAdministratorPrivileges | ( | ) |
Private.
void cinema::RestartApplication | ( | const Utf16Char * | param = nullptr , |
Int32 | exitcode = 0 , |
||
const Utf16Char ** | path = nullptr |
||
) |
Private.
void cinema::SetExitCode | ( | Int32 | exitCode | ) |
Sets the exit code returned by Cinema 4D when it exits.
[in] | exitCode | The exit code. |
void cinema::GeUpdateUI | ( | ) |
Forces a redraw of the GUI, for example after a change of the preferences or Linear Workflow settings.
VIEWPORTTYPE cinema::GeGetActiveViewportType | ( | ) |
Returns the type of viewport that is currently active
Int32 cinema::GetShortcutCount | ( | ) |
Retrieves the global shortcut count.
BaseContainer cinema::GetShortcut | ( | Int32 | index | ) |
Retrieves the shortcut at index.
[in] | index | The shortcut index: 0 <= index < GetShortcutCount() |
Bool cinema::AddShortcut | ( | const BaseContainer & | bc | ) |
Adds the shortcut in bc to the shortcut list.
[in] | bc | The container for the shortcut to add: SHORTCUT |
Removes the shortcut at index.
[in] | index | The shortcut index: 0 <= index < GetShortcutCount() |
Loads shortcuts.
[in] | fn | The file with the shortcuts to load. |
[in] | add | true to add the shortcuts, instead of replacing. |
Save shortcuts.
[in] | fn | The file to save the shortcuts to. |
Finds all shortcuts assigned to a command.
[in] | pluginid | The plugin ID to search for. |
[out] | indexarray | Filled with the found IDs. The caller owns the pointed array. |
[in] | maxarrayelements | The size of indexarray |
Int32 cinema::FindShortcuts | ( | const BaseContainer & | scut, |
Int32 * | idarray, | ||
Int32 | maxarrayelements | ||
) |
Finds all commands that are assigned to a shortcut.
[in] | scut | The shortcut to search for. |
[in] | idarray | Filled with the found IDs. The caller owns the pointed array. |
[in] | maxarrayelements | The size of indexarray. |
Checks if a shortcut key and qualifier are assigned to a command.
[in] | id | The plugin ID of the command. |
[in] | key | The shortcut key. |
[in] | qual | The qualifier key. |
void cinema::InsertCreateObject | ( | BaseDocument * | doc, |
BaseObject * | op, | ||
BaseObject * | activeobj = nullptr |
||
) |
Adds op into document doc.
This function takes care for modifiers to add the new object at a certain place in the hierarchy.
For example if shift is pressed while a new object is created it will be inserted below the active object.
[in] | doc | The current document. |
[in] | op | The object to insert. |
[in] | activeobj | The active object, or nullptr if no object is active. |
void cinema::CopyToClipboard | ( | const maxon::String & | text | ) |
Copies a string to the clipboard.
[in] | text | The string to copy. |
void cinema::CopyToClipboard | ( | BaseBitmap * | map, |
Int32 | ownerid | ||
) |
Copies a bitmap to the clipboard.
[in] | map | The bitmap to copy. The caller owns the pointed bitmap. |
[in] | ownerid | The owner ID: CLIPBOARDOWNER |
Retrieves a string from the clipboard.
[out] | txt | true if a string could be retrieved from the clipboard, otherwise false. |
Bool cinema::GetBitmapFromClipboard | ( | BaseBitmap * | map | ) |
Retrieves a bitmap from the clipboard.
[out] | map | The bitmap to get. The caller owns the pointed bitmap. |
CLIPBOARDTYPE cinema::GetClipboardType | ( | ) |
Retrieves the type of the clipboard.
Int32 cinema::GetC4DClipboardOwner | ( | ) |
Retrieves the owner ID of the clipboard.
const BaseBitmap* cinema::GetCursorBitmap | ( | Int32 | type, |
Int32 & | hotspotx, | ||
Int32 & | hotspoty | ||
) |
Private.
Bool cinema::CodeEditor_Open | ( | BaseList2D * | obj, |
const maxon::Delegate< GeData(BaseList2D *obj, const BaseContainer &msg)> & | callback, | ||
const BaseContainer & | bc = BaseContainer() |
||
) |
Opens the Cinema 4D code editor.
[in] | obj | The object that the source belongs to. The caller owns the pointed object. |
[in] | callback | A callback to set and retrieve the edited source code. The caller owns the pointed callback. |
[in] | bc | The settings for the editor that will be opened: CODEEDITOR |
void cinema::MinimalViewportSettingsCommand | ( | Int32 | type | ) |
Private.
Bool cinema::IsAnimationRunning | ( | const BaseDocument * | document | ) |
Checks if an animation is currently running.
[in] | document | The currently active document. |
Bool cinema::IsUVToolMode | ( | const BaseDocument * | document | ) |
Check if the current context is UV, if UV mode is selected or the UV Texture Editor is the last one used.
[in] | document | The currently active document. |
Gets the format depth for a image saver and depth.
[in] | format | The ID of the image saver. |
[in] | depth | Depth. |
Combines SizePix() and SizeChr() functions. The returned value is interpreted as a number of characters/lines plus a number of pixels.
[in] | pixels | The pixel dimension. |
[in] | chars | The number of characters. |
Bakes a pixel size so that it can be used to specify dialog control dimension.
[in] | pixels | The pixel dimension. |
Bakes a character count so that it can be used to specify dialog control dimension.
Calculates how many characters will fit in a control for widths, and how many standard lines will fit for heights.
[in] | chars | The number of characters. |
void cinema::MessageDialog | ( | const maxon::String & | str | ) |
Opens a standard message dialog with an exclamation point icon and an OK button.
[in] | str | The message to show. |
void cinema::MessageDialog | ( | Int32 | id | ) |
Opens a standard dialog with an exclamation point icon and an OK button.
[in] | id | The message to show, specified as a string ID in the global ::resource object. |
void cinema::MessageDialog | ( | Int32 | id, |
const maxon::String & | p1 | ||
) |
Opens a standard dialog with an exclamation point icon and an OK button.
[in] | id | The message to show, specified as a string ID in the global ::resource object, including one phrase that is inserted at #'s in the string. |
[in] | p1 | The phrase to insert. |
void cinema::MessageDialog | ( | Int32 | id, |
const maxon::String & | p1, | ||
const maxon::String & | p2 | ||
) |
Opens a standard dialog with an exclamation point icon and an OK button.
[in] | id | The message to show, specified as a string ID in the global ::resource object, including two phrases that are inserted at #'s in the string. |
[in] | p1 | The first phrase to insert. |
[in] | p2 | The second phrase to insert. |
Bool cinema::QuestionDialog | ( | const maxon::String & | str | ) |
Opens a standard question dialog with a question mark icon and Yes/No buttons.
[in] | str | The message to show. |
Opens a standard question dialog with a question mark icon and Yes/No buttons.
[in] | id | The message to show, specified as a string ID in the global ::resource object. |
Bool cinema::QuestionDialog | ( | Int32 | id, |
const maxon::String & | p1 | ||
) |
Opens a standard question dialog with a question mark icon and Yes/No buttons.
[in] | id | The message to show, specified as a string ID in the global ::resource object, including one phrase that is inserted at #'s in the string. |
[in] | p1 | The phrase to insert. |
Bool cinema::QuestionDialog | ( | Int32 | id, |
const maxon::String & | p1, | ||
const maxon::String & | p2 | ||
) |
Opens a standard question dialog with a question mark icon and Yes/No buttons.
[in] | id | The message to show, specified as a string ID in the global ::resource object, including two phrases that are inserted at #'s in the string. |
[in] | p1 | The first phrase to insert. |
[in] | p2 | The second phrase to insert. |
Bool cinema::GetInputEvent | ( | Int32 | askdevice, |
BaseContainer & | res | ||
) |
Gets the next input event for a certain device from the event queue.
If the return value is true, the container stored in res is like an input event message, otherwise no state was available.
For a list of valid devices and channels, see Input Events.
[in] | askdevice | The device to poll. |
[in] | res | The result container. |
Bool cinema::GetInputState | ( | Int32 | askdevice, |
Int32 | askchannel, | ||
BaseContainer & | res | ||
) |
Polls a certain channel of a device for the current input state.
If the return value is true, the container stored in res is like an input event message, otherwise no state was available.
For a list of valid devices and channels, see Input Events.
[in] | askdevice | The device to poll. |
[in] | askchannel | The channel of the device. |
[in] | res | The result container. |
Int32 cinema::ShowPopupMenu | ( | CDialog * | cd, |
Int32 | screenx, | ||
Int32 | screeny, | ||
const BaseContainer & | bc, | ||
Int32 | flags = POPUP_RIGHT|POPUP_EXECUTECOMMANDS|POPUP_ALLOW_FILTERING , |
||
Int32 * | res_mainid = nullptr |
||
) |
Displays a popup menu.
The menu is defined by adding string items sequentially to a base container. (The order the items are set in the container determines their order in the menu.)
The ID of the string item determines its function:
[in] | cd | The internal parent dialog, or nullptr. |
[in] | screenx | The popup X position in screen pixels, or MOUSEPOS to popup where the cursor is. |
[in] | screeny | The popup Y position in screen pixels, or MOUSEPOS to popup where the cursor is. |
[in] | bc | The base container with the menu items. |
[in] | flags | The popup menu flags: POPUP |
[in,out] | res_mainid | The main id or nullptr if the id is returned normally by the function. |
Bool cinema::RemoveLastCursorInfo | ( | LASTCURSORINFOFUNC | func | ) |
Sets the callback invoked when mouse cursor leaves a user area.
[in] | func | The last mouse cursor info callback. It should simply send BFM_CURSORINFO_REMOVE to the user area for the mouse leave event. |
Converts a shortcut to a readable string.
[in] | shortqual | The shortcut qualifier. |
[in] | shortkey | The shortcut key. |
String cinema::Shortcut2String | ( | const BaseContainer & | sc | ) |
Converts a shortcut to a readable string.
[in] | sc | The shortcut container. |
Gets a GUI color from its constant ID.
[in] | cid | The color ID. See COLOR constants. |
Converts an icon resource identity string into an ID.
[in] | id | The ID of the icon resource string. |
[in] | ident | The icon resource identity string. Look them up in the resource file for schemes. |
Bool cinema::GetInterfaceIcon | ( | Int32 | type, |
Int32 | id_x, | ||
Int32 | id_y, | ||
Int32 | id_w, | ||
Int32 | id_h, | ||
IconData & | d | ||
) |
Retrieves the icon for an interface element.
[in] | type | The icon type: INTERFACE_ICON_TYPE |
[in] | id_x | The X position ID of the icon. |
[in] | id_y | The Y position ID of the icon. |
[in] | id_w | The width ID of the icon. |
[in] | id_h | The height ID of the icon. |
[out] | d | Assigned the retrieved icon resource data. |
Bool cinema::GeIsTabletMode | ( | ) |
Returns true when the current/preferred input device is a graphic tablet.
Float cinema::GetMouseMoveDelta | ( | ) |
Retrieves the mouse move delta (threshold) depending on the input device.
void cinema::SetBakeStatus | ( | Bool | state | ) |
Private.
Bool cinema::GetBakeStatus | ( | ) |
Private.
Filename cinema::GetDnDFilename | ( | const BaseContainer & | msg, |
Int32 | dragType, | ||
const void * | dragObj, | ||
Bool | texturesOnly, | ||
Bool | updateUsage, | ||
Bool | loadUrl | ||
) |
GetDnDFilename extracts the Filename from the given drag and drop data returned by GetDragObject()
[in] | msg | Drag and Drop message. |
[in] | dragType | Drag type returned by GetDragObject(). |
[in] | dragObj | Drag object returned by GetDragObject(). |
[in] | texturesOnly | True to check for textures only. |
[in] | updateUsage | True to update the usage stats of the asset. |
[in] | loadUrl | True to show a modal progress dialog when files need to be downloaded. |
Bool cinema::InitThinkingParticles | ( | ) |
Must be called before Thinking Particles is used. The best way is to call it in PluginMessage():
Bool cinema::RegisterPluginHelpDelegate | ( | Int32 | pluginId, |
PluginHelpDelegate | delegate | ||
) |
Registers the delegate for plugin help support.
[in] | pluginId | A unique plugin ID. Must be obtained from http://www.plugincafe.com |
[in] | delegate | The help handler for this plugin. |
void cinema::OpenHelpBrowser | ( | const maxon::String & | opType, |
const maxon::String & | baseType, | ||
const maxon::String & | group, | ||
const maxon::String & | property | ||
) |
Opens the help browser for the indicated topic.
[in] | opType | The object type name, for example "OATOM". |
[in] | baseType | The name of the base object type that opType is derived from, usually the same as opType. |
[in] | group | The name of the group in the attribute manager, for example "ID_OBJECTPROPERTIES". |
[in] | property | The name of the object property, for example "ATOMOBJECT_SINGLE". |
Bool cinema::InstallLibrary | ( | Int32 | id, |
C4DLibrary * | lib, | ||
Int32 | version, | ||
Int32 | size | ||
) |
Registers a library with Cinema 4D.
[in] | id | A unique plugin ID. Must be obtained from http://www.plugincafe.com |
[in] | lib | The library structure to register. The caller owns the pointed structure. |
[in] | version | The library version. |
[in] | size | The size of the structure passed to lib. |
Bool cinema::UninstallLibrary | ( | C4DLibrary * | lib, |
Int32 | version, | ||
Int32 | size | ||
) |
Unregisters a library with Cinema 4D.
[in] | lib | The library structure to unregister. The caller owns the pointed structure. |
[in] | version | The library version. |
[in] | size | The size of the structure passed to lib. |
C4DLibrary* cinema::CheckLibI | ( | Int32 | id, |
Int | offset, | ||
C4DLibrary ** | store | ||
) |
MAXON_ATTRIBUTE_FORCE_INLINE LIBCLASS* cinema::CheckLib | ( | Int32 | id, |
Int | offset, | ||
LIBCLASS *& | store | ||
) |
Retrieves a pointer to a library if it is installed.
[in] | id | The library plugin ID. |
[in] | offset | Pass LIBOFFSET(LIBRARY_CLASS, MEMBER_NAME), where LIBRARY_CLASS is a struct derived from C4DLibrary and MEMBER_NAME is a member to access.Example: LIBOFFSET(MyLib, MyFunction) |
[in] | store | Pass a pointer to a global pointer that can be used as cache for the library address. CheckLib() will then use this address instead of looking it up each time. |
Checks if a library is installed.
[in] | id | The plugin ID of the library to check. |
CustomaDataTagLibrary* cinema::CheckCustomaDataTagLibrary | ( | Int32 | offset | ) |
enum cinema::CUSTOMDATATAG_MODE cinema::MAXON_ENUM_LIST | ( | CUSTOMDATATAG_MODE | ) |
Bool cinema::xConvertToPolygons | ( | BaseObject * | oroot, |
BaseObject * | destination, | ||
Int32 | flags | ||
) |
Bool cinema::xConvertToPolygonGroups | ( | BaseObject * | oroot, |
BaseObject * | destination, | ||
Int32 | flags | ||
) |
Bool cinema::xCenterAxis | ( | BaseObject * | oroot | ) |
Bool cinema::xFilterModelSpaceCurves | ( | BaseObject * | oroot | ) |
const Matrix cinema::mswap | ( | Vector(0.0) | , |
Vector(1., 0., 0.) | , | ||
Vector(0., 0., 1.) | , | ||
Vector(0., -1., 0.) | |||
) |
enum cinema::TASKSTATE cinema::MAXON_ENUM_FLAGS | ( | TASKSTATE | ) |
Bool cinema::IsNetRenderInstalled | ( | ) |
NetRenderService* cinema::GetGlobalNetRenderService | ( | ) |
String cinema::GetMachineDescription | ( | const NetRenderService * | service, |
Machine * | m | ||
) |
String cinema::VerificationBitToString | ( | VERIFICATIONBIT | state | ) |
String cinema::JobCommandToString | ( | JOBCOMMAND | command | ) |
MESSAGERESULT cinema::NetSpecialEventAdd | ( | NetRenderService * | service, |
const C4DUuid & | remoteUuid, | ||
const BaseContainer & | msg, | ||
Bool | forceConnect = false |
||
) |
MESSAGERESULT cinema::NetGeSyncMessage | ( | NetRenderService * | service, |
const C4DUuid & | remoteUuid, | ||
const BaseContainer & | msg, | ||
BaseContainer & | result, | ||
BaseThread * | bt = nullptr , |
||
Bool | forceConnect = false |
||
) |
MESSAGERESULT cinema::NetSendData | ( | NetRenderService * | service, |
const C4DUuid & | remoteUuid, | ||
NetRenderBuffer * | data, | ||
NetRenderBuffer * | result, | ||
BaseThread * | bt = nullptr |
||
) |
Bool cinema::NetSendMessageToServer | ( | NetRenderService * | service, |
const C4DUuid & | remoteUuid, | ||
const C4DUuid & | jobUuid, | ||
SERVERMESSAGE | type, | ||
const String & | messageString, | ||
Bool | doConsoleOutput = false , |
||
Int32 | frameNumber = NOTOK |
||
) |
Bool cinema::NetSendMessageToServer | ( | NetRenderService * | service, |
const C4DUuid & | remoteUuid, | ||
const C4DUuid & | jobUuid, | ||
SERVERMESSAGE | type, | ||
RENDERRESULT | res, | ||
const String & | messageString, | ||
Bool | doConsoleOutput = false , |
||
Int32 | frameNumber = NOTOK |
||
) |
Bool cinema::NetRenderCacheGet | ( | NetRenderDocumentContext * | context, |
Bool | isServer, | ||
Int32 | cacheID, | ||
void *& | data, | ||
Int32 & | size | ||
) |
Bool cinema::NetRenderCacheGetTask | ( | NetRenderDocumentContext * | context, |
Bool | isServer, | ||
Int32 | cacheID, | ||
Int32 & | taskID, | ||
Int32 & | taskSubdivisions | ||
) |
Bool cinema::NetRenderCacheSendTask | ( | NetRenderDocumentContext * | context, |
Bool | isServer, | ||
Int32 | cacheID, | ||
Int32 | taskID, | ||
void * | data, | ||
Int32 | size, | ||
Bool | progress | ||
) |
Bool cinema::NetRenderCacheProgress | ( | NetRenderDocumentContext * | context, |
Int32 | cacheID, | ||
Int32 | lastIndex, | ||
void *& | data, | ||
Int32 & | size, | ||
BaseThread * | thread | ||
) |
Bool cinema::NetRenderCachePrepass | ( | NetRenderDocumentContext * | context, |
Int32 | cacheID, | ||
Bool & | completed | ||
) |
Bool cinema::NetRenderGetFileFromServer | ( | NetRenderService * | context, |
const Filename & | sourcePathOrName, | ||
Filename & | result, | ||
BaseThread * | bt = nullptr |
||
) |
maxon::Result<void> cinema::NetRenderGetAssetFromServer | ( | NetRenderService * | service, |
const Filename & | sourcePathOrName, | ||
Filename & | result, | ||
SERVERMESSAGE | raiseServerMessageIfNotFound, | ||
maxon::ThreadInterface * | bt = nullptr |
||
) |
void* cinema::_ReturnString | ( | const maxon::String & | v | ) |
Internal.
Bool cinema::RegisterMaterialPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
DataAllocator * | g, | ||
const maxon::String & | description, | ||
Int32 | disklevel | ||
) |
Registers a material plugin.
[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 node plugin info flags: PLUGINFLAG_MATERIAL PLUGINFLAG |
[in] | g | The allocator for the material plugin. This is a pointer to a function that creates a new instance of MaterialData with NewObj(). |
[in] | description | The name of the description resource file to use for the material plugin without .res extension, for example "Mmaterialname". The name has to be unique, i.e. "Tdisplay" cannot be used for 2 different descriptions. See Description 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 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. |
UInt cinema::GeMemGetFreePhysicalMemoryEstimate | ( | ) |
Gets estimated free physical memory.
Clears a block of memory.
[in] | d | Address of the memory block to clear. The caller owns the pointed memory. |
[in] | size | Size in bytes of the block of memory to clear. |
[in] | value | Value to clear the memory block with. Default to 0. |
void cinema::CopyMem | ( | const void * | s, |
void * | d, | ||
Int | size | ||
) |
Copies a block of memory.
memcpy()
[in] | s | Address of the source block of memory. The caller owns the pointed memory. |
[out] | d | Address of the destination block of memory. The caller owns the pointed memory. |
[in] | size | Size in bytes of the block of memory to copy. |
void cinema::MemCopy | ( | void * | d, |
const void * | s, | ||
Int | size | ||
) |
Copies a block of memory.
[out] | d | Address of the destination block of memory. The caller owns the pointed memory. |
[in] | s | Address of the source block of memory. The caller owns the pointed memory. |
[in] | size | Size in bytes of the block of memory to copy. |
Internal.
void cinema::ClearMemType | ( | T * | data_ptr, |
Int | cnt | ||
) |
Clears a block of memory.
THREADSAFE.
[out] | data_ptr | Address of the block of memory to clear. The caller owns the pointed memory. |
[in] | cnt | Number of elements to be filled with pattern (> 1 e.g. for arrays), can be 0. |
void cinema::CopyMemType | ( | const T * | src_ptr, |
T * | dst_ptr, | ||
Int | cnt | ||
) |
Copies a block of memory to another of the same kind.
THREADSAFE
[in] | src_ptr | Address of the source block of memory to copy. The caller owns the pointed memory. |
[out] | dst_ptr | Address of the destination block of memory to copy to. The caller owns the pointed memory. |
[in] | cnt | Number of elements to be copied (> 1 e.g. for arrays), can be 0. |
Bool cinema::RegisterMessagePlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
MessageData * | dat | ||
) |
Registers a message plugin.
[in] | id | A unique plugin ID. Must be obtained from http://www.plugincafe.com |
[in] | str | The name of the plugin. |
[in] | info | The info flags: PLUGINFLAG_MESSAGE PLUGINFLAG |
[in] | dat | The message data instance for the plugin. Cinema 4D takes over the ownership of the pointed message data. |
enum cinema::MTBODYPARTTRANSFERATTRIBUTEMODE Int32 cinema::MAXON_ENUM_LIST | ( | MTBODYPARTTRANSFERATTRIBUTEMODE | ) |
Bool cinema::WriteIpAddr | ( | const NetworkIpAddr & | addr, |
HyperFile * | hf | ||
) |
Bool cinema::ReadIpAddr | ( | NetworkIpAddr & | addr, |
HyperFile * | hf | ||
) |
Bool cinema::WriteIpAddrPort | ( | const NetworkIpAddrPort & | addr, |
HyperFile * | hf | ||
) |
Bool cinema::ReadIpAddrPort | ( | NetworkIpAddrPort & | addr, |
HyperFile * | hf | ||
) |
NetworkIpConnection* cinema::OpenOutgoing | ( | const NetworkIpAddrPort & | adr, |
BaseThread * | thread = nullptr , |
||
Int | connectTimeout = 30 , |
||
Int | sessionTimeout = 10 , |
||
Bool | useNagleAlgorithm = true , |
||
Int * | error = nullptr |
||
) |
Opens a connection. Supports IPv4.
[in] | adr | The destination address to connect to. |
[in] | thread | The thread to use for the connection. The caller owns the pointed thread. |
[in] | connectTimeout | The timeout in seconds for the initial connection. |
[in] | sessionTimeout | The timeout in seconds for receive and send operations. |
[in] | useNagleAlgorithm | Pass true to set the TCP/IP flag for TCP_NODELAY. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ms740476(v=vs.85).aspx. |
[in] | error | Assigned error status if the connection failed. A value different than 0 indicates failure. |
NetworkIpConnection* cinema::OpenOutgoing | ( | const maxon::String & | adr, |
BaseThread * | thread = nullptr , |
||
Int | connectTimeout = 30 , |
||
Int | sessionTimeout = 10 , |
||
Bool | useNagleAlgorithm = true , |
||
Int * | error = nullptr |
||
) |
Opens a connection. Supports IPv4.
[in] | adr | The destination address to connect to (IPv4 address or host name). |
[in] | thread | The thread to use for the connection. The caller owns the pointed thread. |
[in] | connectTimeout | The timeout in seconds for the initial connection. |
[in] | sessionTimeout | The timeout in seconds for receive and send operations. |
[in] | useNagleAlgorithm | Pass true to set the TCP/IP flag for TCP_NODELAY. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ms740476(v=vs.85).aspx. |
[in] | error | Assigned error status if the connection failed. A value different than 0 indicates failure. |
Int cinema::BytesInInputBuffer | ( | NetworkIpConnection * | ipc | ) |
Checks how many bytes are in the input buffer of an IP connection.
[in] | ipc | The IP connection to check. The caller owns the pointed NetworkIpConnection. |
Int cinema::RecvBytes | ( | NetworkIpConnection * | ipc, |
void * | buf, | ||
Int | size | ||
) |
Reads the bytes from the IP connection ipc to buf.
[in] | ipc | The IP connection to read from. The caller owns the pointed NetworkIpConnection. |
[in] | buf | The buffer to read to. The caller owns the pointed buffer. |
[in] | size | The size of the buffer buf. |
Int cinema::SendBytes | ( | NetworkIpConnection * | ipc, |
const void * | buf, | ||
Int | size | ||
) |
Sends the bytes from buf to the IP connection ipc.
[in] | ipc | The IP connection to send the bytes to. The caller owns the pointed NetworkIpConnection. |
[in] | buf | The buffer to send from. The caller owns the pointed buffer. |
[in] | size | The size of the buffer buf. |
NetworkIpConnection* cinema::OpenListener | ( | const NetworkIpAddrPort & | adr, |
BaseThread * | thread, | ||
Int | sessionTimeout, | ||
Bool | dontwait, | ||
Int * | error | ||
) |
Opens an IP listener.
[in] | adr | The IP address of the network interface to use for the listener. |
[in] | thread | The thread to use for the connection. The caller owns the pointed thread. |
[in] | sessionTimeout | The time after which the listener closes an unresponsive connection. |
[in] | dontwait | Pass true to set the TCP/IP flag for TCP_NODELAY. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ms740476(v=vs.85).aspx. |
[in] | error | Assigned error status if the connection failed. A value different than 0 indicates failure. |
NetworkIpConnection* cinema::OpenListener | ( | const maxon::String & | adr, |
BaseThread * | thread, | ||
Int | sessionTimeout, | ||
Bool | useNagleAlgorithm, | ||
Int * | error | ||
) |
Opens an IP listener.
[in] | adr | The IP address of the network interface to use for the listener. |
[in] | thread | The thread to use for the connection. The caller owns the pointed thread. |
[in] | sessionTimeout | The time after which the listener closes an unresponsive connection. |
[in] | useNagleAlgorithm | Pass true to set the TCP/IP flag for TCP_NODELAY. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ms740476(v=vs.85).aspx. |
[in] | error | Assigned error status if the connection failed. A value different than 0 indicates failure. |
NetworkIpConnection* cinema::OpenWaitForIncoming | ( | NetworkIpConnection * | listener, |
BaseThread * | connection, | ||
Int * | error | ||
) |
Waits for an incoming connection to listener.
[in] | listener | The listener IP connection to wait for. Needs to be freed with GeIpCloseConnection(). The caller owns the pointed NetworkIpConnection. |
[in] | connection | The thread to use for the connection. The caller owns the pointed thread. |
[in] | error | Assigned error status if the connection failed. A value different than 0 indicates failure. |
void cinema::KillConnection | ( | NetworkIpConnection *& | ipc | ) |
Kills an IP connection.
[in] | ipc | The IP connection to kill. The caller owns the pointed NetworkIpConnection. |
void cinema::CloseConnection | ( | NetworkIpConnection *& | ipc | ) |
Closes and frees an IP connection.
[in] | ipc | The IP connection to close. Assigned nullptr afterward. The caller owns the pointed NetworkIpConnection. |
void cinema::FillNodePlugin | ( | NODEPLUGIN * | np, |
Int32 | info, | ||
DataAllocator * | g, | ||
BaseBitmap * | icon, | ||
Int32 | disklevel | ||
) |
Private.
Bool cinema::RegisterNodePlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
DataAllocator * | g, | ||
BaseBitmap * | icon, | ||
Int32 | disklevel, | ||
Int32 * | fallback | ||
) |
Registers a node plugin.
[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 node plugin info flags: PLUGINFLAG |
[in] | g | The allocator for the node plugin. This is a pointer to a function that creates a new instance of NodeData with NewObj(). |
[in] | icon | The icon for the node. The bitmap is copied. The icon should be of size 32x32, but will be scaled if needed. It must also be 24 bits and should if possible include an alpha to support pattern backgrounds. |
[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 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] | fallback | Private. |
Bool cinema::RegisterObjectPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
DataAllocator * | g, | ||
const maxon::String & | description, | ||
BaseBitmap * | icon, | ||
Int32 | disklevel | ||
) |
Registers an object plugin.
[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 object plugin info flags: OBJECT PLUGINFLAG |
[in] | g | The allocator for the object plugin. This is a pointer to a function that creates a new instance of ObjectData with NewObj(). |
[in] | description | The name of the description resource file to use for the object plugin without .res extension, for example "Oobjectname". The name has to be unique, i.e. "Tdisplay" cannot be used for 2 different descriptions. See Description Resource for more information. |
[in] | icon | The icon for the object. The bitmap is copied. The icon should be of size 32x32, but will be scaled if needed. It must also be 24 bits and should if possible include an alpha to support pattern backgrounds. |
[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 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. |
Bool cinema::RegisterObjectPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
DataAllocator * | g, | ||
const maxon::String & | description, | ||
BaseBitmap * | icon, | ||
Int32 | disklevel, | ||
OBJECTCATEGORY | category | ||
) |
Registers an object plugin.
[in] | id | A unique plugin ID. Must be obtained from http://www.plugincafe.com |
[in] | info | The object plugin info flags: OBJECT PLUGINFLAG |
[in] | g | The allocator for the object plugin. This is a pointer to a function that creates a new instance of ObjectData with NewObj(). |
[in] | description | The name of the description resource file to use for the object plugin without .res extension, for example "Oobjectname". The name has to be unique, i.e. "Tdisplay" cannot be used for 2 different descriptions. See Description Resource for more information. |
[in] | icon | The icon for the object. The bitmap is copied. The icon should be of size 32x32, but will be scaled if needed. It must also be 24 bits and should if possible include an alpha to support pattern backgrounds. |
[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 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] | category | Allow to define the object's category. The object's category will affect how the object is displayed or selectable when changing the display or the selection filter. |
void cinema::FillObjectPlugin | ( | OBJECTPLUGIN * | np, |
DataAllocator * | npalloc, | ||
Int32 | info, | ||
Int32 | disklevel, | ||
BaseBitmap * | icon | ||
) |
void* cinema::SendPainterCommand | ( | Int32 | command, |
BaseDocument * | doc, | ||
PaintTexture * | tex, | ||
BaseContainer * | bc | ||
) |
TempUVHandle* cinema::GetActiveUVSet | ( | BaseDocument * | doc, |
Int32 | flags | ||
) |
Retrieves the document's active UV set.
[in] | doc | The document returning the active UV set. |
[in] | flags | The flags: GETACTIVEUVSET |
Updates the mesh based on the UVW result of interactive unwrapping.
void cinema::FreeActiveUVSet | ( | TempUVHandle * | handle | ) |
Frees the active UV set.
[in] | handle | The temporary handle of the UV set to be freed. |
const EdgeBaseSelect* cinema::GetUVSeams | ( | const BaseObject * | obj | ) |
Deprecated. Use GetUVSeams2(obj, true) to have the same behavior as before, but most of the time you want the "checkUVSettings" parameter to be false. Gets the UV seam edges for obj.
The edges are indexed by 4 * polygon + edge
where polygon
is the polygon index and edge
is the edge index between 0 and 3.
[in] | obj | The object of the UV set. |
const EdgeBaseSelect* cinema::GetUVSeams2 | ( | const BaseObject * | obj, |
Bool | checkUVSettings = false |
||
) |
Gets the UV seam edges for obj.
The edges are indexed by 4 * polygon + edge
where polygon
is the polygon index and edge
is the edge index between 0 and 3.
[in] | obj | The object of the UV set. |
[in] | checkUVSettings | If true and the UV seams are disabled in the UV viewport, nullptr will be return. If false, will always return the UV seams, without checking if the UV seams settings is enabled or not in the UV viewport. |
Bool cinema::CallUVCommand | ( | const Vector * | padr, |
Int32 | PointCount, | ||
const CPolygon * | polys, | ||
Int32 | lPolyCount, | ||
UVWStruct * | uvw, | ||
BaseSelect * | polyselection, | ||
BaseSelect * | pointselection, | ||
BaseObject * | op, | ||
Int32 | mode, | ||
Int32 | cmdid, | ||
const BaseContainer & | settings | ||
) |
Calls UV commands.
Example:
[in] | padr | The address of the points array. |
[in] | PointCount | The number of points in padr array. |
[in] | polys | The address of the polygons array. |
[in] | lPolyCount | The number of polygons in polys array. |
[in] | uvw | The address of the UV array. |
[in] | polyselection | The polygon selection. |
[in] | pointselection | The UV points selection. The points are indexed by 4 * polygon + point where polygon is the polygon index and point is the point index between 0 and 3. |
[in] | op | The object of the UV set. |
[in] | mode | The UV editing mode: EditorModes |
[in] | cmdid | The UV command: UVCOMMAND |
[in] | settings | The optional settings for the UV command. |
Identifies an image's file format.
[in] | texpath | The texture's file path. |
Bool cinema::BPSetupWizardWithParameters | ( | BaseDocument * | doc, |
const BaseContainer & | settings, | ||
AtomArray & | objects, | ||
AtomArray & | material | ||
) |
Runs BodyPaint paint wizard.
[in] | doc | The document. |
[in] | settings | The settings for the paint wizard: AMSI |
[in] | objects | An array with the objects the paint wizard is using. |
[in] | material | An array with the materials the paint wizard is using. |
Bool cinema::CalculateTextureSize | ( | BaseDocument * | doc, |
AtomArray & | materials, | ||
TextureSize *& | sizes | ||
) |
Calculates the texture size based on the geometry and the size of the UV polygons.
[in] | doc | The document. |
[in] | materials | An array containing the materials the texture size calculation is applied to. |
[in] | sizes | An array with the texture sizes, equals the number of materials. Must be freed with DeleteMem. |
Bool cinema::GetAllStrings_AddTexture | ( | const void * | msgdata, |
const BaseContainer & | d | ||
) |
Private.
Activates/deactivates paint channels.
[in] | channel | The paint channel: CHANNEL |
[in] | multi | true for multi channel painting, false for single channel painting. |
[in] | enable | true to activate the paint channel, false to deactivate the paint channel. |
PaintTexture* cinema::PainterCreateNewTextureDialog | ( | String & | result, |
Filename & | resultdirectory, | ||
Int32 | channelid, | ||
BaseMaterial * | bmat | ||
) |
Opens the texture creation dialog for a material.
[out] | result | Filled with the texture's name (e.g. the filename). |
[out] | resultdirectory | The directory of the texture. |
[in] | channelid | The channel type: CHANNEL |
[in] | bmat | The material of the texture. |
maxon::Result<maxon::DrawportTextureInterface*> cinema::PainterGetBrush | ( | BaseDraw * | bd, |
PaintBrushData & | brushData | ||
) |
Calculates a particle matrix.
This represents the position and direction of a particle as used when objects are aligned with a particle using the emitter Tangential option.
[in] | cp | The particle to get the matrix for. The caller owns the pointed particle. |
Bool cinema::PluginStart | ( | ) |
Called when a plugin is loaded from Cinema 4D. Think of it as the equivalent to the usual main()
function.
Here register all the plugin types and initialize them.
For example, the basics needed are:
void cinema::PluginEnd | ( | ) |
Called when the plugin is unloaded from Cinema 4D.
Here free the plugin registrations and any resources which are not owned or already freed by other plugins (see PluginMessage()).
To free complex structures from other modules see C4DPL_ENDACTIVITY::
For example:
Called to receive plugin messages.
These can either be from Cinema 4D or from other plugins via GePluginMessage(). Here is an example:
[in] | id | The message ID. Built-in ones are: C4DPL_MESSAGES |
[in] | data | The message data. |
Calculates Euler angles from matrix m.
[in] | m | The rotation matrix. |
A double precision version of HPBToMatrix().
[in] | w | The HPB. |
Loads a string from the plugins global resource file.
[in] | id | The ID of the string to get. |
String cinema::GeLoadString | ( | Int32 | id, |
const maxon::String & | p1 | ||
) |
Loads a string and replace the '#' with the placeholder string.
[in] | id | The ID of the string to get. |
[in] | p1 | The string to insert into the placeholder. |
String cinema::GeLoadString | ( | Int32 | id, |
const maxon::String & | p1, | ||
const maxon::String & | p2 | ||
) |
Loads a string and replace the '#' placeholders with the appropriate string.
[in] | id | The ID of the string to get. |
[in] | p1 | The string to insert into the first placeholder. |
[in] | p2 | The string to insert into the second placeholder. |
String cinema::GeLoadString | ( | Int32 | id, |
const maxon::String & | p1, | ||
const maxon::String & | p2, | ||
const maxon::String & | p3 | ||
) |
Loads a string and replace the '#' placeholders with the appropriate string.
[in] | id | The ID of the string to get. |
[in] | p1 | The string to insert into the first placeholder. |
[in] | p2 | The string to insert into the second placeholder. |
[in] | p3 | The string to insert into the third placeholder. |
String cinema::GeLoadString | ( | Int32 | id, |
const maxon::String & | p1, | ||
const maxon::String & | p2, | ||
const maxon::String & | p3, | ||
const maxon::String & | p4 | ||
) |
Loads a string and replace the '#' placeholders with the appropriate string.
[in] | id | The ID of the string to get. |
[in] | p1 | The string to insert into the first placeholder. |
[in] | p2 | The string to insert into the second placeholder. |
[in] | p3 | The string to insert into the third placeholder. |
[in] | p4 | The string to insert into the fourth placeholder. |
String cinema::GeLoadString | ( | Int32 | id, |
const maxon::String & | p1, | ||
const maxon::String & | p2, | ||
const maxon::String & | p3, | ||
const maxon::String & | p4, | ||
const maxon::String & | p5 | ||
) |
Loads a string and replace the '#' placeholders with the appropriate string.
[in] | id | The ID of the string to get. |
[in] | p1 | The string to insert into the first placeholder. |
[in] | p2 | The string to insert into the second placeholder. |
[in] | p3 | The string to insert into the third placeholder. |
[in] | p4 | The string to insert into the fourth placeholder. |
[in] | p5 | The string to insert into the fifth placeholder. |
Bool cinema::RegisterDescription | ( | Int32 | id, |
const maxon::String & | idstr, | ||
LocalResource * | res = nullptr |
||
) |
Registers a description for a plugin ID. This is not needed for plugin types whose Register()
functions have a description
parameter.
[in] | id | The plugin ID. If this is a standalone description, use a unique ID. |
[in] | idstr | The name of the description resource file to use for the plugin without .res extension, for example "registered". The name has to be unique, i.e. "Tdisplay" cannot be used for 2 different descriptions. See Description Resource for more information. |
[in] | res | Pass this to search in a specific resource class. Otherwise the default path is used. |
BaseContainer* cinema::GetMenuResource | ( | const maxon::String & | menuname | ) |
Gets the menu container of a main menu.
[in] | menuname | The main menu name, e.g. "M_EDITOR" (the same name as on disk or that can be seen in the Menu Editor). |
Bool cinema::SearchMenuResource | ( | const BaseContainer * | bc, |
const maxon::String & | searchstr | ||
) |
Searches a menu container for a certain plugin command (which is a string identifier, for example "PLUGIN_CMD_1000472").
[in] | bc | The menu container to search. The caller owns the pointed container. |
[in] | searchstr | The search string. |
const GeData* cinema::SearchPluginMenuResource | ( | const maxon::String & | identifier = "IDS_EDITOR_PIPELINE"_s | ) |
Searches for the "Extensions" main menu category in "M_EDITOR".
[in] | identifier | The menu identifier. |
const GeData* cinema::SearchPluginSubMenuResource | ( | const maxon::String & | identifier = "IDS_EDITOR_PIPELINE"_s , |
BaseContainer * | bc = nullptr |
||
) |
Searches for the "Extensions" main menu category in "M_EDITOR" or optionally a sub-menu specified by bc.
[in] | identifier | The menu identifier. |
[in] | bc | The sub-menu container. |
void cinema::UpdateMenus | ( | ) |
Forces a menu update.
void cinema::FreeResource | ( | ) |
Private.
Bool cinema::RegisterSceneHookPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
DataAllocator * | g, | ||
Int32 | priority, | ||
Int32 | disklevel | ||
) |
Registers a scene hook plugin.
[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 scene hook plugin info flags: PLUGINFLAG_SCENEHOOK PLUGINFLAG |
[in] | g | The allocator for the scene hook plugin. This is a pointer to a function that creates a new instance of SceneHookData with NewObj(). |
[in] | priority | The interaction priority (Draw/MouseInput/KeyboardInput/GetCursorInfo). |
[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 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. |
Inserts channel information into the texture flags.
[in] | texflag | The texture flags. |
[in] | channel | The texture channel: CHANNEL |
Inserts channel and bump sample information into the texture flags.
[in] | texflag | The texture flags. |
[in] | channel | The texture channel: CHANNEL |
[in] | sample | The bump sample:
|
Vector64 cinema::BasicTransformColor | ( | const Vector64 & | input, |
COLORSPACETRANSFORMATION | colortransformation | ||
) |
Transforms a color along one of the basic transformation paths independent of the OCIO settings of a document.
Supported are LINEAR_TO_VIEW
, SRGB_TO_VIEW
, LINEAR_TO_SRGB
, and SRGB_TO_LINEAR
of COLORSPACETRANSFORMATION
. To convert along any other paths, one must retrieve an OcioConverter
using BaseDocument::GetBasicColorConverter
or BaseDocument::GetColorConverterForActiveDocument
.
[in] | input | The color to transform. |
[in] | colortransformation | The transform path to transform #input along. |
maxon::Color64 cinema::BasicTransformColor | ( | const maxon::Color64 & | input, |
COLORSPACETRANSFORMATION | colortransformation | ||
) |
Transforms a color along one of the basic transformation paths independent of the OCIO settings of a document.
Supported are LINEAR_TO_VIEW
, SRGB_TO_VIEW
, LINEAR_TO_SRGB
, and SRGB_TO_LINEAR
of COLORSPACETRANSFORMATION
. To convert along any other paths, one must retrieve an OcioConverter
using BaseDocument::GetBasicColorConverter
or BaseDocument::GetColorConverterForActiveDocument
.
[in] | input | The color to transform. |
[in] | colortransformation | The transform path to transform #input along. |
maxon::Color32 cinema::BasicTransformColor | ( | const maxon::Color32 & | input, |
COLORSPACETRANSFORMATION | colortransformation | ||
) |
Transforms a color along one of the basic transformation paths independent of the OCIO settings of a document.
Supported are LINEAR_TO_VIEW
, SRGB_TO_VIEW
, LINEAR_TO_SRGB
, and SRGB_TO_LINEAR
of COLORSPACETRANSFORMATION
. To convert along any other paths, one must retrieve an OcioConverter
using BaseDocument::GetBasicColorConverter
or BaseDocument::GetColorConverterForActiveDocument
.
[in] | input | The color to transform. |
[in] | colortransformation | The transform path to transform #input along. |
void cinema::BasicTransformColors | ( | Vector64 * | v, |
Int | count, | ||
COLORSPACETRANSFORMATION | colorSpaceTransformation | ||
) |
Transforms an array of colors along one of the basic transformation paths independent of the OCIO settings of a document.
Supported are LINEAR_TO_VIEW
, SRGB_TO_VIEW
, LINEAR_TO_SRGB
, and SRGB_TO_LINEAR
of COLORSPACETRANSFORMATION
. To convert along any other paths, one must retrieve an OcioConverter
using BaseDocument::GetBasicColorConverter
or BaseDocument::GetColorConverterForActiveDocument
.
[in] | v | The color array to transform. |
[in] | count | Number of elements to transform. |
[in] | colorSpaceTransformation | The transform path to transform elements in v along. |
Bool cinema::RegisterShaderPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
DataAllocator * | g, | ||
const maxon::String & | description, | ||
Int32 | disklevel | ||
) |
Registers a shader plugin.
[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 node plugin info flags: PLUGINFLAG_MATERIAL PLUGINFLAG |
[in] | g | The allocator for the shader plugin. This is a pointer to a function that creates a new instance of ShaderData with NewObj(). |
[in] | description | The name of the description resource file to use for the material plugin without .res extension, for example "Xshadername". The name has to be unique, i.e. "Tdisplay" cannot be used for 2 different descriptions. See Description 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 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. |
maxon::String cinema::ToString | ( | const String & | val, |
const maxon::FormatStatement * | formatStatement, | ||
maxon::Bool | checkDatatype = false |
||
) |
const String & MaxonConvert | ( | const maxon::String & | val | ) |
String MaxonConvert | ( | maxon::String && | val | ) |
const maxon::String & MaxonConvert | ( | const String & | val | ) |
maxon::String MaxonConvert | ( | String && | val | ) |
Checks if the strings are equal. Deprecated. Use maxon::String::Compare(...).
[in] | left | The left-hand operand string. |
[in] | right | The right-hand operand string. |
Bool cinema::operator== | ( | const String & | left, |
const maxon::String & | right | ||
) |
Bool cinema::operator== | ( | const maxon::String & | left, |
const String & | right | ||
) |
Checks if two strings are different. Deprecated. Use maxon::String::Compare(...).
[in] | left | The left-hand operand string. |
[in] | right | The right-hand operand string. |
Bool cinema::operator!= | ( | const String & | left, |
const maxon::String & | right | ||
) |
Bool cinema::operator!= | ( | const maxon::String & | left, |
const String & | right | ||
) |
Compares the strings to see if the the left-hand string is less than the right-hand string. Deprecated. Use maxon::String::Compare(...).
[in] | left | The left-hand operand string. |
[in] | right | The right-hand operand string. |
Bool cinema::RegisterTagPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
DataAllocator * | g, | ||
const maxon::String & | description, | ||
BaseBitmap * | icon, | ||
Int32 | disklevel | ||
) |
Registers a tag plugin.
[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 node plugin info flags: TAG PLUGINFLAG |
[in] | g | The allocator for the tag plugin. This is a pointer to a function that creates a new instance of TagData with NewObj(). |
[in] | description | The name of the description resource file to use for the material plugin without .res extension, for example "Ttagname". The name has to be unique, i.e. "Tdisplay" cannot be used for 2 different descriptions. See Description Resource for more information. |
[in] | icon | The icon for the tag. The bitmap is copied. The icon should be of size 32x32, but will be scaled if needed. It must also be 24 bits and should if possible include an alpha to support pattern backgrounds. |
[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 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. |
void cinema::FillTagPlugin | ( | TAGPLUGIN * | np, |
DataAllocator * | npalloc, | ||
Int32 | info, | ||
Int32 | disklevel, | ||
BaseBitmap * | icon | ||
) |
Int32 cinema::GeGetCurrentThreadCount | ( | ) |
Retrieves the number of threads being used for the current (render) context.
void cinema::GeThreadLock | ( | ) |
A global semaphore. When this is locked, any other thread trying to acquire the lock will have to wait. Other threads will continue. Deprecated.
void cinema::GeThreadUnlock | ( | ) |
Continues blocked threads after a call to GeThreadLock(). Deprecated.
THREADTYPE cinema::IdentifyThread | ( | BaseThread * | bt | ) |
Identifies the type of a thread.
[in] | bt | The thread to identify. The caller owns the pointed thread. |
UInt32 cinema::GeGetCurrentThreadId | ( | ) |
Retrieves a unique ID for the current thread.
BaseThread* cinema::GeGetCurrentThread | ( | ) |
Retrieves the current thread.
BaseThread* cinema::GeGetDummyThread | ( | ) |
Returns a dummy thread (TestBreak() will always return false).
BaseThread* cinema::GeGetEscTestThread | ( | ) |
Returns a dummy thread for escape key testing (TestBreak() will return true, when the user presses the Esc key).
maxon::ThreadRef cinema::MaxonConvert | ( | BaseThread * | thread | ) |
BaseThread* cinema::MaxonConvert | ( | const maxon::ThreadRef & | thread | ) |
BaseThread* cinema::MaxonConvert | ( | const maxon::ThreadInterface * | thread | ) |
enum cinema::VERTEXCOLOR_DISPLAYMODE cinema::MAXON_ENUM_FLAGS | ( | VERTEXCOLOR_DISPLAYMODE | ) |
BaseContainer* cinema::GetToolData | ( | BaseDocument * | doc, |
Int32 | pluginid, | ||
Bool | create = true |
||
) |
Gets the data container for the tool with ID pluginid.
[in] | doc | The document to get the settings for. The caller owns the pointed document. |
[in] | pluginid | The plugin ID of the tool to get the data for. |
[in] | create | If true, the container is created if it does not exist. |
const BaseContainer* cinema::GetToolData | ( | const BaseDocument * | doc, |
Int32 | pluginid, | ||
Bool | create = true |
||
) |
Gets the data container for the tool with ID pluginid.
[in] | doc | The document to get the settings for. The caller owns the pointed document. |
[in] | pluginid | The plugin ID of the tool to get the data for. |
[in] | create | If true, the container is created if it does not exist. |
Retrieves the scale between the local size of the objects in arr and their screen size in bd. The scale is quantized to a power of 10.
For example:
Object size (units) | Screen size (px) | Scale |
---|---|---|
100 |
100 |
1 |
100 |
900 |
1 |
100 |
1001 |
0.1 |
100 |
10 |
10 |
[in] | bd | The view to check the scale in. The caller owns the pointed base draw. |
[in] | arr | The array with objects to check. The caller owns the pointed array. |
[in] | all | If true all points are used for the calculation. If false the selection is used. If NOTOK the function checks if something is selected. |
[in] | mode | NOTOK to use the bounding box (default) or Mpoints/ Medges/Mpolygons. |
Bool cinema::RegisterToolPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
BaseBitmap * | icon, | ||
const maxon::String & | help, | ||
ToolData * | dat | ||
) |
Registers a tool plugin.
[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 tool plugin info flags: PLUGINFLAG_TOOL PLUGINFLAG |
[in] | icon | The icon for the tool. The bitmap is copied. The icon should be of size 32x32, but will be scaled if needed. It must also be 24 bits and should if possible include an alpha to support pattern backgrounds. |
[in] | help | The tool tips and status bar help text for the tool. When using strings it is advised to use the resources string (.str) files and the GeLoadString() function. This keeps the plugin easy to localize for any language to support and makes full use of the language features of Cinema 4D. |
[in] | dat | The tool data instance for the plugin. Cinema 4D takes over the ownership of the pointed tool data. |
Vector cinema::GetOptimalAngle | ( | const Vector & | hpb_old, |
const Vector & | hpb_new, | ||
ROTATIONORDER | order | ||
) |
Modifies hpb_new so that the "distance" to the last angle hpb_old is at minimum.
[in] | hpb_old | The old HPB. |
[in] | hpb_new | The new HPB. |
[in] | order | The rotation order. |
Calculates the distance from a point to a line.
[in] | p0 | The starting point of the line. |
[in] | v | The line vector. |
[in] | p | The point. |
Float cinema::PointLineSegmentDistance | ( | const Vector & | segmentPoint1, |
const Vector & | segmentPoint2, | ||
const Vector & | pos, | ||
Vector * | intersectionPoint = nullptr , |
||
Float * | lineOffset = nullptr |
||
) |
Calculates the distance from a point to a line segment between two points.
[in] | segmentPoint1 | The line segments first point. |
[in] | segmentPoint2 | The line segments second point. |
[in] | pos | The point to test against the line segment. |
[out] | intersectionPoint | Optional, if non-null the intersection point on the segment. |
[out] | lineOffset | Optional, if non-null, the offset along the segment of the intersection point. |
Float cinema::PointLineSegmentDistance2D | ( | const Vector & | segmentPoint1, |
const Vector & | segmentPoint2, | ||
const Vector & | pos, | ||
Vector * | intersectionPoint = nullptr , |
||
Float * | lineOffset = nullptr |
||
) |
Calculates the distance from a point to a line segment between two points in 2D ignoring the Z value.
[in] | segmentPoint1 | The line segments first point. |
[in] | segmentPoint2 | The line segments second point. |
[in] | pos | The point to test against the line segment. |
[out] | intersectionPoint | Optional, if non-null the intersection point on the segment. |
[out] | lineOffset | Optional, if non-null, the offset along the segment of the intersection point. |
Finds the ray vector after a reflection on a surface normal.
[in] | v | The incoming ray. |
[in] | n | The surface normal. |
Bool cinema::SphereLineIntersection | ( | const Vector & | linePoint1, |
const Vector & | linePoint2, | ||
const Vector & | sphereCenter, | ||
Float | sphereRadius, | ||
Float * | intersection1 = nullptr , |
||
Float * | intersection2 = nullptr , |
||
Vector * | hitPoint1 = nullptr , |
||
Vector * | hitPoint2 = nullptr |
||
) |
Calculates where the intersection points are between a line and a sphere in 3D space. since R16
[in] | linePoint1 | The first point of the line. |
[in] | linePoint2 | The second point of the line. |
[in] | sphereCenter | The center of the sphere. |
[in] | sphereRadius | The radius of the sphere. |
[out] | intersection1 | (optional) Assigned the first intersection point (lowest) as an offset between linePoint1 and linePoint2 |
[out] | intersection2 | (optional) Assigned the second intersection point (highest) as an offset between linePoint1 and linePoint2 |
[out] | hitPoint1 | (optional) Assigned the actual 3D point where the line first intersects (enters) the sphere. |
[out] | hitPoint2 | (optional) Assigned the actual 3D point where the line subsequently intersects (exits) the sphere. |
Bool cinema::CircleLineIntersection | ( | const Vector & | linePoint1, |
const Vector & | linePoint2, | ||
const Vector & | circleCenter, | ||
Float | circleRadius, | ||
Float * | intersection1 = nullptr , |
||
Float * | intersection2 = nullptr , |
||
Vector * | hitPoint1 = nullptr , |
||
Vector * | hitPoint2 = nullptr |
||
) |
Calculates where the intersection points are between a line and a circle in 2D space (although Z will also be calculated on the resulting hit points) since R16
[in] | linePoint1 | The first point of the line. |
[in] | linePoint2 | The second point of the line. |
[in] | circleCenter | The center of the circle. |
[in] | circleRadius | The radius of the circle. |
[out] | intersection1 | (optional) Assigned the first intersection point (lowest) as an offset between linePoint1 and linePoint2 |
[out] | intersection2 | (optional) Assigned the second intersection point (highest) as an offset between linePoint1 and linePoint2 |
[out] | hitPoint1 | (optional) Assigned the actual point where the line first intersects (enters) the circle, Z may also be calculated. |
[out] | hitPoint2 | (optional) Assigned the actual point where the line subsequently intersects (exits) the circle, Z may also be calculated. |
Bool cinema::SphereSegmentIntersection | ( | const Vector & | linePoint1, |
const Vector & | linePoint2, | ||
const Vector & | sphereCenter, | ||
Float | sphereRadius, | ||
maxon::BaseArray< SegmentSphereIntersectionData > & | intersections | ||
) |
Calculates where the intersection points are between a segment (a portion of a line) and a sphere in 3D space. since R16
[in] | linePoint1 | The first point (start) of the segment. |
[in] | linePoint2 | The second point (end) of the segment. |
[in] | sphereCenter | The center of the sphere. |
[in] | sphereRadius | The radius of the sphere. |
[out] | intersections | Assigned the SegmentSphereIntersectionData hit-points. |
Bool cinema::CircleSegmentIntersection | ( | const Vector & | linePoint1, |
const Vector & | linePoint2, | ||
const Vector & | circleCenter, | ||
Float | circleRadius, | ||
maxon::BaseArray< SegmentSphereIntersectionData > & | intersections | ||
) |
Calculates where the intersection points are between a segment (a portion of a line) and a circle in 2D space (although Z will be calculated for any resulting hit points) since R16
[in] | linePoint1 | The first point (start) of the segment. |
[in] | linePoint2 | The second point (end) of the segment. |
[in] | circleCenter | The center of the circle. |
[in] | circleRadius | The radius of the circle. |
[out] | intersections | Assigned the SegmentSphereIntersectionData hit-points. |
Converts RGB into the HSV color space.
[in] | col | The RGB color to convert. |
Converts HSV into the RGB color space.
[in] | col | The HSV color to convert. |
Converts RGB into the HSL color space.
[in] | col | The RGB color to convert. |
Converts HSL into the RGB color space.
[in] | col | The HSL color to convert. |
Vector cinema::CalcSplinePoint | ( | Float | offset, |
SPLINETYPE | type, | ||
Bool | closed, | ||
Int32 | pcnt, | ||
const Vector * | padr, | ||
const Tangent * | tadr = nullptr |
||
) |
Calculates a point along a spline curve from a set of points in 3D space.
[in] | offset | The offset along the spline from 0.0 to 1.0. |
[in] | type | The type of spline, i.e. AKIMA, BSPLINE etc. |
[in] | closed | Whether the spline is closed or not. |
[in] | pcnt | The number of points in the spline. |
[in] | padr | The points array. |
[in] | tadr | The tangents array, required for Bezier, Cubic and Akima spline types (otherwise will default to b-spline). |
Vector cinema::CalcSplineTangent | ( | Float | offset, |
SPLINETYPE | type, | ||
Bool | closed, | ||
Int32 | pcnt, | ||
const Vector * | padr, | ||
const Tangent * | tadr = nullptr |
||
) |
Calculates the tangent of a point along a spline curve from a given set of points and optional tangents.
[in] | offset | The offset along the spline from 0.0 to 1.0. |
[in] | type | The type of spline, i.e. AKIMA, BSPLINE etc. |
[in] | closed | Whether the spline is closed or not. |
[in] | pcnt | The number of points in the spline. |
[in] | padr | The points array. |
[in] | tadr | The tangents array, required for Bezier, Cubic and Akima spline types (otherwise will default to b-spline). |
void cinema::CalcSplineInsert | ( | Float | offset, |
SPLINETYPE | type, | ||
Bool | closed, | ||
Int32 | pcnt, | ||
const Vector * | padr, | ||
const Tangent * | tadr, | ||
Int32 & | pointIndex, | ||
Vector & | resultPoint, | ||
Tangent & | resultTangent, | ||
Vector & | leftTangent, | ||
Vector & | rightTangent | ||
) |
Calculates data about a point would if it were inserted into the spline at the passed offset.
[in] | offset | The offset to calculate the point for. |
[in] | type | The spline type. |
[in] | closed | The closed state of the spline points. |
[in] | pcnt | The number of points in the spline. |
[in] | padr | The address of the points array. |
[in] | tadr | The (optional) address of the tangents array. |
[out] | pointIndex | The index that the resulting point would be if it were inserted into the spline. |
[out] | resultPoint | The position of the resulting point. |
[out] | resultTangent | The spline tangent information of the resulting point. |
[out] | leftTangent | The correct new left tangent (tadr[pointIndex - 1].vr). |
[out] | rightTangent | The correct new right tangent (tadr[pointIndex].vl). |
Tangent cinema::TransformTangent | ( | const Vector & | newPos, |
const Vector & | planeNormal, | ||
const Vector & | position, | ||
const Tangent & | tangent, | ||
TANGENTSIDE | tangentSide, | ||
TANGENTTRANSFORMFLAG | flags = TANGENTTRANSFORMFLAG::BREAK_SCALE |
||
) |
Creates a transformed tangent around a point and plane, allowing to directly set the position of one of the tangent handles and automatically rotating the rest of the tangent to match.
[in] | newPos | The new position for the tangent handle. |
[in] | planeNormal | The normal of the plane for rotation of the handles. |
[in] | position | The position of the center of the tangent being modified. |
[in] | tangent | The tangent to modify/derive the resulting tangent from. |
[in] | tangentSide | The handle to modify of the tangent, left, right, or none. |
[in] | flags | The flags for controlling tangent breaking, rotation and scale locking etc. |
void cinema::CalcSplineMovement | ( | const Vector & | newPos, |
Float | offset, | ||
SPLINETYPE | type, | ||
const Matrix & | splineMg, | ||
BaseDraw * | bd, | ||
const Vector & | planeNormal, | ||
Bool | closed, | ||
Bool | lockTangentAngle, | ||
Bool | lockTangentLength, | ||
BREAKTANGENTS | breakTangents, | ||
Int32 | pcnt, | ||
Vector * | padr, | ||
Tangent * | tadr | ||
) |
Moves a point on a spline curve to a user specified new position.
[in] | newPos | The new position for the point of the curve at offset. |
[in] | offset | The offset to move to the position newPos. |
[in] | type | The type of spline to move. |
[in] | splineMg | The matrix of the spline. |
[in] | bd | The (optional) basedraw. |
[in] | planeNormal | The normal for tangent rotation, typically Vector(0,0,1) . |
[in] | closed | The closed state of the spline. |
[in] | lockTangentAngle | true if tangents angle may not be changed by this routine. |
[in] | lockTangentLength | true if the tangents length may not be changed by this routine. |
[in] | breakTangents | Set to break the tangents while manipulating the curve if tangents exist. |
[in] | pcnt | The number of points in the spline. |
[out] | padr | The address of the points that describe the spline. |
[out] | tadr | The (optional) address of the tangents that are used by the spline. |
Bool cinema::CalcSplineDefaultTangents | ( | SPLINETYPE | type, |
Bool | closed, | ||
Int32 | pcnt, | ||
const Vector * | padr, | ||
Tangent * | tadr | ||
) |
Calculates the default tangents for the passed points (spline segment) based on the spline type.
[in] | type | The spline type to calculate the tangents for. |
[in] | closed | Whether the spline segment is closed. |
[in] | pcnt | The number of points to calculate. |
[in] | padr | The address of the points. |
[out] | tadr | The resulting tangents (caller owns the array, must be pre-allocated). |
PointObject* cinema::BooleanSplines | ( | PointObject * | initialSpline, |
AtomArray * | booleanObjects, | ||
BaseDocument * | doc, | ||
BaseDraw * | bd, | ||
SPLINEBOOL_AXIS | projectionAxis, | ||
SPLINEBOOL_MODE | booleanMode | ||
) |
Booleans an initial SplineObject with an array of other SplineObjects along a passed projection axis (in 2D).
[in] | initialSpline | The original SplineObject or LineObject that will have the operations applied to it. |
[in] | booleanObjects | The array of SplineObjects to boolean with the initialSpline. |
[in] | doc | The active document that the objects belong to. |
[in] | bd | The active BaseDraw. |
[in] | projectionAxis | The projection axis to use, XY, ZY, screen space etc. |
[in] | booleanMode | The type of boolean to apply (Union, Subtract etc). |
Calculates the value of a spline at a point.
[in] | x | The position on the spline. |
[in] | knot | The spline knots array. The caller owns the pointed array. |
[in] | nknots | The number of knots. |
Calculates the value of a spline at a point.
[in] | x | The position on the spline. |
[in] | knot | The spline knots array. The caller owns the pointed array. |
[in] | nknots | The number of knots. |
void cinema::CalcRestrictionInc | ( | const ObjectRestriction * | lr, |
const RayObject * | op, | ||
Bool & | nodif, | ||
Bool & | nospec | ||
) |
Calculates the include-/exclude situation for a given object op and a light
source (&light->lr
is passed).
[in] | lr | The light restriction to evaluate. The caller owns the pointed light restriction. |
[in] | op | The object to evaluate. The caller owns the pointed object. |
[in,out] | nodif | Must be initialized with false before the call. Assigned true if lr specifies that op should not receive any diffuse light. |
[in,out] | nospec | Must be initialized with false before the call. Assigned true if lr specifies that op should not receive any specular light. |
BAKE_TEX_ERR cinema::BakeTexture | ( | BaseDocument * | doc, |
const BaseContainer & | data, | ||
BaseBitmap * | bmp, | ||
BaseThread * | th, | ||
BakeProgressHook * | hook, | ||
BakeProgressInfo * | info | ||
) |
Bakes the texture(s) specified by the last InitBakeTexture() call into bmp.
[in] | doc | The document. The caller owns the pointed document. |
[in] | data | The bake settings: BakeTexEnums |
[out] | bmp | The bitmap to bake to. If this points to a MultipassBitmap, it must be initialized with the correct width and height before BakeTexture() is called. The caller owns the pointed bitmap. If this points to a MultipassBitmap, it must be initialized with the correct width and height before BakeTexture() is called. Multipass bitmaps must be used if BAKE_TEX_AMBIENT_OCCLUSION is set. The only allowed modes for multipass bitmaps are COLORMODE::RGB, COLORMODE::ARGB, COLORMODE::RGBw, COLORMODE::ARGBw, COLORMODE::RGBf, COLORMODE::ARGBf. |
[in] | th | The current thread. The caller owns the pointed document. |
[in] | hook | The bake progress hook callback function pointer. |
[in] | info | The bake progress information passed to the hook callback. |
BaseDocument* cinema::InitBakeTexture | ( | BaseDocument * | doc, |
TextureTag * | textag, | ||
UVWTag * | texuvw, | ||
UVWTag * | destuvw, | ||
const BaseContainer & | bc, | ||
BAKE_TEX_ERR * | err = nullptr , |
||
BaseThread * | th = nullptr |
||
) |
Initializes a bake operation of a single tag for BakeTexture().
[in] | doc | The document. The caller owns the pointed document. |
[in] | textag | The texture tag to bake. Must be assigned to an object. The caller owns the pointed tag. |
[in] | texuvw | The UVW tag to bake. Must be valid if UVW projection is selected in the tag, ignored otherwise. The caller owns the pointed tag. |
[out] | destuvw | The destination UVW tag for the bake. If not nullptr, the current projection is transformed into the uvw tag. The caller owns the pointed tag. |
[in] | bc | The bake settings: BakeTexEnums |
[out] | err | Assigned the error result, if not nullptr: BAKE_TEX_ERR |
[in] | th | The current thread. The caller owns the pointed document. |
BaseDocument* cinema::InitBakeTexture | ( | BaseDocument * | doc, |
TextureTag ** | textags, | ||
UVWTag ** | texuvws, | ||
UVWTag ** | destuvws, | ||
Int32 | cnt, | ||
const BaseContainer & | bc, | ||
BAKE_TEX_ERR * | err = nullptr , |
||
BaseThread * | th = nullptr |
||
) |
Initializes a bake operation of multiple tags for BakeTexture().
[in] | doc | The document. The caller owns the pointed document. |
[in] | textags | The texture tags to bake. Must be assigned to objects. The caller owns the pointed array. |
[in] | texuvws | The UVW tags to bake. The caller owns the pointed array. |
[out] | destuvws | The destination UVW tags for the bake. If not nullptr, the current projection is transformed into the uvw tags. The caller owns the pointed array. |
[in] | cnt | The number of tags in textags, texuvws and destuvws arrays. |
[in] | bc | The bake settings: BakeTexEnums |
[out] | err | Assigned the error result, if not nullptr: BAKE_TEX_ERR |
[in] | th | The current thread. The caller owns the pointed document. |
Vector cinema::GetOptimalAngleI | ( | const Vector & | orot, |
const Vector & | nrot, | ||
const ROTATIONORDER | order, | ||
const Float | angleDiff | ||
) |
Private. Usually we solve for an angle in a 360 deg (-PI to PI) range but there can be the scenario that a different range is required
Bool cinema::RegisterVideoPostPlugin | ( | Int32 | id, |
const maxon::String & | str, | ||
Int32 | info, | ||
DataAllocator * | g, | ||
const maxon::String & | description, | ||
Int32 | disklevel, | ||
Int32 | priority | ||
) |
Registers a video post plugin.
[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 video post plugin info flags: PLUGINFLAG_VIDEOPOST PLUGINFLAG |
[in] | g | The allocator for the video post plugin. This is a pointer to a function that creates a new instance of VideoPostData with NewObj(). |
[in] | description | The name of the description resource file to use for the material plugin without .res extension, for example "VPeffectname". The name has to be unique, i.e. "Tdisplay" cannot be used for 2 different descriptions. See Description 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 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] | priority | The priority of the video post plugin. Higher priority values are called before lower values. The priorities of the internal video post processing are: VPPRIORITY For example, to filter between glow and depth of field then priority has to be set between VPPRIORITY_OBJECTGLOW and VPPRIORITY_DEPTHOFFIELD:: Though all video post effects will be sorted by priority, an effect overriding for example VideoPostData::ExecutePixel will always be called before one using VideoPostData::ExecuteLine. Also VideoPostData::ExecuteLine will always be called before VIDEOPOSTCALL::INNER+ BaseVideoPostStruct::open open==false. This should be logical as VideoPostData::ExecutePixel will be instantly called after a sub-pixel has been calculated and VideoPostData::ExecuteLine instantly after a line has been calculated. |
maxon::String ToString | ( | const Matrix32 & | val, |
const maxon::FormatStatement * | formatStatement, | ||
maxon::Bool | checkDatatype = false |
||
) |
maxon::String cinema::ToString | ( | const Vector32 & | val, |
const maxon::FormatStatement * | formatStatement, | ||
maxon::Bool | checkDatatype = false |
||
) |
enum cinema::LINESTYLE cinema::MAXON_ENUM_LIST | ( | LINESTYLE | ) |
enum cinema::DETAILSELECTOR cinema::MAXON_ENUM_FLAGS | ( | DETAILSELECTOR | ) |
enum cinema::HOTKEYFLAGS cinema::MAXON_ENUM_FLAGS | ( | HOTKEYFLAGS | ) |
enum cinema::FOLDMODE cinema::MAXON_ENUM_LIST | ( | FOLDMODE | ) |
enum cinema::TAGBITS cinema::MAXON_ENUM_FLAGS | ( | TAGBITS | ) |
Gets the minimum of two float values.
Single-precision version.
[in] | a | The first value. |
[in] | b | The second value. |
Gets the minimum of two float values.
Double-precision version.
[in] | a | The first value. |
[in] | b | The second value. |
Gets the minimum of two integer values.
Single-precision version.
[in] | a | The first value. |
[in] | b | The second value. |
Gets the minimum of two integer values.
Double-precision version on 64-bit systems.
[in] | a | The first value. |
[in] | b | The second value. |
Gets the maximum of two float values.
Single-precision version.
[in] | a | The first value. |
[in] | b | The second value. |
Gets the maximum of two float values.
Double-precision version.
[in] | a | The first value. |
[in] | b | The second value. |
Gets the maximum of two integer values.
Single-precision version.
[in] | a | The first value. |
[in] | b | The second value. |
Gets the maximum of two integer values.
Double-precision version on 64-bit systems.
[in] | a | The first value. |
[in] | b | The second value. |
Limits the value of a between b and c.
Single-precision version.
[in] | a | The value. |
[in] | b | The lower bound. |
[in] | c | The upper bound. |
Limits the value of a between b and c.
Double-precision version on 64-bit systems.
[in] | a | The value. |
[in] | b | The lower bound. |
[in] | c | The upper bound. |
Int cinema::Sign | ( | X | f | ) |
Calculates the sign of a value.
[in] | f | The value. |
T cinema::Mod | ( | T | a, |
U | b | ||
) |
Calculates a modulo b.
[in] | a | The dividend. |
[in] | b | The divisor. |
enum cinema::OPENDIALOGFLAGS cinema::MAXON_ENUM_FLAGS | ( | OPENDIALOGFLAGS | ) |
|
static |
|
static |
Private.
|
static |
The generic icon for sublists.
|
static |
The icon for the mask sublist.
class CINEWARE_SINGLEINHERITANCE iListViewData |
|
static |
RangeCustomGui ID.
|
staticconstexpr |
@MarkPrivate
|
static |
/ The size of a block that's executed in an MP environment. For single depth execution a value closer to 1200 is actually more optimal, with one group 600 and from then on for each group depth you can expect a drop of a third. For general usage on current architectures this gives the best balance.
|
static |
/ The size of a block that's executed in an MP environment. For single depth execution a value closer to 1200 is actually more optimal, with one group 600 and from then on for each group depth you can expect a drop of a third. For general usage on current architectures this gives the best balance.
|
static |
Message to signal an impending invidual calls of an object list The corresponding data is PresampleFieldSingleData.
|
static |
Message to signal the end of individual calls of an object list.
const Int32 MSG_BIRENDER_ADDMPBUFFER |
|
static |
class CINEWARE_SINGLEINHERITANCE BlendLayer |
class CINEWARE_SINGLEINHERITANCE iModeling |
class CINEWARE_SINGLEINHERITANCE iUser |
class CINEWARE_SINGLEINHERITANCE iNgonBase |
class CINEWARE_SINGLEINHERITANCE iSculptBrushBase |
|
extern |
Global resources for Cinema 4D.
|
extern |
|
static |
Constant to convert from vectors color components to integers.
|
static |
Constant to convert from 0-1 range to percentage.
|
static |
Constant to calculate the third of a value.
|
static |
Constant to calculate the sixth of a value.
|
static |
|
static |
Private.
|
static |
Private.
|
static |
Private.
|
static |
Private.
|
static |
|
static |
Private.
|
static |
A special constant that sets the (yellowish) highlight transparency mode.