A data class for creating scene savers. Use RegisterSceneSaverPlugin() to register the plugin.
Note
Before you start writing your own SceneSaverData plugin, you should read NodeData Management before.
See also
Py-IES Meta plugin example.
Definition
-
class c4d.plugins.SceneSaverData
Methods
-
SceneSaverData.Save(self, node, name, doc, filterflags)
-
Override - Save the document.
Parameters: |
-
node (BaseList2D) – The node object.
-
name (str) – The filename of the file to save.
-
doc (BaseDocument) – The document that the selected objects should be saved from.
-
filterflags (int) –
The possible flags are:
SCENEFILTER_0 |
No flags. |
SCENEFILTER_OBJECTS |
Load/save only the objects and associated items, such as materials used. |
SCENEFILTER_MATERIALS |
Load/save only the materials. |
SCENEFILTER_DIALOGSALLOWED |
Flag to inform your plugin that a dialog can be displayed if you wish, if this flag not set then no dialogs must be opened. |
SCENEFILTER_PROGRESSALLOWED |
Flag to inform your plugin that a progress bar can be displayed if you wish. The progress bar can be set by calling StatusSetBar(). |
SCENEFILTER_MERGESCENE |
Flag to inform your plugin that this is a merge operation, i.e. that the document you’re inserting to is an existing scene. |
SCENEFILTER_NONEWMARKERS |
Objects loaded from disk will keep their markers |
SCENEFILTER_SAVECACHES |
Caches of objects will also be written (only supported by C4D file format). This equals the global option “Save Polygon Objects for Melange Exchange” |
|
Return type: |
int
|
Returns: |
The return values:
FILEERROR_NONE
|
No error.
|
FILEERROR_OPEN
|
Problems opening the file.
|
FILEERROR_CLOSE
|
Problems closing the file.
|
FILEERROR_READ
|
Problems reading the file.
|
FILEERROR_WRITE
|
Problems writing the file.
|
FILEERROR_SEEK
|
Problems seeking the file.
|
FILEERROR_INVALID
|
Invalid parameter or operation (e.g. writing in read-mode).
|
FILEERROR_MEMORY
|
Not enough memory.
|
FILEERROR_USERBREAK
|
User break.
|
FILEERROR_WRONG_VALUE
|
Other value detected than expected.
|
FILEERROR_CHUNK_NUMBER
|
Wrong number of chunks or sub chunks detected.
|
FILEERROR_VALUE_NO_CHUNK
|
There was a value without any enclosing START/STOP chunks.
|
FILEERROR_FILE_END
|
The file end was reached without finishing reading.
|
FILEERROR_UNKNOWN_VALUE
|
Unknown value detected.
|
|