THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/12/2006 at 04:05, xxxxxxxx wrote:
Cinema 4D Version: 9.6
Language(s) : C.O.F.F.E.E ;
I've got a question:
I've got the following code:
var file = new(Filename);
var currentObject = GetActiveObject(doc);
I would like to load "objekt.c4d" into my actual scene.
But in this case cinema opens a new scene called "objekt.c4d". That's not what I want. Cinema should insert the object from "objekt.c4d" to my actual scene, and not open a new one.
Shouldn't it work with "KillDocument();". I cannot find the function in SDK 9.5.
Could anybody helf me?
Thanks a lot!
On 11/12/2006 at 06:42, xxxxxxxx wrote:
Afaik! not possible in COFFEE. Sorry, only via C++.
On 11/12/2006 at 06:44, xxxxxxxx wrote:
As a workaround I would suggest this.
1. Load the document
2. Copy the objects and materials
3. Insert them into your already opened scene
4. Close the loaded document
There doesn´t seem to be another way imo.
On 11/12/2006 at 06:45, xxxxxxxx wrote:
You would have to copy-paste the object from the document opened with LoadDocument. You can step through open documents with GetNext/GetPrev. It's not actually fun to do with COFFEE, the C++ API is much easier to use in this regard.