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_texture.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_texture.c')
-rw-r--r--source/blender/makesrna/intern/rna_texture.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 42e3e2c83fb..e2e44a8ac5c 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -37,6 +37,7 @@
#include "DNA_node_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h" /* MAXFRAME only */
+#include "DNA_workspace_types.h"
#include "BLI_utildefines.h"
@@ -247,10 +248,11 @@ void rna_TextureSlot_update(bContext *C, PointerRNA *ptr)
break;
case ID_BR:
{
+ const WorkSpace *workspace = CTX_wm_workspace(C);
Scene *scene = CTX_data_scene(C);
MTex *mtex = ptr->data;
ViewLayer *view_layer = CTX_data_view_layer(C);
- BKE_paint_invalidate_overlay_tex(scene, view_layer, mtex->tex);
+ BKE_paint_invalidate_overlay_tex(scene, view_layer, mtex->tex, workspace->object_mode);
WM_main_add_notifier(NC_BRUSH, id);
break;
}