Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Dynamic Descriptions and Animation ;)

    SDK Help
    0
    2
    270
    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
      Helper
      last edited by

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

      On 02/03/2006 at 23:15, xxxxxxxx wrote:

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

      ---------
      Time for a lesson about putting the horse before the cart...

      My plugin imports Poser figures (etc.). Normally, you would import the figure and animate interactively or by applying animated poses to the figure after the fact. The animation tracks are stored on Dynamic Description Real sliders which keep unique indices. Easy-peazy.

      Now answer me this: If the figure is already animated when being loaded, the Dynamic Descriptions don't really exist yet, do they? They are only created, it seems, when the actual object is selected and thus triggers a call to GetDDescription(). So, how to handle this?

      If the DD doesn't yet exist, my code stores the animation keys for later application. But there is still required that kick in the pants to get GetDDescription() to create the darn things. I've found that ActiveObjectManager_SetObject() can be used, but it is not very pretty watching all of the objects cycle through the AM to create the DDs.

      Is there an alternative?

      Thanks,

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

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

        On 04/03/2006 at 17:16, xxxxxxxx wrote:

        Took long enough, but I remembered that the same problem existed for my polygon selection tag visibilty tag (so that they could be unrendered).

        The idea is simple: send an unused message (MSG_RETRIEVEPRIVATEDATA works most of the time) to the plugin object when the descriptions in GetDDescription() may not be constructed yet but you need them for applying settings programmatically. Simply doing a node->GetDescription(desc, 0) in the plugin Message() seems to do the trick. Description* desc is allocated in Init() for whenever I need to call GetDescription() (often enough to justify it).

        I really did not like ActiveObjectManager_SetObject() as it required much more time and all you see is the darn AMs whizzing by (and it would open an AM windows if none were available to boot!).

        Alternative achieved!

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