diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-11 04:23:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-11 04:23:39 +0300 |
commit | 317b8d96690cec6255a1e954ba642b08ef5d54fb (patch) | |
tree | eb2c37bc74d60a00fe5a52a77997c559847361e5 /source/blender/editors/armature | |
parent | d1328feeb125328615bcf832cbc82d9f9a18e023 (diff) |
Transform: Snap used multiple eval contexts
Changes for 2.8x to use EvaluationContext caused some confusion
- Would use scene layer passed from snap context.
- Would generate duplis from Main eval context.
- Would take context argument and use it to create another eval context.
Adding context args all over and filling in a new eval-context
for every ray-cast test isn't ideal either.
Remove the context argument since the purpose of
SnapObjectContext is to avoid this kind of confusion.
Store the EvaluationContext once and re-use.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/editarmature_sketch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index cb4d863b7b5..7407d12f7d7 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -1005,7 +1005,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S if (ts->snap_mode == SCE_SNAP_MODE_VOLUME) { float size; if (peelObjectsSnapContext( - C, snap_context, mvalf, + snap_context, mvalf, &(const struct SnapObjectParams){ .snap_select = SNAP_NOT_SELECTED, .use_object_edit_cage = false, @@ -1045,7 +1045,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S /* try to snap to closer object */ { if (ED_transform_snap_object_project_view3d( - C, snap_context, + snap_context, ts->snap_mode, &(const struct SnapObjectParams){ .snap_select = SNAP_NOT_SELECTED, |