creating a clone of a linked object



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

    On 05/05/2009 at 15:47, xxxxxxxx wrote:

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

    ---------
    hi there,
    again i face a problem not able to solve..
    i have a link field in my gui which i use this way:

    > `

      
    \>  BaseObject *profile = (BaseObject* )(bc->GetLink(VIRAL_PROFILE,op->GetDocument()));  
    \>  
    

    `

    and want to use it later on for a sweep nurbs:
    > `

      
    \>            if (profile)   
    \>            {  
    \>                 op = (BaseObject* )(profile->GetClone(0, NULL));//BaseObject::Alloc(profile->GetType());  
    \>            }  
    \>            op->InsertUnderLast(sweep);  
    \>  
    

    `

    but it doesnt work. if i use the commented (...GetType) at least the Type of Object is created and inserted, but of course not its settings (like radius, etc)

    how do i use the linked object correctly in this case?

    thanks for your help



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

    On 05/05/2009 at 16:07, xxxxxxxx wrote:

    strange.. all of a sudden it works. with those lines...



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

    On 06/05/2009 at 11:53, xxxxxxxx wrote:

    even stranger, when i started it today, it doesnt work anymore?? what is causing that??



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

    On 06/05/2009 at 12:18, xxxxxxxx wrote:

    ok, i found out that if the Linked Object is placed after the ObjectPlugin (in the object manager) my code works, but if it is placed before it than the object isnt cloned.. any ideas??



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

    On 09/05/2009 at 15:52, xxxxxxxx wrote:

    anyone has an idea where i need to look after, to get rid of this strange behaviour?



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

    On 11/05/2009 at 08:02, xxxxxxxx wrote:

    It's probably a limitation of Cinema's object system. Mograph is facing the same problem. it really depends on the type of object plugin.

    cheers,
    Matthias



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

    On 11/05/2009 at 11:09, xxxxxxxx wrote:

    which command do i need to move the object automatically below the pluginObject?



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

    On 13/05/2009 at 15:05, xxxxxxxx wrote:

    hey ello,

    i just had the same problem and i found out that it seems to work if the linked object is placed before your object when you use:

    > clone = (BaseObject\* )link->GetClone(COPY_NO_BITS, NULL);



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

    On 14/05/2009 at 11:08, xxxxxxxx wrote:

    thank you fused, that works perfectly!


Log in to reply