Classes | |
class | ParserCache |
class | Parser |
struct | SerialInfo |
class | Registry |
class | LassoSelection |
class | DebugTimer |
Typedefs | |
typedef maxon::Tuple< maxon::Url, Bool > | TexturePathTuple |
typedef maxon::BaseArray< TexturePathTuple > | TexturePathList |
Enumerations | |
enum class | MACHINEFEATURESTYPE { CURRENT , HARDWARE_OGL } |
Variables | |
CURRENT | |
HARDWARE_OGL | |
class DebugTimer | MAXON_ENUM_LIST |
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) |
void | StatusSetSpin (void) |
void | StatusSetBar (Int32 p) |
void | StatusSetText (const maxon::String &str) |
void | StatusNetClear (void) |
void | StatusSetNetLoad (STATUSNETSTATE status) |
void | StatusSetNetBar (Int32 p, const GeData &dat) |
void | StatusSetNetText (const maxon::String &str) |
typedef maxon::Tuple<maxon::Url, Bool> TexturePathTuple |
maxon::String GeGetUserName | ( | ) |
Returns the name of the user registered in the active account.
VERSIONTYPE GeGetVersionType | ( | void | ) |
Retrieves the type of Cinema 4D application that is running.
maxon::Result<void> 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> ExportLicenses | ( | ) |
Returns licensing information as shown in the ExportLicenses menu command including productId, systemId, userId etc.
maxon::Result<void> 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 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 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 IsNet | ( | ) |
Checks if either a NET server or client application is running.
Bool IsServer | ( | ) |
Checks if a NET server application is running.
Bool IsClient | ( | ) |
Checks if a NET client application is running.
void GeShowMouse | ( | Int32 | v | ) |
Sets the type of mouse pointer.
[in] | v | The mouse pointer: MOUSE |
Bool 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 GeGetTimer | ( | void | ) |
Retrieves the current timer count in milliseconds.
Float64 GeGetMilliSeconds | ( | void | ) |
Get the current timer count in milliseconds.
String GeGetLineEnd | ( | void | ) |
Retrieves a string that contains the type of line ending characters for the running OS.
Int32 GeGetDefaultFPS | ( | void | ) |
Retrieves the default frames per second.
UInt32 GeGetCinemaInfo | ( | CINEMAINFO | info | ) |
Retrieves information about Cinema 4D's application runtime.
[in] | info | The information type: CINEMAINFO |
GEMB_R GeOutString | ( | const maxon::String & | str, |
GEMB | flags | ||
) |
OPERATINGSYSTEM GeGetCurrentOS | ( | void | ) |
Retrieves the type of OS that is running Cinema 4D.
BYTEORDER GeGetByteOrder | ( | void | ) |
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 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 GeOpenHTML | ( | const maxon::String & | webaddress | ) |
Opens a URL in the user's default web browser.
[in] | webaddress | The URL to open. |
Bool GeChooseFont | ( | BaseContainer * | bc | ) |
Opens a font chooser dialog for the user to select a font.
[in] | bc | Assigned the selected font settings. |
void GeGetGuiFont | ( | maxon::OSFontDefinition & | out | ) |
Internal. Returns the c4d UI font.
void GeGetMonoFont | ( | maxon::OSFontDefinition & | out | ) |
Internal. Returns the c4d monospaced font.
Bool 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 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 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 GetC4DVersion | ( | void | ) |
Retrieves the version of Cinema 4D that is running.
String GeGetDegreeChar | ( | ) |
Retrieves the degree character (°).
String GeGetPercentChar | ( | ) |
Retrieves the percent character (%).
void 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 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 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 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 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 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 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 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 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 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 3D 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 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 3D selection).
[in] | typeclass | The type class ID to check, or 0 for all classes. |
[in] | all | If true, negative priorities are also checked. |
void 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 ShowBitmap | ( | BaseBitmap * | bm | ) |
Displays a bitmap into the Picture Viewer.
[in] | bm | The bitmap to display. |
void StopAllThreads | ( | void | ) |
Stops all running threads.
void StopDrawViewsThread | ( | ) |
Stops all draw views thread.
void StatusClear | ( | void | ) |
Clears the status bar text.
void StatusSetSpin | ( | void | ) |
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 StatusSetBar | ( | Int32 | p | ) |
Sets the status bar progress bar.
[in] | p | The percentage of the progress (0-100). |
void StatusSetText | ( | const maxon::String & | str | ) |
Sets the status bar text.
[in] | str | The text to display. |
void StatusNetClear | ( | void | ) |
Clears the NET status bar text.
void 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 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 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 SendModelingCommand | ( | Int32 | command, |
ModelingCommandData & | data | ||
) |
Sends a modeling command.
Examples:
[in] | command | There are several groups of IDs to use. First there are the internal modeling commands: (IDs are for ModelingCommandData::bc.) MCOMMAND Then there are the modeling library tool IDs, look up the parameters in the resource files: ModelingToolsParameters Finally there are the modeling library menu commands. (These have no parameters.) ModelingToolsNoParameters |
[in] | data | The data for the command. Can be filled with the result for some commands. |
maxon::Result<TexturePathList> 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> SetGlobalTexturePaths | ( | const TexturePathList & | paths | ) |
Sets the global texture paths.
Bool 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 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 FlushUnusedTextures | ( | void | ) |
Flushes all unused textures.
BaseContainer GetWorldContainer | ( | void | ) |
Retrieves the main Cinema 4D settings container.
BaseContainer* GetWorldContainerInstance | ( | void | ) |
Retrieves the main Cinema 4D settings container that can be changed directly.
void 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> > GetRecentDocumentsList | ( | Bool | isBodyPaint | ) |
Retrieves the recent documents list.
[in] | isBodyPaint | Set to reteive BodyPaint's list. |
maxon::Id GetActiveNodeSpaceId | ( | ) |
Returns the active node space. This is a program-wide global UI setting.
void SaveWorldPreferences | ( | ) |
Saves the main Cinema 4D preferences.
void 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 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* 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 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* 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 GeIsActiveToolEnabled | ( | void | ) |
Checks if the active tool is ghosted.
ToolPlugin* GetActiveTool | ( | ) |
Gets the active tool. Private.
Bool 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 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* 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 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 SetActiveScriptObject | ( | Int32 | type | ) |
Define the script to be displayed in the Script Manager.
[in] | type | The script ID. Retrieve it with GetDynamicScriptID. |
BaseList2D* 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* LoadPythonScript | ( | const Filename & | fn | ) |
Load a python script.
[in] | fn | The script name. Pass an empty filename to automatically generated one. |
Bool 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 GetObjectType | ( | const maxon::String & | name | ) |
The inverse of GetObjectName(). Returns an object type from an object name.
[in] | name | An object name. |
Int32 GetTagType | ( | const maxon::String & | name | ) |
The inverse of GetTagName(). Returns a tag type from a tag name.
[in] | name | A tag name. |
Bool GeRegistryAdd | ( | Int32 | sub_id, |
REGISTRYTYPE | main_id, | ||
void * | data | ||
) |
Private.
Bool GeRegistryRemove | ( | Int32 | sub_id, |
REGISTRYTYPE | main_id | ||
) |
Private.
Registry* GeRegistryFind | ( | Int32 | sub_id, |
REGISTRYTYPE | main_id | ||
) |
Private.
Registry* GeRegistryGetLast | ( | REGISTRYTYPE | main_id | ) |
Private.
Registry* 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 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 FindInManager | ( | BaseList2D * | bl | ) |
Finds and makes bl visible in its manager.
[in] | bl | The object to find. The caller owns the pointed object. |
void 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 GeIsMainThread | ( | ) |
Checks if code is run from within the main thread of Cinema 4D.
Bool 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 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 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 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 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 GetMachineFeatures | ( | MACHINEFEATURESTYPE | type = MACHINEFEATURESTYPE::HARDWARE_OGL | ) |
Retrieves the features of the computer.
[in] | type | The machine features type: MACHINEFEATURESTYPE Since R18. |
Bool GeGetMemoryStat | ( | BaseContainer & | stat | ) |
Retrieves Cinema 4D memory statistics.
[in] | stat | Assigned the memory statistics: C4D_MEMORY_STAT |
Bool 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 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 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 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 AskForAdministratorPrivileges | ( | const maxon::String & | msg, |
const maxon::String & | caption, | ||
Bool | allowsuperuser, | ||
void ** | token | ||
) |
Private.
void EndAdministratorPrivileges | ( | ) |
Private.
void RestartApplication | ( | const Utf16Char * | param = nullptr , |
Int32 | exitcode = 0 , |
||
const Utf16Char ** | path = nullptr |
||
) |
Private.
void SetExitCode | ( | Int32 | exitCode | ) |
Sets the exit code returned by Cinema 4D when it exits.
[in] | exitCode | The exit code. |
void GeUpdateUI | ( | ) |
Forces a redraw of the GUI, for example after a change of the preferences or Linear Workflow settings.
VIEWPORTTYPE GeGetActiveViewportType | ( | ) |
Returns the type of viewport that is currently active
Int32 GetShortcutCount | ( | ) |
Retrieves the global shortcut count.
BaseContainer GetShortcut | ( | Int32 | index | ) |
Retrieves the shortcut at index.
[in] | index | The shortcut index: 0 <= index < GetShortcutCount() |
Bool 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 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 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 CopyToClipboard | ( | const maxon::String & | text | ) |
Copies a string to the clipboard.
[in] | text | The string to copy. |
void 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 GetBitmapFromClipboard | ( | BaseBitmap * | map | ) |
Retrieves a bitmap from the clipboard.
[out] | map | The bitmap to get. The caller owns the pointed bitmap. |
CLIPBOARDTYPE GetClipboardType | ( | void | ) |
Retrieves the type of the clipboard.
Int32 GetC4DClipboardOwner | ( | void | ) |
Retrieves the owner ID of the clipboard.
const BaseBitmap* GetCursorBitmap | ( | Int32 | type, |
Int32 & | hotspotx, | ||
Int32 & | hotspoty | ||
) |
Private.
Bool 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 MinimalViewportSettingsCommand | ( | Int32 | type | ) |
Private.
Bool IsAnimationRunning | ( | const BaseDocument * | document | ) |
Checks if an animation is currently running.
[in] | document | The currently active document. |
Bool 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. |
CURRENT |
Get Machine features for the currently active OpenGL type.
HARDWARE_OGL |
Get Machine features for Hardware OpenGL.
class DebugTimer MAXON_ENUM_LIST |