I need to apply SetDirty() function only after finishing the manipulation process of the desired parameter.
Something like this is implemented in the material preview.
The update takes place only after ~0.5 seconds after finishing the manipulation.
So, I tried to check updates via MSG_DESCRIPTION_CHECKUPDATE and calculate the time by utilizing timeit module
start = timeit.default_timer() #Start Timer
if type == c4d.MSG_DESCRIPTION_CHECKUPDATE:
if data["descid"].id == TEST_SLIDER: #Check if TEST_SLIDERis updated
end = timeit.default_timer() #End Timer
if end - start > 1: #Do something if time took more than 1 sec
But unfortunately, I can't find the solution in the documentation.
What am I doing wrong and how to do this properly?
you could react to the message MSG_DESCRIPTION_USERINTERACTION_END which is sent after the user stopped interacting with the parameter in the Attribute Manager.
You find a list of related messages in the NodeData::Message() Manual.
Is this feature available for Python?
Nice it works with python but how to check only one parameter instead of everything?
something like this
if type == c4d.MSG_DESCRIPTION_USERINTERACTION_END:
if data["descid"].id == TEST_SLIDER:
the message MSG_DESCRIPTION_USERINTERACTION_END has no data. You could store the old value of the parameter in question and check if that value has changed.