diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2017-02-04 01:03:31 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2017-02-04 01:03:31 +0300 |
commit | a0561a05efc93a1d8778dedae0bce680650d9d08 (patch) | |
tree | dabfa56ab832138f486d6f9cdc9ec0586a9e5d3e /source/blender/editors/armature/editarmature_sketch.c | |
parent | 21f376780941f986e99db83793409c3222bca091 (diff) |
Remove flag: `SNAP_OBJECT_USE_CACHE` from snap_context
Since the cache is created in one way or another, this flag is not really making a difference
More details here: D2496
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 cc4c1809fbc..f6c04e9570a 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; } |