THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/02/2010 at 10:34, xxxxxxxx wrote:
Cinema 4D Version: 10
Platform: Windows ;
Language(s) : C++ ;
I have created a template object with materials in a C4D file. Through a command plugin, I now want to insert this object at a given position in a second scene.
If I do
MergeDocument(doc, objectFile, SCENEFILTER_OBJECTS, NULL);
I end up with the only the object in my scene, but not the materials.
If I use
MergeDocument(doc, objectFile, SCENEFILTER_MATERIALS, NULL);
before, then I have both the materials and the objects, but the object tag is no longer linked to the material.
By the way, using
MergeDocument(doc, objectFile, SCENEFILTER_MERGESCENE, NULL);
results in nothing inserted at all.
What am I doing wrong here?
On 28/02/2010 at 22:31, xxxxxxxx wrote:
MergeDocument(doc, objectFile, SCENEFILTER_MATERIALS | SCENEFILTER_OBJECTS, NULL);
On 01/03/2010 at 05:57, xxxxxxxx wrote:
That works, but know I have the material twice in the new scene ... very strange.
On 01/03/2010 at 06:02, xxxxxxxx wrote:
My mistake .. the second one was a residual code part that loaded the material again seperately. So it now works perfectly!