Follow me to the Inheritance diagramm.
Open a load dialog. The look of this dialog depends on the operating system.
Warning
If the filename returned by LoadDialog() will be passed to a non-CINEMA 4D function it must be decoded to an utf-8 object:
fn = LoadDialog()
f = open(fn.decode("utf-8"))
# open() is a non-CINEMA 4D function so it needs a decode but it works with a CINEMA 4D function:
doc = LoadDocument(fn)
# or
doc = LoadDocument(fn.decode("utf8"))
Parameters: |
|
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | str |
||||||||||||||||
Returns: | The selected path. |
Open a save dialog. The look of this dialog depends on the operating system.
Parameters: |
|
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | str |
||||||||||
Returns: | The selected path. |
Show the file/path in the Finder (OSX) or Explorer (Windows).
Parameters: |
|
---|---|
Return type: | bool |
Returns: | True if the path/file exists, otherwise False. |
Warning
The Python implementation is different from the C++ in the fact that, with the Python SDK, this function returns the path of the Python SDK module. To get the path of your Python plugin use __file__.
Return type: | str |
---|---|
Returns: | The path of the Python SDK module. |
Gets one of the CINEMA 4D paths.
Parameters: | whichpath (int) – The path to get:
|
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | str | ||||||||||||||||||
Returns: | The retrieved path. |
Returns the complete path of the host application (CINEMA 4D, BODYPAINT 3D, NET) of the plugin:
(Mac) e.g: '/Applications/MAXON/CINEMA 4D R12/CINEMA 4D.app'
Return type: | str |
---|---|
Returns: | The complete path to the host application. |
Returns the writeable startup directory. This is the directory where all user data (preferences, libraries etc.) are stored:
(Mac) e.g: '/Users/UserName/Library/Preferences/MAXON/CINEMA 4D R12_C333CB6C'
Note
Use this for example to store plugin preferences because Windows Vista and Apple Leopard do not allow to write files into the application folder.
Return type: | str |
---|---|
Returns: | The writeable startup directory. |
Gets CINEMA 4D memory statistics.
Return type: | BaseContainer | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns: | Can be None if receiving memory container failed. Assigned statistics:
|
Get the estimated free physical memory.
Return type: | long |
---|---|
Returns: | The estiumated free physical memory. |
Writes a single list node to disk as a hyper file.
Parameters: |
|
||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | int |
||||||||||||||||||||||||||||
Returns: | The result:
|
Reads a single list node from a hyper file on disk. The read data replaces the data in node.
Parameters: |
|
||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | int |
||||||||||||||||||||||||||||
Returns: | The result:
|
Get the path for the main folder CINEMA:
(Mac) e.g: '/Applications/MAXON/CINEMA 4D R12'
Return type: | str |
---|---|
Returns: | The main path for the CINEMA application. |
New in version R15.037.
Get the path to the site folder in the user folder.
(Windows 64-bits) e.g: ‘C:/Users/$UserName/AppData/Roaming/MAXON/R15/library/python/packages/win64’
Note
This folder exists so that 3rd party packages can be installed in it.
Return type: | str |
---|---|
Returns: | The path to the site folder in the user folder. |
New in version R16.021.
Calculate the free space on a volume.
Parameters: | drive (str) – Can point to a volume or directory. |
---|---|
Return type: | tuple(long, long) |
Returns: | The number of available bytes on the volume and the total size of the volume in bytes. |
Execute an application.
Note
The application will be started asynchronous.
Parameters: |
|
---|---|
Return type: | bool |
Returns: | Success of executing the application. |
Execute a file with a defined application.
Parameters: | path (str) – The name of the application to execute. |
---|---|
Return type: | bool |
Returns: | Success of executing the application. |
Get information from a movie file.
Parameters: | path (str or MemoryFileStruct) – The path of the movie file. |
---|---|
Return type: | dict{frames: int, fps: float} |
Returns: | The number of frames and frames per second. |
Identify the file in name.
Parameters: |
|
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | tuple(int, BasePlugin) |
||||||||||||||||||
Returns: | The result and, for image formats, the image loader that was identified.
|