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:
Cinema 4D Version: 9.1
Platform: Windows ;
Language(s) : C++ ;
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?
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...
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.
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.
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.
On 11/05/2008 at 14:41, xxxxxxxx wrote:
Have you tried:
The flags for the IsDirty() function are:
On 13/05/2008 at 08:48, xxxxxxxx wrote:
yes i tried, but it didnt work...
will try again, just to make sure.
On 13/05/2008 at 08:52, xxxxxxxx wrote:
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)
But, there I've only checked for a dirty matrix. I haven't tried the other flags yet. :o(
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.
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...