Cleanup: Remove cryptic "PET" acronym
There is no need to make this an acronym, it only makes the code less accessible. It's a comment anyway, so brevity isn't the goal.
This commit is contained in:
parent
9437abdbce
commit
4ee2504eff
|
@ -1336,7 +1336,7 @@ bool calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], floa
|
|||
|
||||
t->state = TRANS_RUNNING;
|
||||
|
||||
/* avoid calculating PET */
|
||||
/* Avoid calculating proportional editing. */
|
||||
t->options = CTX_NO_PET;
|
||||
|
||||
t->mode = TFM_DUMMY;
|
||||
|
|
|
@ -709,7 +709,7 @@ static int countAndCleanTransDataContainer(TransInfo *t)
|
|||
|
||||
static void init_proportional_edit(TransInfo *t)
|
||||
{
|
||||
/* NOTE: PET is not usable in pose mode yet T32444. */
|
||||
/* NOTE: Proportional editing is not usable in pose mode yet T32444. */
|
||||
if (!ELEM(t->data_type,
|
||||
&TransConvertType_Action,
|
||||
&TransConvertType_Curve,
|
||||
|
@ -726,7 +726,7 @@ static void init_proportional_edit(TransInfo *t)
|
|||
&TransConvertType_Node,
|
||||
&TransConvertType_Object,
|
||||
&TransConvertType_Particle)) {
|
||||
/* Disable PET */
|
||||
/* Disable proportional editing */
|
||||
t->options |= CTX_NO_PET;
|
||||
t->flag &= ~T_PROP_EDIT_ALL;
|
||||
return;
|
||||
|
|
|
@ -131,7 +131,8 @@ static void createTransCurveVerts(bContext *UNUSED(C), TransInfo *t)
|
|||
}
|
||||
}
|
||||
|
||||
/* Support other objects using PET to adjust these, unless connected is enabled. */
|
||||
/* Support other objects using proportional editing to adjust these, unless connected is
|
||||
* enabled. */
|
||||
if (((is_prop_edit && !is_prop_connected) ? count : countsel) == 0) {
|
||||
tc->data_len = 0;
|
||||
continue;
|
||||
|
|
|
@ -52,7 +52,8 @@ static void createTransLatticeVerts(bContext *UNUSED(C), TransInfo *t)
|
|||
bp++;
|
||||
}
|
||||
|
||||
/* Support other objects using PET to adjust these, unless connected is enabled. */
|
||||
/* Support other objects using proportional editing to adjust these, unless connected is
|
||||
* enabled. */
|
||||
if (((is_prop_edit && !is_prop_connected) ? count : countsel) == 0) {
|
||||
tc->data_len = 0;
|
||||
continue;
|
||||
|
|
|
@ -44,7 +44,8 @@ static void createTransMBallVerts(bContext *UNUSED(C), TransInfo *t)
|
|||
}
|
||||
}
|
||||
|
||||
/* Support other objects using PET to adjust these, unless connected is enabled. */
|
||||
/* Support other objects using proportional editing to adjust these, unless connected is
|
||||
* enabled. */
|
||||
if (((is_prop_edit && !is_prop_connected) ? count : countsel) == 0) {
|
||||
tc->data_len = 0;
|
||||
continue;
|
||||
|
|
|
@ -843,7 +843,8 @@ void transform_convert_mesh_islands_calc(struct BMEditMesh *em,
|
|||
MEM_freeN(group_index);
|
||||
}
|
||||
|
||||
/* for PET we need islands of 1 so connected vertices can use it with V3D_AROUND_LOCAL_ORIGINS */
|
||||
/* for proportional editing we need islands of 1 so connected vertices can use it with
|
||||
* V3D_AROUND_LOCAL_ORIGINS */
|
||||
if (calc_single_islands) {
|
||||
BMIter viter;
|
||||
BMVert *v;
|
||||
|
@ -1484,7 +1485,8 @@ static void createTransEditVerts(bContext *UNUSED(C), TransInfo *t)
|
|||
* transform data is created by selected vertices.
|
||||
*/
|
||||
|
||||
/* Support other objects using PET to adjust these, unless connected is enabled. */
|
||||
/* Support other objects using proportional editing to adjust these, unless connected is
|
||||
* enabled. */
|
||||
if ((!prop_mode || (prop_mode & T_PROP_CONNECTED)) && (bm->totvertsel == 0)) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -94,7 +94,8 @@ static void createTransMeshSkin(bContext *UNUSED(C), TransInfo *t)
|
|||
continue;
|
||||
}
|
||||
|
||||
/* Support other objects using PET to adjust these, unless connected is enabled. */
|
||||
/* Support other objects using proportional editing to adjust these, unless connected is
|
||||
* enabled. */
|
||||
if ((!prop_mode || (prop_mode & T_PROP_CONNECTED)) && (bm->totvertsel == 0)) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -314,7 +314,8 @@ static void createTransUVs(bContext *C, TransInfo *t)
|
|||
|
||||
float *prop_dists = NULL;
|
||||
|
||||
/* Support other objects using PET to adjust these, unless connected is enabled. */
|
||||
/* Support other objects using proportional editing to adjust these, unless connected is
|
||||
* enabled. */
|
||||
if (((is_prop_edit && !is_prop_connected) ? count : countsel) == 0) {
|
||||
goto finally;
|
||||
}
|
||||
|
|
|
@ -77,7 +77,8 @@ static void createTransMeshVertCData(bContext *UNUSED(C), TransInfo *t)
|
|||
struct TransMirrorData mirror_data = {NULL};
|
||||
struct TransMeshDataCrazySpace crazyspace_data = {NULL};
|
||||
|
||||
/* Support other objects using PET to adjust these, unless connected is enabled. */
|
||||
/* Support other objects using proportional editing to adjust these, unless connected is
|
||||
* enabled. */
|
||||
if ((!prop_mode || (prop_mode & T_PROP_CONNECTED)) && (bm->totvertsel == 0)) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ static void createTransNodeData(bContext * /*C*/, TransInfo *t)
|
|||
return;
|
||||
}
|
||||
|
||||
/* Nodes don't support PET and probably never will. */
|
||||
/* Nodes don't support proportional editing and probably never will. */
|
||||
t->flag = t->flag & ~T_PROP_EDIT_ALL;
|
||||
|
||||
/* set transform flags on nodes */
|
||||
|
|
|
@ -578,7 +578,8 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
|
|||
t->flag |= T_NO_MIRROR;
|
||||
}
|
||||
|
||||
/* setting PET flag only if property exist in operator. Otherwise, assume it's not supported */
|
||||
/* Setting proportional editing flag only if property exist in operator. Otherwise, assume it's
|
||||
* not supported. */
|
||||
if (op && (prop = RNA_struct_find_property(op->ptr, "use_proportional_edit"))) {
|
||||
if (RNA_property_is_set(op->ptr, prop)) {
|
||||
if (RNA_property_boolean_get(op->ptr, prop)) {
|
||||
|
@ -669,7 +670,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
|
|||
}
|
||||
}
|
||||
|
||||
/* Mirror is not supported with PET, turn it off. */
|
||||
/* Mirror is not supported with proportional editing, turn it off. */
|
||||
#if 0
|
||||
if (t->flag & T_PROP_EDIT) {
|
||||
t->flag &= ~T_MIRROR;
|
||||
|
|
|
@ -71,7 +71,7 @@ static void applyCurveShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
|
|||
*td->val = td->ival * ratio;
|
||||
}
|
||||
|
||||
/* apply PET */
|
||||
/* Apply proportional editing. */
|
||||
*td->val = interpf(*td->val, td->ival, td->factor);
|
||||
CLAMP_MIN(*td->val, 0.0f);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ static void applyGPOpacity(TransInfo *t, const int UNUSED(mval[2]))
|
|||
|
||||
if (td->val) {
|
||||
*td->val = td->ival * ratio;
|
||||
/* apply PET */
|
||||
/* Apply proportional editing. */
|
||||
*td->val = interpf(*td->val, td->ival, td->factor);
|
||||
CLAMP(*td->val, 0.0f, 1.0f);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ static void applyGPShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
|
|||
|
||||
if (td->val) {
|
||||
*td->val = td->ival * ratio;
|
||||
/* apply PET */
|
||||
/* Apply proportional editing. */
|
||||
*td->val = interpf(*td->val, td->ival, td->factor);
|
||||
if (*td->val <= 0.0f) {
|
||||
*td->val = 0.001f;
|
||||
|
|
|
@ -89,7 +89,7 @@ static void applyMaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
|
|||
*td->val = td->ival * ratio;
|
||||
}
|
||||
|
||||
/* apply PET */
|
||||
/* Apply proportional editing. */
|
||||
*td->val = interpf(*td->val, td->ival, td->factor);
|
||||
if (*td->val <= 0.0f) {
|
||||
*td->val = 0.001f;
|
||||
|
|
Loading…
Reference in New Issue