Saving object parameters in an plugin?



  • 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



  • 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;  
    


  • 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



  • 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



  • 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


Log in to reply