THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/10/2005 at 17:44, xxxxxxxx wrote:
Cinema 4D Version: 9
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;
Hi there, I'm a totaly nebie and i think I'm asking a total nebie question.
Can anyone tell me how to load an object(.c4d) into an active .c4d document using coffe?
Is it possable to run a coffe script that can do this as if the user opened the file with File/Open/Load Object in the Objects window?
I might not have explained it well enough, but any help with this would be great.
On 19/10/2005 at 10:57, xxxxxxxx wrote:
You can use LoadDocument() to open the object into a new document, then copy it with GetActiveDocument(), GetClone() and InsertObject() into the old document. Finally you can close the new document with KillDocument().
On 19/10/2005 at 12:22, xxxxxxxx wrote:
Thats great! thanks for you help Mikael. I'll give that a try.
Its seems like a long way around to add an external object to a scene, I think that would be ok for loading one object at a time, but what I'm aiming for is to draw a spline and have alot of extenal objects populate along it.
Do you think that method would be stable enough to work with a large number of objects (10 to 100)?
Is there a way todo it with C++?
Again thanks for your help, pulled me out of a hole.
On 19/10/2005 at 15:28, xxxxxxxx wrote:
I don't know what the performance considerations are in C.O.F.F.E.E. In the editor it might be painful if it's done for every frame, during rendering it probably doesn't matter too much. If it's just a one-time script I don't think it will be a problem.
In C++ it's a bit easier, as LoadDocument() doesn't put the scene in the active list. I don't think it's that much faster though. You'd probably need some caching if this part needs to be fast. (But remember the mantra: make it work, make it right, make it fast. In that order.)
On 19/10/2005 at 15:53, xxxxxxxx wrote:
I feared it wasnt going to be easy, a big pain in the ass to add external object is the bottom line then.
I just had a thought, I'm very new to cinema so if this is a stupid question just let me know, is there a library of objetcs in a c4d document that can be accesed like in MacromediaFlash?
Thanks for your help in this Mikael.
On 19/10/2005 at 15:55, xxxxxxxx wrote:
I'm not familiar with Flash enough to know. How does that library function work?
On 19/10/2005 at 16:03, xxxxxxxx wrote:
Basicly its a storage space for all the objects in a flash movie.
For example: you create an object (a Movie Clip) in the open document and its stored in the documents library. From there you can delete the Movie Clip from the workspace and reuse the object later on by dragging it from the library panle into the workspace (it dosent get deleted from the library).