Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-02-08 13:14:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-08 13:14:26 +0300
commit345c6298e995ea618c34282ba6d7ab5af032f191 (patch)
treef4fbc4798e17d0f19efc28b51a41425d0c552be8 /source/blender/makesrna/intern/rna_object_force.c
parent14a19fed788af0cf3695eb5def92510841056e08 (diff)
Object Mode: move to workspace struct
- Read-only access can often use EvaluationContext.object_mode - Write access to go to WorkSpace.object_mode. - Some TODO's remain (marked as "TODO/OBMODE") - Add-ons will need updating (context.active_object.mode -> context.workspace.object_mode) - There will be small/medium issues that still need resolving this does work on a basic level though. See D3037
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_force.c')
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 941cef0eafe..32edabe37d9 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -53,6 +53,7 @@ static const EnumPropertyItem effector_shape_items[] = {
#include "BLI_math_base.h"
+#include "BKE_main.h"
/* type specific return values only used from functions */
static const EnumPropertyItem curve_shape_items[] = {
@@ -523,7 +524,7 @@ static void rna_FieldSettings_shape_update(Main *bmain, Scene *scene, PointerRNA
{
if (!particle_id_check(ptr)) {
Object *ob = (Object *)ptr->id.data;
- ED_object_check_force_modifiers(bmain, scene, ob);
+ ED_object_check_force_modifiers(bmain, scene, ob, bmain->eval_ctx->object_mode);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob);
WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob);
}
@@ -710,7 +711,7 @@ static void rna_CollisionSettings_dependency_update(Main *bmain, Scene *scene, P
/* add/remove modifier as needed */
if (ob->pd->deflect && !md)
- ED_object_modifier_add(NULL, bmain, scene, ob, NULL, eModifierType_Collision);
+ ED_object_modifier_add(NULL, bmain, scene, ob, bmain->eval_ctx->object_mode , NULL, eModifierType_Collision);
else if (!ob->pd->deflect && md)
ED_object_modifier_remove(NULL, bmain, ob, md);