diff options
-rw-r--r-- | source/blender/editors/transform/transform.h | 1 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 13 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 1 |
3 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 4954f861934..a0550c99988 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -350,6 +350,7 @@ typedef struct TransInfo { struct ToolSettings *settings; struct wmTimer *animtimer; struct wmKeyMap *keymap; /* so we can do lookups for header text */ + struct ReportList *reports; /* assign from the operator, or can be NULL */ int mval[2]; /* current mouse position */ float zfac; /* use for 3d view */ struct Object *obedit; diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 1849bfecc51..73c0b3c0ff4 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -275,6 +275,13 @@ static void createTransTexspace(TransInfo *t) id = ob->data; if (id == NULL || !ELEM3(GS(id->name), ID_ME, ID_CU, ID_MB)) { + BKE_report(t->reports, RPT_ERROR, "Unsupported object type for text-space transform"); + t->total = 0; + return; + } + + if (BKE_object_obdata_is_libdata(ob)) { + BKE_report(t->reports, RPT_ERROR, "Linked data can't text-space transform"); t->total = 0; return; } @@ -990,8 +997,7 @@ static void createTransPose(TransInfo *t, Object *ob) if (arm->flag & ARM_RESTPOS) { if (ELEM(t->mode, TFM_DUMMY, TFM_BONESIZE) == 0) { - // XXX use transform operator reports - // BKE_report(op->reports, RPT_ERROR, "Cannot select linked when sync selection is enabled"); + BKE_report(t->reports, RPT_ERROR, "Cannot select linked when sync selection is enabled"); return; } } @@ -1031,8 +1037,7 @@ static void createTransPose(TransInfo *t, Object *ob) } if (td != (t->data + t->total)) { - // XXX use transform operator reports - // BKE_report(op->reports, RPT_DEBUG, "Bone selection count error"); + BKE_report(t->reports, RPT_DEBUG, "Bone selection count error"); } /* initialize initial auto=ik chainlen's? */ diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 4c7ac4193b3..99aff4530ab 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1063,6 +1063,7 @@ int initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *even t->ar = ar; t->obedit = obedit; t->settings = ts; + t->reports = op ? op->reports : NULL; if (obedit) { copy_m3_m4(t->obedit_mat, obedit->obmat); |