diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-06-11 17:00:24 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-06-11 17:00:24 +0400 |
commit | d811c284f978e092b2dfce60177b5b208127aaca (patch) | |
tree | b3680a81adccb820b6ae5ea9bdbf305773ec101f /source/blender/editors/object/object_transform.c | |
parent | eb3220fa835b8f4be8f5512214cded92c4544833 (diff) |
Deny applying location/rotation to 2D curve - such transformation could
make points have non-zero local z-coordinates, which is confusing for 2D.
Diffstat (limited to 'source/blender/editors/object/object_transform.c')
-rw-r--r-- | source/blender/editors/object/object_transform.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 72d6eb5d74d..22f054bc180 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -432,6 +432,10 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo BKE_report(reports, RPT_ERROR, "Can't apply to a multi user curve, doing nothing."); return OPERATOR_CANCELLED; } + if(!(cu->flag & CU_3D) && (apply_rot || apply_loc)) { + BKE_report(reports, RPT_ERROR, "Neither rotation nor location could be applied to a 2d curve, doing nothing."); + return OPERATOR_CANCELLED; + } if(cu->key) { BKE_report(reports, RPT_ERROR, "Can't apply to a curve with vertex keys, doing nothing."); return OPERATOR_CANCELLED; @@ -498,7 +502,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo cu= ob->data; scale = mat3_to_scale(rsmat); - + for(nu=cu->nurb.first; nu; nu=nu->next) { if(nu->type == CU_BEZIER) { a= nu->pntsu; |