Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    c.o.f.f.e.e. help!

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 310 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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:

      User Information:
      Cinema 4D Version:   9.6 
      Platform:      
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hello!
      I've got a question:
      I've got the following code:

      var file = new(Filename);
      file=GeGetRootFilename();
      file->RemoveLast();
      file->AddLast("objekt.c4d");
      LoadDocument(file);
      var currentObject = GetActiveObject(doc);
      var clone;
      clone=currentObject->GetClone(CL_NO_HIERARCHY);
      var actdoc=GetActiveDocument();
      actdoc->InsertObject(clone,NULL,NULL);
      //KillDocument();
      EventAdd(DOCUMENT_CHANGED);

      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!

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 11/12/2006 at 06:42, xxxxxxxx wrote:

        Afaik! not possible in COFFEE. Sorry, only via C++.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          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.

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            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.

            cheers,
            Matthias

            1 Reply Last reply Reply Quote 0
            • First post
              Last post