diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-05-02 13:57:41 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-05-02 13:59:07 +0300 |
commit | d3964db5bd6d0496c7fc11657681ecde2d96272d (patch) | |
tree | 9884f23e22ec459c4b4d00e4427aa39ce8c4ca97 /source/blender/makesrna/intern/rna_object_force.c | |
parent | a9d6a07d78f78ea4a3a634d81c87f8001c1d61e9 (diff) |
RNA: Remove remaining relevant scene->basact and BaseLegacy
Note: In one case (rna_Scene_editmesh_select_mode_set) I had to resort
to the temporary solution of BKE_scene_layer_context_active.
This is fine for now, but it will be a problem once workspaces are
introduced. In this case the fix is to use a temporary value in the set
routine, and actually only set the active object in the update function
(which can take bContext).
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_force.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_force.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index ca0b4063616..3bfa2da9fc1 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -94,6 +94,7 @@ static EnumPropertyItem empty_vortex_shape_items[] = { #include "DNA_modifier_types.h" #include "DNA_texture_types.h" +#include "BKE_collection.h" #include "BKE_context.h" #include "BKE_modifier.h" #include "BKE_pointcache.h" @@ -605,11 +606,11 @@ static void rna_EffectorWeight_update(Main *UNUSED(bmain), Scene *UNUSED(scene), if (id && GS(id->name) == ID_SCE) { Scene *scene = (Scene *)id; - BaseLegacy *base; - - for (base = scene->base.first; base; base = base->next) { - BKE_ptcache_object_reset(scene, base->object, PTCACHE_RESET_DEPSGRAPH); + FOREACH_SCENE_OBJECT(scene, ob) + { + BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH); } + FOREACH_SCENE_OBJECT_END } else { DAG_id_tag_update(id, OB_RECALC_DATA | PSYS_RECALC_RESET); |