Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform.c
| Context not available. | |||||
| const float radius_snap = 0.1f; | const float radius_snap = 0.1f; | ||||
| const float snap_hack = (t->snap[1] * data->warp_init_dist) / radius_snap; | const float snap_hack = (t->snap[1] * data->warp_init_dist) / radius_snap; | ||||
| values.scale *= snap_hack; | values.scale *= snap_hack; | ||||
| snapGridIncrement(t, values.vector); | snapGrid(t, values.vector); | ||||
| values.scale /= snap_hack; | values.scale /= snap_hack; | ||||
| } | } | ||||
| #endif | #endif | ||||
| Context not available. | |||||
| value = t->values[0]; | value = t->values[0]; | ||||
| snapGridIncrement(t, &value); | snapGrid(t, &value); | ||||
| applyNumInput(&t->num, &value); | applyNumInput(&t->num, &value); | ||||
| Context not available. | |||||
| copy_v3_fl(size, ratio); | copy_v3_fl(size, ratio); | ||||
| snapGridIncrement(t, size); | snapGrid(t, size); | ||||
| if (applyNumInput(&t->num, size)) { | if (applyNumInput(&t->num, size)) { | ||||
| constraintNumInput(t, size); | constraintNumInput(t, size); | ||||
| Context not available. | |||||
| copy_v3_fl(size, t->values[0]); | copy_v3_fl(size, t->values[0]); | ||||
| snapGridIncrement(t, size); | snapGrid(t, size); | ||||
| if (applyNumInput(&t->num, size)) { | if (applyNumInput(&t->num, size)) { | ||||
| constraintNumInput(t, size); | constraintNumInput(t, size); | ||||
| Context not available. | |||||
| ratio = t->values[0]; | ratio = t->values[0]; | ||||
| snapGridIncrement(t, &ratio); | snapGrid(t, &ratio); | ||||
| applyNumInput(&t->num, &ratio); | applyNumInput(&t->num, &ratio); | ||||
| Context not available. | |||||
| final = t->values[0]; | final = t->values[0]; | ||||
| snapGridIncrement(t, &final); | snapGrid(t, &final); | ||||
| if ((t->con.mode & CON_APPLY) && t->con.applyRot) { | if ((t->con.mode & CON_APPLY) && t->con.applyRot) { | ||||
| t->con.applyRot(t, NULL, t->axis, NULL); | t->con.applyRot(t, NULL, t->axis, NULL); | ||||
| Context not available. | |||||
| copy_v2_v2(phi, t->values); | copy_v2_v2(phi, t->values); | ||||
| snapGridIncrement(t, phi); | snapGrid(t, phi); | ||||
| applyNumInput(&t->num, phi); | applyNumInput(&t->num, phi); | ||||
| Context not available. | |||||
| headerTranslation(t, pvec, str); | headerTranslation(t, pvec, str); | ||||
| } | } | ||||
| else { | else { | ||||
| snapGridIncrement(t, t->values); | snapGrid(t, t->values); | ||||
| if (applyNumInput(&t->num, t->values)) { | if (applyNumInput(&t->num, t->values)) { | ||||
| removeAspectRatio(t, t->values); | removeAspectRatio(t, t->values); | ||||
| } | } | ||||
| Context not available. | |||||
| distance = -t->values[0]; | distance = -t->values[0]; | ||||
| snapGridIncrement(t, &distance); | snapGrid(t, &distance); | ||||
| applyNumInput(&t->num, &distance); | applyNumInput(&t->num, &distance); | ||||
| Context not available. | |||||
| final = t->values[0]; | final = t->values[0]; | ||||
| snapGridIncrement(t, &final); | snapGrid(t, &final); | ||||
| applyNumInput(&t->num, &final); | applyNumInput(&t->num, &final); | ||||
| Context not available. | |||||
| ratio = t->values[0]; | ratio = t->values[0]; | ||||
| snapGridIncrement(t, &ratio); | snapGrid(t, &ratio); | ||||
| applyNumInput(&t->num, &ratio); | applyNumInput(&t->num, &ratio); | ||||
| Context not available. | |||||
| ratio = t->values[0]; | ratio = t->values[0]; | ||||
| snapGridIncrement(t, &ratio); | snapGrid(t, &ratio); | ||||
| applyNumInput(&t->num, &ratio); | applyNumInput(&t->num, &ratio); | ||||
| Context not available. | |||||
| ratio = t->values[0]; | ratio = t->values[0]; | ||||
| snapGridIncrement(t, &ratio); | snapGrid(t, &ratio); | ||||
| applyNumInput(&t->num, &ratio); | applyNumInput(&t->num, &ratio); | ||||
| Context not available. | |||||
| distance = t->values[0]; | distance = t->values[0]; | ||||
| snapGridIncrement(t, &distance); | snapGrid(t, &distance); | ||||
| applyNumInput(&t->num, &distance); | applyNumInput(&t->num, &distance); | ||||
| Context not available. | |||||
| CLAMP_MAX(weight, 1.0f); | CLAMP_MAX(weight, 1.0f); | ||||
| snapGridIncrement(t, &weight); | snapGrid(t, &weight); | ||||
| applyNumInput(&t->num, &weight); | applyNumInput(&t->num, &weight); | ||||
| Context not available. | |||||
| CLAMP_MAX(crease, 1.0f); | CLAMP_MAX(crease, 1.0f); | ||||
| snapGridIncrement(t, &crease); | snapGrid(t, &crease); | ||||
| applyNumInput(&t->num, &crease); | applyNumInput(&t->num, &crease); | ||||
| Context not available. | |||||
| copy_v3_fl(size, ratio); | copy_v3_fl(size, ratio); | ||||
| snapGridIncrement(t, size); | snapGrid(t, size); | ||||
| if (applyNumInput(&t->num, size)) { | if (applyNumInput(&t->num, size)) { | ||||
| constraintNumInput(t, size); | constraintNumInput(t, size); | ||||
| Context not available. | |||||
| ratio = t->values[0]; | ratio = t->values[0]; | ||||
| snapGridIncrement(t, &ratio); | snapGrid(t, &ratio); | ||||
| applyNumInput(&t->num, &ratio); | applyNumInput(&t->num, &ratio); | ||||
| Context not available. | |||||
| final = t->values[0]; | final = t->values[0]; | ||||
| snapGridIncrement(t, &final); | snapGrid(t, &final); | ||||
| /* only do this so out of range values are not displayed */ | /* only do this so out of range values are not displayed */ | ||||
| if (is_constrained) { | if (is_constrained) { | ||||
| Context not available. | |||||
| final = t->values[0]; | final = t->values[0]; | ||||
| snapGridIncrement(t, &final); | snapGrid(t, &final); | ||||
| /* only do this so out of range values are not displayed */ | /* only do this so out of range values are not displayed */ | ||||
| if (is_constrained) { | if (is_constrained) { | ||||
| Context not available. | |||||
| final = t->values[0]; | final = t->values[0]; | ||||
| snapGridIncrement(t, &final); | snapGrid(t, &final); | ||||
| applyNumInput(&t->num, &final); | applyNumInput(&t->num, &final); | ||||
| Context not available. | |||||
| time = (float)(t->center2d[0] - mval[0]) * fac; | time = (float)(t->center2d[0] - mval[0]) * fac; | ||||
| } | } | ||||
| snapGridIncrement(t, &time); | snapGrid(t, &time); | ||||
| applyNumInput(&t->num, &time); | applyNumInput(&t->num, &time); | ||||
| Context not available. | |||||
| copy_v3_v3(t->values, tvec); | copy_v3_v3(t->values, tvec); | ||||
| } | } | ||||
| else { | else { | ||||
| // snapGridIncrement(t, t->values); | // snapGrid(t, t->values); | ||||
| applyNumInput(&t->num, t->values); | applyNumInput(&t->num, t->values); | ||||
| } | } | ||||
| Context not available. | |||||