Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
On 27/09/2014 at 06:10, xxxxxxxx wrote:
I have a tagplugin with userdata defined in Init(self, node). Of course only when if (len(node.GetUserDataContainer()) == 0).
What I see happening is that for every change in the userdata Init(), Execute() and Message() are triggered.
So, what is the best place to process user input? For example when a slider in Userdata is changed?
I guess it should be Execute(). But Execute() is called in a thread context. and thus not everything is possible. For example gui.RenameDialog() is not possible "invalid cross-thread call".
I can not use Message() because I do not know which message should I handle. It is not MSG_DESCRIPTION_COMMAND or MSG_DESCRIPTION_EDIT_ENTRY.
On 30/09/2014 at 07:37, xxxxxxxx wrote:
MSG_DESCRIPTION_COMMAND is triggered when your tag has a button that is pressed - that is the best location where to open GUI commands.
Never call any blocking operations in TagData.Execute. Imagine you press play and a dialog opens for every frame.
Cheers, s_rath
On 30/09/2014 at 10:27, xxxxxxxx wrote:
But how can I detect a slider interaction with MSG_DESCRIPTION_COMMAND? There is no data or id.
What´s about
if (type == c4d.MSG_DESCRIPTION_USERINTERACTION_END) : all ud values must be storerd in a variable and be compared for any userinteraction.
Is this the best way to handle this?? Or just cumbersome?
best wishes Martin
edit or if it is a slider that should be updated in realtime if (type == c4d.MSG_DESCRIPTION_CHECKUPDATE)
On 30/09/2014 at 23:46, xxxxxxxx wrote:
I can not use Message() because I do not know which message should I handl