Fix crash introduced w/ snap refactor
Create snapping context when in the 3d view, transforming pose bones and grease-pencil crashed.
This commit is contained in:
@@ -596,7 +596,6 @@ static void initSnappingMode(TransInfo *t)
|
|||||||
t->tsnap.mode = SCE_SNAP_MODE_INCREMENT;
|
t->tsnap.mode = SCE_SNAP_MODE_INCREMENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t->flag & (T_OBJECT | T_EDIT)) {
|
|
||||||
if (t->spacetype == SPACE_VIEW3D) {
|
if (t->spacetype == SPACE_VIEW3D) {
|
||||||
if (t->tsnap.object_context == NULL) {
|
if (t->tsnap.object_context == NULL) {
|
||||||
t->tsnap.object_context = ED_transform_snap_object_context_create_view3d(
|
t->tsnap.object_context = ED_transform_snap_object_context_create_view3d(
|
||||||
@@ -611,7 +610,6 @@ static void initSnappingMode(TransInfo *t)
|
|||||||
SET_UINT_IN_POINTER((BM_ELEM_SELECT | BM_ELEM_HIDDEN)));
|
SET_UINT_IN_POINTER((BM_ELEM_SELECT | BM_ELEM_HIDDEN)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void initSnapping(TransInfo *t, wmOperator *op)
|
void initSnapping(TransInfo *t, wmOperator *op)
|
||||||
|
Reference in New Issue
Block a user