Page MenuHome

DAG ID update tag improvements
AbandonedPublic

Authored by Tom Edwards (artfunkel) on Jan 25 2014, 9:20 PM.

Details

Summary

This patch makes further improvements to ID is_updated tagging. It:

  • Tags an ID as updated whenever any of its RNA properties are changed via Python. No notable performance penalty as only the LIB_ID_RECALC flag is set, which doesn't cause any recalculation to the ID block itself.
  • Fixes a bug where only the first byte of an ID type was examined when reading/writing bmain->id_tag_update. This was causing the mesh, material and metaball lists to all update at the same time, etc.
  • Tags a Group as updated when an object is added or removed.

Diff Detail

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.Jan 27 2014, 5:24 PM
Brecht Van Lommel (brecht) added inline comments.
source/blender/blenkernel/BKE_library.h
76

This can return an int, no need to use char.

source/blender/makesrna/intern/rna_access.c
1584

Always updating here is not ok, it will give too many viewport re-renders when changing properties that don't affect the final render.

It would be convenient if we could just always update but I don't think it's the right solution.

source/blender/makesrna/intern/rna_access.c
1584

Damn, I didn't think of that angle.

I do think that always updating is the solution (we don't what might be important to a script listening for scene_update events), which means we need a way of identifying which updates affect rendering. I'll try creating a new flag and get a new diff to you.