Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_mode.c
| Show First 20 Lines • Show All 935 Lines • ▼ Show 20 Lines | void ElementResize(const TransInfo *t, | ||||
| else { | else { | ||||
| copy_v3_v3(center, tc->center_local); | copy_v3_v3(center, tc->center_local); | ||||
| } | } | ||||
| /* Size checked needed since the 3D cursor only uses rotation fields. */ | /* Size checked needed since the 3D cursor only uses rotation fields. */ | ||||
| if (td->ext && td->ext->size) { | if (td->ext && td->ext->size) { | ||||
| float fsize[3]; | float fsize[3]; | ||||
| if (ELEM(t->data_type, TC_SCULPT, TC_OBJECT, TC_OBJECT_TEXSPACE, TC_POSE)) { | if (ELEM(t->data_type, | ||||
| &TransConvertType_Sculpt, | |||||
| &TransConvertType_Object, | |||||
| &TransConvertType_ObjectTexSpace, | |||||
| &TransConvertType_Pose)) { | |||||
| float obsizemat[3][3]; | float obsizemat[3][3]; | ||||
| /* Reorient the size mat to fit the oriented object. */ | /* Reorient the size mat to fit the oriented object. */ | ||||
| mul_m3_m3m3(obsizemat, tmat, td->axismtx); | mul_m3_m3m3(obsizemat, tmat, td->axismtx); | ||||
| // print_m3("obsizemat", obsizemat); | // print_m3("obsizemat", obsizemat); | ||||
| TransMat3ToSize(obsizemat, td->axismtx, fsize); | TransMat3ToSize(obsizemat, td->axismtx, fsize); | ||||
| // print_v3("fsize", fsize); | // print_v3("fsize", fsize); | ||||
| } | } | ||||
| else { | else { | ||||
| ▲ Show 20 Lines • Show All 243 Lines • ▼ Show 20 Lines | switch (mode) { | ||||
| case TFM_NORMAL_ROTATION: | case TFM_NORMAL_ROTATION: | ||||
| initNormalRotation(t); | initNormalRotation(t); | ||||
| break; | break; | ||||
| case TFM_GPENCIL_OPACITY: | case TFM_GPENCIL_OPACITY: | ||||
| initGPOpacity(t); | initGPOpacity(t); | ||||
| break; | break; | ||||
| } | } | ||||
| if (t->data_type == TC_MESH_VERTS) { | if (t->data_type == &TransConvertType_Mesh) { | ||||
| /* Init Custom Data correction. | /* Init Custom Data correction. | ||||
| * Ideally this should be called when creating the TransData. */ | * Ideally this should be called when creating the TransData. */ | ||||
| transform_convert_mesh_customdatacorrect_init(t); | transform_convert_mesh_customdatacorrect_init(t); | ||||
| } | } | ||||
| /* TODO(germano): Some of these operations change the `t->mode`. | /* TODO(germano): Some of these operations change the `t->mode`. | ||||
| * This can be bad for Redo. */ | * This can be bad for Redo. */ | ||||
| // BLI_assert(t->mode == mode); | // BLI_assert(t->mode == mode); | ||||
| ▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines | |||||