On Wed, Nov 24, 2010 at 5:08 AM, Matt Ebb <[email protected]> wrote: > Hi, > > What's the deal with RNA property update functions and the animation system? > > I would have expected the animation system to run the update functions > when an rna property is updated via an fcurve/driver/etc, but they're > not. Why is this, and can it be fixed? It's pretty bizarre that you > can drag a property button, see the value in the button change, and > see the results update (since the rna update function is being > triggered) but if you do the same thing via an fcurve, see the same > value in the button change, no update functions get run. > > This is throwing a spanner into the works of this ocean sim work, > since I need to be able to update the simulation data when parameters > (currently belonging to a texture) are changed, eg. 'time'. It works > fine when you're dragging values in the property editor, but if you > animate it, nothing updates. It's not just updating the sim either, > the update functions are used to send depgraph update notices which > aren't being sent either. > > RNA set functions are not appropriate here - I'm not doing anything > fancy to the values as they are set, it's just setting DNA directly > like most normal RNA properties - the issue is that I'm telling it to > update when it's changed, but it's not doing that. > > How can I make this work? > > Matt
>From what I can tell, the reason update functions are not called is because it would slow blender down too much. Especially for arrays - quat's colors, rotations. Where updating a transformation or material 3-4 times will immediately make blender noticeably slower. One possible solution is to queue unique update functions for each update, per ID. A function pointer GHash & a check/w previous comparison should make collecting unique functions quite fast. Then these can run at the end, per ID. -- - Campbell _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
