Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_screw.c
| Show First 20 Lines • Show All 268 Lines • ▼ Show 20 Lines | default: /* 2, use default to quiet warnings */ | ||||
| other_axis_2 = 1; | other_axis_2 = 1; | ||||
| break; | break; | ||||
| } | } | ||||
| axis_vec[ltmd->axis] = 1.0f; | axis_vec[ltmd->axis] = 1.0f; | ||||
| if (ob_axis != NULL) { | if (ob_axis != NULL) { | ||||
| /* Calculate the matrix relative to the axis object. */ | /* Calculate the matrix relative to the axis object. */ | ||||
| invert_m4_m4(mtx_tmp_a, ctx->object->obmat); | invert_m4_m4(mtx_tmp_a, ctx->object->object_to_world); | ||||
| copy_m4_m4(mtx_tx_inv, ob_axis->obmat); | copy_m4_m4(mtx_tx_inv, ob_axis->object_to_world); | ||||
| mul_m4_m4m4(mtx_tx, mtx_tmp_a, mtx_tx_inv); | mul_m4_m4m4(mtx_tx, mtx_tmp_a, mtx_tx_inv); | ||||
| /* Calculate the axis vector. */ | /* Calculate the axis vector. */ | ||||
| mul_mat3_m4_v3(mtx_tx, axis_vec); /* only rotation component */ | mul_mat3_m4_v3(mtx_tx, axis_vec); /* only rotation component */ | ||||
| normalize_v3(axis_vec); | normalize_v3(axis_vec); | ||||
| /* screw */ | /* screw */ | ||||
| if (ltmd->flag & MOD_SCREW_OBJECT_OFFSET) { | if (ltmd->flag & MOD_SCREW_OBJECT_OFFSET) { | ||||
| ▲ Show 20 Lines • Show All 889 Lines • Show Last 20 Lines | |||||