How to track user changes to parameter animation
-
As I demonstrated above, how to track the user's changes to the parameter animation in a customObjectPlugin
, or receive a message when the user changes the animation. Do I need to listen to the above events inObjectData::Message()
?Can someone help me?Thank,
AiMiD -
To detect the value changing you can override the SetDParameter(...) method. Not sure about an animated value though.
https://developers.maxon.net/docs/cpp/2023_2/class_node_data.html#a01cc573d65703c02dcbe65fc98dee065
-
hi,
As kent said you must override SetDParameter. This function should be caled who/whatever have changed the value of the attribut.
You can have information on this post about the difference with SetDParameter and MSG_DESCRIPTION_POSTSETPARAMETER
As the post suggest, you can have more information in our manual about SetDParameter and Messages specially MSG_DESCRIPTION_POSTSETPARAMETER
Cheers,
Manuel -
@kbar and @m_magalhaes, Thank you for your reply.
I know that parameter changes can be determined by overridingSetDParameter()
.
But I don't know how to overrideSetDParameter()
to know whether the user has added / deleted keyframes, or changed the value of keyframes (whether the small button next to the parameter is pressed). Thank you again for your help.Thank,
AiMiD -
hi,
There is no really way of doing it. The only way is to keep track of what is going on. the number of keys, the position, values etc.
When setDparameter is called you need to compare and update your data.
You could just store the dirty state or a lot more information. Keep in mind that you can have mutiple tracks for the position. This is tricky and long to do but possible.Cheers,
Manuel