diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-03 18:56:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-03 19:02:13 +0300 |
commit | 656d6f47b921c0f5c9e12ea0eeae48d860b7b66f (patch) | |
tree | c0c25bacc56f472507f7c3dfbcdd6b26adbaeb1a /source/blender | |
parent | 7d6180364041553e49a9d3b25de57c73299da8a0 (diff) |
Fix 3D cursor being hidden on existing 2.8 files
Flip logic for the flag avoids versioning code.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 4 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_view.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 4 |
5 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index c9619137b9a..07f51dfbc2f 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1068,10 +1068,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main) } } } - if (sl->spacetype == SPACE_VIEW3D) { - View3D *v3d = (View3D *)sl; - v3d->overlays |= V3D_OVERLAY_3DCURSOR; - } } } } diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c index 5a0c5d1f35c..5b705a311c9 100644 --- a/source/blender/draw/intern/draw_view.c +++ b/source/blender/draw/intern/draw_view.c @@ -615,7 +615,7 @@ static bool is_cursor_visible(const DRWContextState *draw_ctx, Scene *scene, Vie { Object *ob = OBACT(view_layer); View3D *v3d = draw_ctx->v3d; - if ((v3d->flag2 & V3D_RENDER_OVERRIDE) > 0 || (v3d->overlays & V3D_OVERLAY_3DCURSOR) == 0) { + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) > 0 || (v3d->overlays & V3D_OVERLAY_HIDE_CURSOR)) { return false; } diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 086efbe9c34..ceff9fb2851 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -323,7 +323,7 @@ static SpaceLink *view3d_new(const ScrArea *UNUSED(sa), const Scene *scene) v3d->gridsubdiv = 10; v3d->drawtype = OB_SOLID; v3d->drawtype_lighting = V3D_LIGHTING_STUDIO; - v3d->overlays = V3D_OVERLAY_3DCURSOR; + v3d->overlays = 0; v3d->gridflag = V3D_SHOW_X | V3D_SHOW_Y | V3D_SHOW_FLOOR; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index dd2933b04ee..8b5c6f84f78 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -95,7 +95,7 @@ enum { enum { V3D_OVERLAY_FACE_ORIENTATION = (1 << 0), - V3D_OVERLAY_3DCURSOR = (1 << 1), + V3D_OVERLAY_HIDE_CURSOR = (1 << 1), }; typedef struct RegionView3D { diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 6feec355808..60c4fc20f77 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2267,8 +2267,8 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Show Overlays", "Display overlays like manipulators and outlines"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - prop = RNA_def_property(srna, "show_3dcursor", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "overlays", V3D_OVERLAY_3DCURSOR); + prop = RNA_def_property(srna, "show_cursor", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "overlays", V3D_OVERLAY_HIDE_CURSOR); RNA_def_property_ui_text(prop, "Show 3D Cursor", "Display 3D Cursor Overlay"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); } |