diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-07 04:59:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-07 05:01:26 +0300 |
commit | 341d5b08b0f6743ddd03bc9868a96d311b509900 (patch) | |
tree | 2f6479e76330932ad8ab96bb6c9afe5bceca4593 /source/blender/editors/curve/editcurve_add.c | |
parent | a48bd6cc74298cbd5ed66c8ab8de33f3713950c8 (diff) |
Fix adding objects in local view
Diffstat (limited to 'source/blender/editors/curve/editcurve_add.c')
-rw-r--r-- | source/blender/editors/curve/editcurve_add.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c index 7eabd9c96e8..eef3df94033 100644 --- a/source/blender/editors/curve/editcurve_add.c +++ b/source/blender/editors/curve/editcurve_add.c @@ -477,13 +477,14 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf) Nurb *nu; bool newob = false; bool enter_editmode; + ushort local_view_bits; float dia; float loc[3], rot[3]; float mat[4][4]; WM_operator_view3d_unit_defaults(C, op); - if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, &enter_editmode, NULL)) + if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, &enter_editmode, &local_view_bits, NULL)) return OPERATOR_CANCELLED; if (!isSurf) { /* adding curve */ @@ -491,7 +492,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf) const char *name = get_curve_defname(type); Curve *cu; - obedit = ED_object_add_type(C, OB_CURVE, name, loc, rot, true); + obedit = ED_object_add_type(C, OB_CURVE, name, loc, rot, true, local_view_bits); newob = true; cu = (Curve *)obedit->data; @@ -507,7 +508,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf) else { /* adding surface */ if (obedit == NULL || obedit->type != OB_SURF) { const char *name = get_surf_defname(type); - obedit = ED_object_add_type(C, OB_SURF, name, loc, rot, true); + obedit = ED_object_add_type(C, OB_SURF, name, loc, rot, true, local_view_bits); newob = true; } else { |