diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-15 10:24:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-15 10:25:16 +0300 |
commit | 55b241d32a2c3192a439c51aff99a0a248ca9ef2 (patch) | |
tree | 46f7d6c28a86d29c60f7a2aa1caa908e08bc769a /source/blender/editors/transform | |
parent | 0fb80cebeca9dd778dbfacbc7408214f507d0f6b (diff) |
Fix texture space transform crash
Own regression from multi-object transform.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 7c5f7dba045..ddd8af99afc 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -303,33 +303,29 @@ static void createTransTexspace(TransInfo *t) ob = OBACT(view_layer); if (ob == NULL) { // Shouldn't logically happen, but still... - t->data_len_all = 0; return; } id = ob->data; if (id == NULL || !ELEM(GS(id->name), ID_ME, ID_CU, ID_MB)) { BKE_report(t->reports, RPT_ERROR, "Unsupported object type for text-space transform"); - t->data_len_all = 0; return; } if (BKE_object_obdata_is_libdata(ob)) { BKE_report(t->reports, RPT_ERROR, "Linked data can't text-space transform"); - t->data_len_all = 0; return; } { - TransDataContainer *tc = t->data_container = MEM_callocN(sizeof(*t->data_container), __func__); + BLI_assert(t->data_container_len == 1); + TransDataContainer *tc = t->data_container; tc->data_len = 1; td = tc->data = MEM_callocN(sizeof(TransData), "TransTexspace"); td->ext = tc->data_ext = MEM_callocN(sizeof(TransDataExtension), "TransTexspace"); } - t->data_len_all = 1; - td->flag = TD_SELECTED; copy_v3_v3(td->center, ob->obmat[3]); td->ob = ob; @@ -8321,6 +8317,7 @@ void createTransData(bContext *C, TransInfo *t) /* if tests must match recalcData for correct updates */ if (t->options & CTX_TEXTURE) { t->flag |= T_TEXTURE; + t->obedit_type = -1; createTransTexspace(t); countAndCleanTransDataContainer(t); |