diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-09-05 00:51:09 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-09-05 00:51:09 +0400 |
commit | 7df35db1b1364dcd81dd8247ad3707d40a78fd59 (patch) | |
tree | fb967409fddbb02ee70fbdfa1e404fae115a312e /source/blender/makesrna/intern/rna_key.c | |
parent | 5342f7930fb26855b92f337ace45f2ee51153957 (diff) |
2.5
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
Diffstat (limited to 'source/blender/makesrna/intern/rna_key.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_key.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index 88047cda12b..fbe339fe7f3 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -260,14 +260,13 @@ static PointerRNA rna_ShapeKey_data_get(CollectionPropertyIterator *iter) static void rna_Key_update_data(bContext *C, PointerRNA *ptr) { Main *bmain= CTX_data_main(C); - Scene *scene= CTX_data_scene(C); Key *key= ptr->id.data; Object *ob; for(ob=bmain->object.first; ob; ob= ob->id.next) { if(ob_get_key(ob) == key) { - DAG_object_flush_update(scene, ob, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob); + DAG_id_flush_update(&ob->id, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); } } } |