diff options
Diffstat (limited to 'source/blender/editors/transform/transform_ops.c')
-rw-r--r-- | source/blender/editors/transform/transform_ops.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index f00e2418ad9..81a4c082dcc 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -40,6 +40,7 @@ #include "BKE_context.h" #include "BKE_global.h" #include "BKE_armature.h" +#include "BKE_report.h" #include "WM_api.h" #include "WM_types.h" @@ -282,6 +283,11 @@ static int create_orientation_exec(bContext *C, wmOperator *op) RNA_string_get(op->ptr, "name", name); + if (use && !CTX_wm_view3d(C)) { + BKE_report(op->reports, RPT_ERROR, "Create Orientation \"use\" parameter only valid in a 3dView context"); + return OPERATOR_CANCELLED; + } + BIF_createTransformOrientation(C, op->reports, name, use, overwrite); WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C)); |