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
    • Recent
    • Tags
    • Users
    • Login

    Saving object parameters in an plugin?

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 367 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 29/03/2010 at 13:50, xxxxxxxx wrote:

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

      ---------
      Hi there,

      is there a way to prevent objects used by GetAndCheckHierarchyClone from being rendered?
      I use this line to get a copy of the base object (called start)

      temp = op->GetAndCheckHierarchyClone(hh,start,HCLONE_ASIS,&dirty,NULL,FALSE);
      

      and it works well in the editor. the original objects are replaced by new ones. however, when i render the scene the original objects and the new ones show up.

      what can i do?? i hope someone can give me advice how to get this working.

      thanks,
      ello

      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 30/03/2010 at 11:24, xxxxxxxx wrote:

        hm, maybe there is another way to achive what i am trying to? I place a objectplugin in a document and this plugin cycles thru all objects and if an object is within a certain range it gets replaced by a modified clone of it.

        the main problem is how to save the original objects for the case that the plugin object is moved or deletet. in that case the original objects should be where they where before.

        as i mentioned in the editor my method works quite well, just when rendering the objects reappear.

        any ideas? hints??

        here is my code:

          
          
          main = BaseObject::Alloc(Onull);  
          main->SetName("magneTo");    
          if (!main) goto Error;  
          start = doc->GetFirstObject();  
          if(!start) goto Error;      
          while(start)  
          {  
              if (start!=op)  
              {  
                  d =distance(start->GetMg().off,op->GetMg().off);  
                  if (d<range)  
                  {  
                      temp = op->GetAndCheckHierarchyClone(hh,start,HCLONE_ASIS,&dirty,NULL,FALSE);  
                      //modifie temps rotation, scale and position...  
                      ...  
                      temp->InsertUnderLast(main);  
                  }  
              }  
              start = start->GetNext();  
          }   
          return main;  
        Error:  
          return NULL;  
        
        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 01/04/2010 at 10:39, xxxxxxxx wrote:

          Hi again, i updated the thread title because i think that it fits more what exactly i am trying to do.
          Is there a way to keep the objects in a document somewhere in case that the pluginobject is removed by the user or the pluginobject is moved so that some objects are not in the range anymore?

          i am creating a plugin which manipulates all objects within a certain range and thus i need to save the original position somehow.

          any hints are really appreciated since i dont know how to do it other than how i did and that way only works in the editor..

          cheers,
          ello

          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 05/04/2010 at 23:59, xxxxxxxx wrote:

            It is not allowed to change a document by plugins (except CommandData plugins). The only safe way to do things like this is if the object you reacting to is a child object of your object plugin. You can then return object depending on the child objects.

            cheers,
            Matthias

            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 06/04/2010 at 00:07, xxxxxxxx wrote:

              arg.. i was afraid this could be the case. in the meantime i have created a inexclude field for dropping objectgroups into.. not what i really wanted, but this way it is somehow working

              thanks for your input,
              cheers,
              ello

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