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:
authorDalai Felinto <dfelinto@gmail.com>2017-03-02 17:03:02 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-03-02 19:09:24 +0300
commitaa845eed1e18fae45be8828bb08459c009dba6d5 (patch)
tree19655cc2de5cf2e722e4e5e598c33d5bc3b2e041 /source/blender/draw/intern/draw_view.c
parent561d11c5e601cce73dc6ab108596147bdfd4507c (diff)
Remove tons of OBACT
There are now only referenced in: * drawobject.c * particle_edit.c * space_image.c (a single case to be handled on workspace branch) * rigidbody_constraint.c (to be handled in the following commit)
Diffstat (limited to 'source/blender/draw/intern/draw_view.c')
-rw-r--r--source/blender/draw/intern/draw_view.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c
index 1983c1cd6ed..4d813124118 100644
--- a/source/blender/draw/intern/draw_view.c
+++ b/source/blender/draw/intern/draw_view.c
@@ -589,9 +589,9 @@ void DRW_draw_background(void)
/* **************************** 3D Cursor ******************************** */
-static bool is_cursor_visible(Scene *scene)
+static bool is_cursor_visible(Scene *scene, SceneLayer *sl)
{
- Object *ob = OBACT;
+ Object *ob = OBACT_NEW;
/* don't draw cursor in paint modes, but with a few exceptions */
if (ob && ob->mode & OB_MODE_ALL_PAINT) {
@@ -625,13 +625,14 @@ void DRW_draw_cursor(void)
View3D *v3d = CTX_wm_view3d(C);
RegionView3D *rv3d = CTX_wm_region_view3d(C);
Scene *scene = CTX_data_scene(C);
+ SceneLayer *sl = CTX_data_scene_layer(C);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
glDepthMask(GL_FALSE);
glDisable(GL_DEPTH_TEST);
glLineWidth(1.0f);
- if (is_cursor_visible(scene)) {
+ if (is_cursor_visible(scene, sl)) {
float *co = ED_view3d_cursor3d_get(scene, v3d);
unsigned char crosshair_color[3];