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-06 08:10:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-06 10:03:28 +0300
commit28dfc47cf0b068d0103986424f79eeea59f2039b (patch)
tree5be77cc019cb6deda3416e0dc2385b48eac1232a /source/blender/draw/intern/draw_view.c
parent1c600cc643306c12f2bc652b2ea921ecbb3cfadf (diff)
Object Mode: Add to EvaluationContext & DRWContextState
Diffstat (limited to 'source/blender/draw/intern/draw_view.c')
-rw-r--r--source/blender/draw/intern/draw_view.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c
index 391c29e511f..1e1f9da3c97 100644
--- a/source/blender/draw/intern/draw_view.c
+++ b/source/blender/draw/intern/draw_view.c
@@ -611,20 +611,20 @@ void DRW_draw_background(void)
/* **************************** 3D Cursor ******************************** */
-static bool is_cursor_visible(Scene *scene, ViewLayer *view_layer)
+static bool is_cursor_visible(const DRWContextState *draw_ctx, Scene *scene, ViewLayer *view_layer)
{
Object *ob = OBACT(view_layer);
/* don't draw cursor in paint modes, but with a few exceptions */
- if (ob && ob->mode & OB_MODE_ALL_PAINT) {
+ if (ob && draw_ctx->object_mode & OB_MODE_ALL_PAINT) {
/* exception: object is in weight paint and has deforming armature in pose mode */
- if (ob->mode & OB_MODE_WEIGHT_PAINT) {
+ if (draw_ctx->object_mode & OB_MODE_WEIGHT_PAINT) {
if (BKE_object_pose_armature_get(ob) != NULL) {
return true;
}
}
/* exception: object in texture paint mode, clone brush, use_clone_layer disabled */
- else if (ob->mode & OB_MODE_TEXTURE_PAINT) {
+ else if (draw_ctx->object_mode & OB_MODE_TEXTURE_PAINT) {
const Paint *p = BKE_paint_get_active(scene, view_layer);
if (p && p->brush && p->brush->imagepaint_tool == PAINT_TOOL_CLONE) {
@@ -654,7 +654,7 @@ void DRW_draw_cursor(void)
glDisable(GL_DEPTH_TEST);
glLineWidth(1.0f);
- if (is_cursor_visible(scene, view_layer)) {
+ if (is_cursor_visible(draw_ctx, scene, view_layer)) {
float *co = ED_view3d_cursor3d_get(scene, v3d);
unsigned char crosshair_color[3];