Finding one's own objects



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

    On 07/06/2003 at 13:17, xxxxxxxx wrote:

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

    ---------
    Hi all,

    when my plug-in walks through the tree of objects and tags and materials and whatever in a scene: How can it find out which of them are its own?

    Can it ask an object, tag, etc. for the ID of the plug-in which created it?

    Or do I have to add some sort of magic cookie via SetCustomData?

    There is no virtual function which I may override in a plug-in to that end?!

    So I really have to rely on dynamic_cast?

    Thanks in advance.

    Regards,

    Joern Loviscach



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

    On 08/06/2003 at 04:38, xxxxxxxx wrote:

    use GetType() and check for your plugin id...



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

    On 08/06/2003 at 04:56, xxxxxxxx wrote:

    Alseo note that RTTI, required for dynamic_cast, is disabled by default in the SDK. And even if you enable it, you can't use it on C4D objects since they a) aren't compiled with that option and b) don't have any virtual functions, which is needed for RTTI. (There are probably other reasons, like DLL boundaries, but I think you get the point... :-)


Log in to reply