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

    GetAndCheckHierarchyClone() Problem?

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 311 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 01/09/2009 at 09:47, xxxxxxxx wrote:

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

      ---------
      Howdy,

      I have a problem with my input object:

      It seems that the GetAndCheckHierarchyClone() function can only handle one type of flag from the list of flags for a given hierarchy:

      > Quote: __
      >
      > * * *
      >
      > HCLONE_ASIS - Objects unchanged. (Used by e.g. ArrayObject.)
      >
      > HCLONE_ASPOLY - Objects cloned as polygons. (Used by e.g. HyperNURBS.)
      >
      > HCLONE_ASLINE - Objects cloned as line objects.
      >
      > HCLONE_ASSPLINE - Objects cloned as splines.
      >
      > * * *

      I found this thread:
      Search thread

      ... that shows how to handle multiple flags, but it doesn't work if the hierarchy in question is a mixture of different object types.

      If the hierarchy is like this:

      Plugin Object (input)
      -Sphere Primitive
      --Instance (cube)
      --Spline Primitive

      ... then the Spline Primitive is ignored

      If the hierarchy is like this:

      Plugin Object (input)
      -Spline Primitive
      --Sphere Primitive
      --Instance (Cube)

      ... then both the Sphere Primitive and the Instance are ignored.

      How can I get it to handle both flags when both types of objects are in the same hierarchy?

      Adios,
      Cactus Dan

      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 04/09/2009 at 02:11, xxxxxxxx wrote:

        Can you please post some code.

        This seems to work for me:

        > \> BaseObject \*res = NULL, \*orig = NULL; \>       \> orig = op->GetDown(); \> \> // return if no input object is available \> if (!orig) return NULL; \> \> // request polygonized input \> hh->AddVFlags(VFLAG_POLYGONAL); \> \> Bool dirty = FALSE; \> \> // generate polygonalized clone of input object \> res = op->GetAndCheckHierarchyClone(hh,orig,HCLONE_ASPOLY|HCLONE_ASSPLINE,&dirty;,NULL,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 04/09/2009 at 09:12, xxxxxxxx wrote:

          Howdy,

          Thanks for the reply, but I found the solution to my problem in your sticky thread "Poly meshes and GetVirtualObjects()". Probably should've looked at that thread in the first place. ;o)

          Adios,
          Cactus Dan

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