Custom property cannot be animated
Closed, ResolvedPublic

Description

Blender2.8 Windows 64 bits version 30/08/2018 20:49

If you add a keyframe using I key over the custom property, if you move timeline, you cannot change or animate the custom property.

To reproduce:

  1. Open attached file.
  2. Select cube and in custom properties set "hide" property to 0
  3. Over "hide" property, press I to insert keyframe
  4. Move the timeline and try to change hide prop or insert a new keyframe

I noticed also some random blender crashes when clear the property keyframe of hide property.

I have tested the same in 2.79b and works.

I have pasted the log of one the crashes P775

I could reproduce the error with the default scene:

  1. Open default scene
  2. Select default cube
  3. Add a custom prop (the default name is prop)
  4. Press N and in properties enter any value to "prop"
  5. Press I over prop
  6. Now try to move timeline and insert a new value in the prop.
Bastien Montagne (mont29) triaged this task as Confirmed priority.Sep 3 2018, 4:22 PM

Reminds me of similar issue with some VSE properties in 2.7x… IIRC, animation gets re-evaluated when editing those values, hence they get reset to animated value immediately…

@Joshua Leung (aligorith), @Sergey Sharybin (sergey), not sure whether we have standard fix for those cases?

@Antonio Vazquez (antoniov): asked in IRC if I could also have a look, and here are my findings (sorry for the lengthy detour, this might all be totally obvious for others...)

Changing a value in a (already keyed) custom property will go through dependency graph DEG_OPCODE_ANIMATION and thus calls BKE_animsys_eval_animdata (where this all gets evaluated/reset to the current fcurve value)
deg_graph_id_tag_update: id=OBCube flags=TRANSFORM, GEOMETRY, TIME, triggered here

Changing a value for e.g. posx wont do this:
deg_graph_id_tag_update: id=OBCube flags=TRANSFORM
deg_graph_id_tag_update: id=OBCube flags=COPY_ON_WRITE

if I remove the TIME dependency (like P802), this will obviously work (but will probably lack updates elsewhere [drivers...])

From comments in code I was first expecting AnimOverride to take care of this [see animsys_evaluate_overrides()], but in fact these dont seem to be used at all?

Will have a look next how this survives in 2.79 with the new dependency graph...

Another thing I noticed when having an animated custom property is that even other keyframes might not be evaluated anymore (and this is even true for 2.79 with new depsgraph)...:

  • Open default scene
  • Select default cube
  • Add a custom prop (the default name is prop)
  • Press N and in properties enter any value to "prop"
  • Press I over prop
  • insert single keyframe on locx
  • move one frame forward, change locx to 1, insert single keyframe on locx again
  • change frames --> transform is not updated! [even though it is keyed]
  • this goes back to normal evaluation after file reload

(more detailed depsgraph info in P803)

Initially reported bug is caused by ID properties always tagging for time update. Doing something like this P806 solves the issue.

My guess is this is because old depsgraph was ignoring time update if animation data wasn't tagged for update. The new code with proposed i *think* is correct.

Not sure it's the same issue as @Philipp Oeser (lichtwerk) did report.

@Sergey Sharybin (sergey): thought so, too [P802 == P806 :)]
(if that doesnt cause bad stuff elsewhere: great)

second issue remains though [the one with not updating transform -- see above. Should I move this to a separate report?]