Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Selecting multiple objects and grouping.

    SDK Help
    0
    5
    654
    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
      Helper
      last edited by

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

      On 08/02/2003 at 20:31, xxxxxxxx wrote:

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

      ---------
      Can't seem to find any information on selecting multiple objects (per R8) in the documentation (no surprise) or anything on grouping objects.  Also need to "Connect" objects.  Since the R8 COFFEE documentation has yet to be made available and I'm still scouring the current documentation, can you please give me some hints on grouping or connecting a "selection" of objects?
      Thanks again,
      Robert Templeton

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

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

        On 09/02/2003 at 01:23, xxxxxxxx wrote:

        Multiple selection isn't available in C.O.F.F.E.E. in R8. (Not because there is no R8 documentation for C.O.F.F.E.E., but because no R8 features have been added to C.O.F.F.E.E. yet.)

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

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

          On 09/02/2003 at 09:01, xxxxxxxx wrote:

          Ah.  I figured the COFFEE in R8 would be updated already (at release).  No biggy there. 🙂  So I can group "manually" by creating a NullObject and setting the objects' parent to it.  How do I Functions->Connect a set of objects, if possible?
          Thanks, Mikael,
          Robert Templeton

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

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

            On 09/02/2003 at 10:47, xxxxxxxx wrote:

            Hi,
            Multiselection is possible with COFFEE, just set the bit of the object to active
            op->SetBit(BIT_AOBJ) should be in COFFEE. But it´s not useable with the connect function. You can use the sendmodelingcommands (see COFFEE doc) to connect a group of objects (parented null-object as you already stated).
            Samir

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

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

              On 09/02/2003 at 11:48, xxxxxxxx wrote:

              That's cool! 🙂
              Now, I'm having some difficulty setting a group of existing objects as children of a Null Object.  The only thing that I'm succeeding in is crashing C4D. 😞  It doesn't seem to like the InsertUnder() function (at the end of the code section).  If this in the incorrect approach to doing this or you find anything else strange, please let me know.  Here's the code:

                  
                  
                  
                  
                  { ...
                  
                  
                  
                  
                   // Prepare to create .obj file path  
                   ObjFile_Filename = new(Filename);  
                   ObjFile_Filename->SetFullString(stradd(configuration->GetPath(), token));  
                   println("ObjFile ", ObjFile_Filename->GetFullString());  
                   // Load .obj file into Cinema4D (New Document)  
                   if(!LoadDocument(ObjFile_Filename))  
                   {  
                    errdlgType = ERRDLG_NOREADFILE;  
                    errdlgText = ObjFile_Filename->GetFullString();  
                    var d = new(Error_GeModalDialog);  
                    d->Open(-1,-1);  
                    return FALSE;  
                   }  
                   baseDocument = GetActiveDocument();  
                   // Create a list array of objects loaded  
                   var object = baseDocument->GetFirstObject();  
                   if (object == NULL)  
                   {  
                    errdlgType = ERRDLG_NOOBJECTS;  
                    errdlgText = ObjFile_Filename->GetFullString();  
                    var d = new(Error_GeModalDialog);  
                    d->Open(-1,-1);  
                    return FALSE;  
                   }
                  
                  
                  
                  
                   var objectArray;  
                   var numObjects;  
                   var i;  
                   // Count number of objects  
                   for (numObjects = 0; object != NULL; numObjects++) object = object->GetNext();  
                   println("NumObjects = ", numObjects);  
                   objectArray = new(array, numObjects);  
                   // Insert objects into array  
                   objectArray[0] = baseDocument->GetFirstObject();  
                   for(i = 1; i < numObjects; i++) objectArray[i] = (objectArray[i-1])->GetNext();
                  
                  
                  
                  
                   // Ask user how to handle object  
                   var d = new(ObjectSettings_GeModalDialog);  
                   d->Open(-1,-1);  
                   if (d->GetResult())  
                   {  
                    // Perform object modification  
                    if (d->GROUP == d->GetSet())  
                    {  
                     objectSet = d->GROUP;  
                     // Insert a Null Object into Document  
                     mainObject = new(NullObject);  
                     baseDocument->InsertObject(mainObject, NULL, NULL);  
                     GeEventAdd(DOCUMENT_CHANGED);  
                     // Set NullObject name if user gave one  
                     if (d->GetSetname())  mainObject->SetName(d->GetName());  
                       
                     // Set all other objects as children of mainObject  
                     for (i = 0; i < numObjects; i++)  
                     {  
                      (objectArray[i])->InsertUnder(mainObject);  
                      GeEventAdd(DOCUMENT_CHANGED);  
                     }  
                    }
                  
                  
                  
                  
                  ...}
                  
                  
                  
              

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