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

    IN_EXLUDE

    SDK Help
    0
    14
    1.2k
    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 05/12/2006 at 02:40, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.507 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi
      in one of my description files which belongs to a tagplugin is an IN_EXLUDE field where i want to drop in other objects. If the user drops an object into the IN_EXLUDE field, the dropped in object should get the same position as the owner object of the tag plugin.
      Can somebody help me with that?

      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 05/12/2006 at 04:00, xxxxxxxx wrote:

        What do you mean with same position, the same postion in 3D space?

        cheers,
        Matthias

        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 05/12/2006 at 04:39, xxxxxxxx wrote:

          Yes, the coordinates (in space) should be the same.

          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 05/12/2006 at 06:26, xxxxxxxx wrote:

            If you are going for position, rotation, scale, then this should suffice:

            // Just for reference, set wherever you do this
            BaseObject* tagObj;
            BaseObject* dropObj;

            dropObj->SetMg(tagObj->GetMg());

            That'll set the dropped object's global matrix to match that of the object with the tag plugin.

            If you just want position, then you will need to do a little more work:

            SetGlobalPosition(dropObj, tagObj->GetMg().off);

            // Set Object's Global Position
            //*---------------------------------------------------------------------------*
            void SetGlobalPosition(BaseObject* obj, const Vector& pos)
            //*---------------------------------------------------------------------------*
            {
                 Matrix     mg = obj->GetMg();
                 mg.off = pos;
                 obj->SetMg(mg);
            }

            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 08/12/2006 at 02:18, xxxxxxxx wrote:

              Thx for this kuroyume.
              But my problem is that i don't know how to access the IN_EXCLUDE field. I need an operation like:
              dropObj = (dropped item in IN_EXCLUDE field)
              hope somebody knows what i mean ^^

              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 08/12/2006 at 09:47, xxxxxxxx wrote:

                Maybe this link will help?

                Forum Thread

                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 11/12/2006 at 06:35, xxxxxxxx wrote:

                  Here a little example of a modified Execute function that prints the name of the objects in the in/exclude list.

                    
                  LONG LookAtCamera::Execute(PluginTag *tag, BaseDocument *doc, BaseObject *op, BaseThread *bt, LONG priority, LONG flags)  
                  {  
                       BaseContainer *data = tag->GetDataInstance();  
                    
                       InExcludeData *mylist = (InExcludeData* )data->GetCustomDataType(LOOKATCAMERAEXP_LIST,CUSTOMDATATYPE_INEXCLUDE_LIST);   
                       if (!mylist ) return LOAD_NOMEM;  
                    
                       LONG objcnt = mylist->GetObjectCount();  
                       LONG i;  
                       for(i=0; i<objcnt; i++)  
                       {  
                            GePrint(mylist->ObjectFromIndex(doc, i)->GetName());  
                       }  
                    
                       return EXECUTION_RESULT_OK;  
                  }  
                  

                  hope this helps

                  cheers,
                  Matthias

                  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 12/12/2006 at 00:26, xxxxxxxx wrote:

                    Thanks for this kuroyume and Matthias. Think this will work

                    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 12/12/2006 at 06:28, xxxxxxxx wrote:

                      OK the thing with the IN_EXCLUDE field works now. But i got a little problem with the following source:
                      BaseContainer *data = tag->GetDataInstance();
                      InExcludeData *mylist = (InExcludeData* )data->GetCustomDataType(ID_DROP_YP,CUSTOMDATATYPE_INEXCLUDE_LIST);
                      if (!mylist ) return LOAD_NOMEM;
                      LONG objcnt = mylist->GetObjectCount();
                      for(LONG i=0; i<objcnt; i++)
                      {
                      Vector posnew = (100,100,100);
                      BaseContainer *drpndata = mylist->ObjectFromIndex(doc, i)->GetDataInstance();
                      drpndata->SetVector(ID_BASEOBJECT_POSITION,newpos);
                      }
                      I want to change the position vector of the dropped in data to posnew and i thought this should work, but it doesn't. Any ideas???
                      Or is there a way to change position like this:
                      {
                      Vector posnew = (100,100,100);
                      BaseObject *drpndata = mylist->ObjectFromIndex(doc, i); ***
                      drpndata->SetPos(posnew);
                      }
                      *** I know this doesn't work, but is there a way to convert the IN_EXCLUDE mylist to a BaseObject to acccess the SetPos function???

                      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 12/12/2006 at 09:23, xxxxxxxx wrote:

                        You have to cast the result of ObjectFromIndex, for instance like this:

                          
                        BaseObject *drpndata = (BaseObject* )mylist->ObjectFromIndex(doc, i);  
                        

                        cheers,
                        Matthias

                        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 12/12/2006 at 11:24, xxxxxxxx wrote:

                          This works really great. Thanks a lot Matthias

                          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 15/12/2006 at 00:17, xxxxxxxx wrote:

                            Another question, concerning layouting the IN_EXCLUDE field. Is there a way to specify the size of the IN_EXCLUDE field, cause my field is to small to add e.g. an cylinder object so you have to scroll in the field.

                            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 18/12/2006 at 07:10, xxxxxxxx wrote:

                              You have to set SCALE_V in the descriptio for both the GROUP and the description element, little example:

                                
                              GROUP ID_TAGPROPERTIES  
                              {  
                                   SCALE_V;  
                                          
                                   IN_EXCLUDE LOOKATCAMERAEXP_LIST { NUM_FLAGS 0; SCALE_V; ACCEPT { Obase; } }  
                              }  
                              

                              cheers,
                              Matthias

                              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 19/12/2006 at 01:52, xxxxxxxx wrote:

                                OK thanks for that Matthias. But i got still more questions 🙂
                                Is there a way to limit the number of objects, that can be dropped in the IN_EXCLUDE field?

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