diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-02-08 15:10:16 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-02-08 15:10:16 +0300 |
commit | d4913af84660318047e3404f9766014cd78864ab (patch) | |
tree | 216516057dc8df5177e4f179392de5a79811ba3f /source/blender/editors/armature/editarmature_sketch.c | |
parent | c973e8d2da5cf3f615256269128a07390f8c06a9 (diff) | |
parent | 8cda364d6f2e6e8da454034f19fb959739045813 (diff) |
Merge branch 'master' into blender2.8
# Conflicts:
# source/blender/blenloader/intern/writefile.c
Diffstat (limited to 'source/blender/editors/armature/editarmature_sketch.c')
-rw-r--r-- | source/blender/editors/armature/editarmature_sketch.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index caa18b91775..4d9ba351c3a 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -970,6 +970,9 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S ToolSettings *ts = CTX_data_tool_settings(C); int point_added = 0; + /* TODO: Since the function `ED_transform_snap_object_context_create_view3d` creates a cache, + * the ideal would be to call this function only at the beginning of the snap operation, + * or at the beginning of the operator itself */ struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create_view3d( CTX_data_main(C), CTX_data_scene(C), 0, CTX_wm_region(C), CTX_wm_view3d(C)); @@ -1038,6 +1041,8 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S } } + /* TODO: The ideal would be to call this function only once. + * At the end of the operator */ ED_transform_snap_object_context_destroy(snap_context); return point_added; } |