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>2020-05-27 09:47:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-05-27 09:47:30 +0300
commit355d1299654aa9861318df500e4d532c612a1cb9 (patch)
tree434e9b0e3974be72236f93e8039861445198fcec /source/blender/editors/include/ED_gizmo_library.h
parent1f7a791a539287c8f1cabc0f20f4c727e0fb36dc (diff)
Gizmo: lazy initialize snap context
ED_gizmotypes_snap_3d_context_get could have returned NULL, rename _get(..) to _ensure(..) and initialize the snap context in this function.
Diffstat (limited to 'source/blender/editors/include/ED_gizmo_library.h')
-rw-r--r--source/blender/editors/include/ED_gizmo_library.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_gizmo_library.h b/source/blender/editors/include/ED_gizmo_library.h
index 47ecbd73c9a..20b7b755234 100644
--- a/source/blender/editors/include/ED_gizmo_library.h
+++ b/source/blender/editors/include/ED_gizmo_library.h
@@ -257,7 +257,10 @@ void ED_gizmotypes_snap_3d_draw_util(struct RegionView3D *rv3d,
const uchar color_line[4],
const uchar color_point[4],
const short snap_elem_type);
-struct SnapObjectContext *ED_gizmotypes_snap_3d_context_get(struct wmGizmo *gz);
+struct SnapObjectContext *ED_gizmotypes_snap_3d_context_ensure(struct Scene *scene,
+ const struct ARegion *region,
+ const struct View3D *v3d,
+ struct wmGizmo *gz);
short ED_gizmotypes_snap_3d_update(struct wmGizmo *gz,
struct Depsgraph *depsgraph,
const struct ARegion *region,