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

    get the link for the real object

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 297 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 17/02/2009 at 01:15, xxxxxxxx wrote:

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

      ---------
      In a deformer plugin, in this procedure:

      ModifyObject(PluginObject *mod, BaseDocument *doc, BaseObject *op, const Matrix &op;_mg, const Matrix &mod;_mg, Real lod, LONG flags, BaseThread *thread)

      The "Baseobjetc *op" point to the virtual deformed object, I need to get the link to the real object instead!
      Or alternatively a way to identify the real object unambiguously.

      Is this possible?

      Thank's in advance.
      Lorenzo

      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 17/02/2009 at 02:28, xxxxxxxx wrote:

        You can step up through the caches with GetCacheParent().
        This sample code will give you the original object.

        > \> Bool Spherify::ModifyObject(PluginObject \*mod, BaseDocument \*doc, BaseObject \*op, const Matrix &op;\_mg, const Matrix &mod;\_mg, Real lod, LONG flags, BaseThread \*thread) \> { \>      BaseObject \*temp = NULL; \>      BaseObject \*orig = NULL; \>      orig = op; \> \>      temp = op->GetCacheParent(); \> \>      while(temp) \>      { \>           orig = temp; \>           temp = temp->GetCacheParent(); \>      } \> \>      if(orig) \>      { \>           //orig is the original object, do something \>           GePrint(orig->GetName()); \>           GePrint(LongToString(orig->GetType())); \>      } \> \>      return TRUE; \> } \>

        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 17/02/2009 at 02:34, xxxxxxxx wrote:

          Thank Matthias very much, I'll try soon!

          Lorenzo

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