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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Polygon Reduction->CurrentStateToObject

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 396 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 09/09/2007 at 19:47, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R8.2-R10 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      I'm sort of in a quandry here. When done manually, adding a Polygon Reduction deformer, waiting for it to do the calculations, and then doing CurrentStateToObject works. When done programmatically, I don't always get what I want and this appears to be related to how long the Polygon Reduction takes to do its work and the execution of my code.

      So, is there any way to wait on something that would indicate that the Polygon Reduction deformer has finished doing its work before commencing with CurrentStateToObject (SendModelingCommand())?

      Thanks!

      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 09/09/2007 at 20:12, xxxxxxxx wrote:

        Hmmm. I see that Polygon Reduction eventually returns MSG_POINTS_CHANGED and MSG_POLYGONS_CHANGED - sort of expected and hoped for. Soooo, if I set a mode flag to separate my process from any others, it can wait and continue. The problem is 'continuing'. This makes the method/code layout a bit treacherous stopping a linear routine (setting undos and whatnot) at one point and then starting the process up again later. Fun! 🙂

        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 09/09/2007 at 21:25, xxxxxxxx wrote:

          Hmmm, again.

          It seems that when the MSG_POLYGONS_CHANGED arrives, it is on a copy of the original. Working with this doesn't appear to be very fruitful in the CurrentStateToObject phase.

          How would I get around this? I tried storing the original tag (to get at the original object). That works - if you want CSTO of the original geometry - not! I want a CSTO of the reduced geometry. Maybe GetDeformCache() is called for here?

          It would have been much easier if my linear process could 'wait' inline on the Polygon Reduction deformer instead of this long winded approach - eh hem...

          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 09/09/2007 at 22:34, xxxxxxxx wrote:

            Okay. Nevermind...

            So the original method works. The fault lies in how I'm restoring the figure to 'default pose' - if morphs are controlled by other 'dials', they are zeroed, unfortunately. Not much to do to avoid this for what is being done - don't ask! 😉

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