fix [#36517] You can edit a texture space (Shift-T) of a linked mesh

also enable other errors to show up which were previously commented.
This commit is contained in:
2013-08-20 06:04:46 +00:00
parent 65edeb6755
commit 347ba7f159
3 changed files with 11 additions and 4 deletions

View File

@@ -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;

View File

@@ -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? */

View File

@@ -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);