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

    How to determine if an object changed

    SDK Help
    0
    10
    802
    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 07/05/2008 at 05:43, xxxxxxxx wrote:

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

      ---------
      hey,

      im trying to figure out if an object gets changed while animation(not the matrix; like animated metaballs, morphing, or such).

      is this possible? how?

      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 07/05/2008 at 14:18, xxxxxxxx wrote:

        no one? i'd be happy with a simple 'no' 🙂

        i suspect(!) that after

        AnimateDocument(BaseThread* bt, Bool doexpressions, Bool doanim);

        the cache of the changed objects (mataballs, to keep that example) is rebuilt.
        or does c4d rebuild the cache of all objects? well, that wouldnt be much help then...

        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 07/05/2008 at 15:35, xxxxxxxx wrote:

          I think that your explanation of 'changed' is too vague. It is possible to have a set of keyframes all the same value and most likely Cinema 4D is going to send the same message as if the keyframes were different values. In other words, what are the triggers, what are the results, and how do you differentiate them?

          One of the problems with the SDK is that some of the messages are very ambiguous/ubiquitous. For instance, MSG_UPDATE is usually used for a matrix change but not necessarily. Reading carefully, it says 'if the bounding box has to be recalculated' which could be the result of bone deformations, modifiers (bones are special modifiers), morphs, or matrix changes (among others one supposes). There are no particulars that can be used to determine the exact trigger of the message.

          There is the new MSG_ANIMATE but, again, you'll have to experiment to see if it provides the verification that you seek.

          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 07/05/2008 at 16:00, xxxxxxxx wrote:

            thanks for your reply!

            > Quote: Originally posted by kuroyume0161 on 07 May 2008
            >
            > * * *
            >
            > I think that your explanation of 'changed' is too vague.
            >
            > * * *

            with 'changed' i meant if the polygonal mesh changes(position of points, polygons, new/deleted points or polygons etc...).

            i could just compare the actual cache in terms of point/polygon positon/count to the cache of the frame before, but there has to be an easier way to determine if the polygonal mesh changes while animation.

            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 07/05/2008 at 16:02, xxxxxxxx wrote:

              another con for that way would be, that i always have an extra copy of a possibly very large object in memory.

              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 11/05/2008 at 14:41, xxxxxxxx wrote:

                Howdy,

                Have you tried:
                if(op->IsDirty(DIRTY_CACHE))

                The flags for the IsDirty() function are:
                DIRTY_MATRIX
                DIRTY_DATA
                DIRTY_SELECT
                DIRTY_CACHE

                Adios,
                Cactus Dan

                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 13/05/2008 at 08:48, xxxxxxxx wrote:

                  yes i tried, but it didnt work...

                  will try again, just to make sure.

                  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 13/05/2008 at 08:52, xxxxxxxx wrote:

                    Howdy,

                    I've noticed that when using the IsDirty() function, it seems to be dependent on when in the pipeline it's called. The only place I've used it with success so far in my plugin code was in the Execute() function. ;o)

                    Edit:
                    But, there I've only checked for a dirty matrix. I haven't tried the other flags yet. :o(

                    Adios,
                    Cactus Dan

                    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 14/05/2008 at 03:35, xxxxxxxx wrote:

                      At what point do you want to check for a change of the object, for example is it a plugin tag or a generator etc.?

                      In general checking caches and dirty flags is only save for generators in GetVirtualObjects(). Otherwise you have to make sure that the caches are really build. It wouldn't be save to do in a command plugin for instance.

                      cheers,
                      Matthias

                      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 14/05/2008 at 08:53, xxxxxxxx wrote:

                        it would be a command plugin.

                        thank you so far! i settled on a not so user friendly solution. but its ok i think...

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