On 19/01/2016 at 07:51, xxxxxxxx wrote:
Cinema 4D Version: R16+
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
My latest plugin does import/export. Export works flawlessly. Import is a bit more troublesome since it must be 'merged' with the active document.
For registration, this is the setup:
return RegisterSceneLoaderPlugin(ID_IMEXANIM_SCENELOADER, "ImExAnim (*.iea)", PLUGINFLAG_SCENELOADER_MERGEORIGINAL, ImportAnim::Alloc, "Fimportanim", "iea");
And the filter:
if (!(filterflags & SCENEFILTER_MERGESCENE))
No matter what filters I check on Load(), if I use "Open...", it creates a new document (or fails as an Unknown File Format). Must one use "Merge..." to get the active document for importing information into the active document? The documentation and examples do not explain.
On 20/01/2016 at 07:24, xxxxxxxx wrote:
The Cinema 4D documentation states for the Open and Merge commands:
Open: "This command loads a file (a scene, a material, etc.) from a storage device (such as a hard disk) into memory and opens it in a new project window. If the current project window is empty, this is used instead."
Merge: "This command lets you add scenes, objects, materials, etc. to the active project."
So it's not possible to merge a file with the Open command as it creates a new document for the loaded file.
And yes, the Merge command has to be used to import a file into the active document.
On 20/01/2016 at 10:48, xxxxxxxx wrote:
Good to know. This way I can instruct users on how to use the import properly. You can call this solved. :)