Notifications
Clear all

[Closed] .net Custom Control Keying and Playback

Hi

Could somebody with experience explain to me how keying and playback of keyed properties can be handled when creating and using custom .net controls. I understand how a function can be tied to an event to set keys on an attribute but how do you get the control to update with the correct value when scrubbing the time line?

Thanks, Jamell

3 Replies
 PEN

You need to do this with callbacks. Have a look in the help and it will explain how to set them up. Then I’m sure you will have more questions about it.

Thanks Paul, I thought that might be the case. Could you explain what #preNodeGeneralPropChanged, #postNodeGeneralPropChanged, #preNodeUserPropChanged, #postNodeUserPropChanged callbacks do. I am assuming I can use them to do what I want but am unsure. What is classed as a User Property?

Thanks

Edit: I just had a quick read on When Constructs which I think I could use to update custom controls when the transforms that they are linked to changes but have a couple of questions!

  1. If I used a when construct on a transform of an object would the function get called when the attributes change from scrubbing the timeline. Sorry if it is a stupid question!

  2. If the answer to the above is yes that’s great but I want to have the option of registering a callback to the change of a custom attribute. How would I go about doing that?

 PEN

You could also just do a general call back when the viewport changes. Might be over kill though but I think that I have used that in the past. When constructs would have to be setup for each object that needs to be called as you wouldn’t want those being called for ever object in the scene.