[Bf-blender-cvs] [e70f887534e] custom-manipulators: Cleanup: use consistent abbreviation for manipulator vars
Campbell Barton
noreply at git.blender.org
Wed Jun 14 21:31:00 CEST 2017
Commit: e70f887534ef3389f10fa2ffc788ab513e7d4f60
Author: Campbell Barton
Date: Thu Jun 15 02:45:17 2017 +1000
Branches: custom-manipulators
https://developer.blender.org/rBe70f887534ef3389f10fa2ffc788ab513e7d4f60
Cleanup: use consistent abbreviation for manipulator vars
===================================================================
M source/blender/editors/manipulator_library/arrow3d_manipulator.c
M source/blender/editors/manipulator_library/cage2d_manipulator.c
M source/blender/editors/manipulator_library/manipulator_library_intern.h
M source/blender/editors/manipulator_library/manipulator_library_utils.c
M source/blender/makesrna/intern/rna_wm_manipulator.c
M source/blender/windowmanager/manipulators/WM_manipulator_api.h
===================================================================
diff --git a/source/blender/editors/manipulator_library/arrow3d_manipulator.c b/source/blender/editors/manipulator_library/arrow3d_manipulator.c
index b8bf2669a39..ef35430ca5d 100644
--- a/source/blender/editors/manipulator_library/arrow3d_manipulator.c
+++ b/source/blender/editors/manipulator_library/arrow3d_manipulator.c
@@ -392,11 +392,11 @@ static void manipulator_arrow_invoke(
mpr->interaction_data = inter;
}
-static void manipulator_arrow_property_update(wmManipulator *mnp, wmManipulatorProperty *mpr_prop)
+static void manipulator_arrow_property_update(wmManipulator *mpr, wmManipulatorProperty *mpr_prop)
{
- ArrowManipulator3D *arrow = (ArrowManipulator3D *)mnp;
+ ArrowManipulator3D *arrow = (ArrowManipulator3D *)mpr;
manipulator_property_data_update(
- mnp, &arrow->data, mpr_prop,
+ mpr, &arrow->data, mpr_prop,
(arrow->style & ED_MANIPULATOR_ARROW_STYLE_CONSTRAINED) != 0,
(arrow->style & ED_MANIPULATOR_ARROW_STYLE_INVERTED) != 0);
}
diff --git a/source/blender/editors/manipulator_library/cage2d_manipulator.c b/source/blender/editors/manipulator_library/cage2d_manipulator.c
index 3a2bfdad406..5aacf6c8473 100644
--- a/source/blender/editors/manipulator_library/cage2d_manipulator.c
+++ b/source/blender/editors/manipulator_library/cage2d_manipulator.c
@@ -365,7 +365,7 @@ typedef struct RectTransformInteraction {
} RectTransformInteraction;
static bool manipulator_rect_transform_get_prop_value(
- wmManipulator *mnp, wmManipulatorProperty *mpr_prop, float *value)
+ wmManipulator *mpr, wmManipulatorProperty *mpr_prop, float *value)
{
PropertyType type = RNA_property_type(mpr_prop->prop);
@@ -382,7 +382,7 @@ static bool manipulator_rect_transform_get_prop_value(
RNA_property_float_get_array(&mpr_prop->ptr, mpr_prop->prop, value);
}
else if (STREQ(mpr_prop->idname, "scale")) {
- RectTransformManipulator *cage = (RectTransformManipulator *)mnp;
+ RectTransformManipulator *cage = (RectTransformManipulator *)mpr;
if (cage->style & ED_MANIPULATOR_RECT_TRANSFORM_STYLE_SCALE_UNIFORM) {
*value = RNA_property_float_get(&mpr_prop->ptr, mpr_prop->prop);
}
@@ -507,15 +507,15 @@ static void manipulator_rect_transform_modal(
ED_region_tag_redraw(CTX_wm_region(C));
}
-static void manipulator_rect_transform_property_update(wmManipulator *mnp, wmManipulatorProperty *mpr_prop)
+static void manipulator_rect_transform_property_update(wmManipulator *mpr, wmManipulatorProperty *mpr_prop)
{
- RectTransformManipulator *cage = (RectTransformManipulator *)mnp;
+ RectTransformManipulator *cage = (RectTransformManipulator *)mpr;
if (STREQ(mpr_prop->idname, "offset")) {
- manipulator_rect_transform_get_prop_value(mnp, mpr_prop, mnp->offset);
+ manipulator_rect_transform_get_prop_value(mpr, mpr_prop, mpr->offset);
}
else if (STREQ(mpr_prop->idname, "scale")) {
- manipulator_rect_transform_get_prop_value(mnp, mpr_prop, cage->scale);
+ manipulator_rect_transform_get_prop_value(mpr, mpr_prop, cage->scale);
}
else {
BLI_assert(0);
diff --git a/source/blender/editors/manipulator_library/manipulator_library_intern.h b/source/blender/editors/manipulator_library/manipulator_library_intern.h
index 74060cba59c..c21a3046be5 100644
--- a/source/blender/editors/manipulator_library/manipulator_library_intern.h
+++ b/source/blender/editors/manipulator_library/manipulator_library_intern.h
@@ -76,11 +76,11 @@ float manipulator_value_from_offset(
const bool constrained, const bool inverted, const bool use_precision);
void manipulator_property_data_update(
- struct wmManipulator *mnp, ManipulatorCommonData *data, wmManipulatorProperty *mpr_prop,
+ struct wmManipulator *mpr, ManipulatorCommonData *data, wmManipulatorProperty *mpr_prop,
const bool constrained, const bool inverted);
void manipulator_property_value_reset(
- bContext *C, const struct wmManipulator *mnp, ManipulatorInteraction *inter, wmManipulatorProperty *mpr_prop);
+ bContext *C, const struct wmManipulator *mpr, ManipulatorInteraction *inter, wmManipulatorProperty *mpr_prop);
/* -------------------------------------------------------------------- */
diff --git a/source/blender/editors/manipulator_library/manipulator_library_utils.c b/source/blender/editors/manipulator_library/manipulator_library_utils.c
index d7da66f97b5..093842aeb65 100644
--- a/source/blender/editors/manipulator_library/manipulator_library_utils.c
+++ b/source/blender/editors/manipulator_library/manipulator_library_utils.c
@@ -133,10 +133,10 @@ void manipulator_property_data_update(
}
void manipulator_property_value_reset(
- bContext *C, const wmManipulator *mnp, ManipulatorInteraction *inter,
+ bContext *C, const wmManipulator *mpr, ManipulatorInteraction *inter,
wmManipulatorProperty *mpr_prop)
{
- WM_manipulator_property_value_set(C, mnp, mpr_prop, inter->init_value);
+ WM_manipulator_property_value_set(C, mpr, mpr_prop, inter->init_value);
}
/* -------------------------------------------------------------------- */
diff --git a/source/blender/makesrna/intern/rna_wm_manipulator.c b/source/blender/makesrna/intern/rna_wm_manipulator.c
index 297514fcbac..25a4f55114e 100644
--- a/source/blender/makesrna/intern/rna_wm_manipulator.c
+++ b/source/blender/makesrna/intern/rna_wm_manipulator.c
@@ -231,24 +231,24 @@ static void rna_Manipulator_bl_idname_set(PointerRNA *ptr, const char *value)
static void rna_Manipulator_color_get(PointerRNA *ptr, float *values)
{
- const wmManipulator *mnp = ptr->data;
- WM_manipulator_get_color(mnp, values);
+ const wmManipulator *mpr = ptr->data;
+ WM_manipulator_get_color(mpr, values);
}
static void rna_Manipulator_color_set(PointerRNA *ptr, const float *values)
{
- wmManipulator *mnp = ptr->data;
- WM_manipulator_set_color(mnp, values);
+ wmManipulator *mpr = ptr->data;
+ WM_manipulator_set_color(mpr, values);
}
static void rna_Manipulator_color_hi_get(PointerRNA *ptr, float *values)
{
- const wmManipulator *mnp = ptr->data;
- WM_manipulator_get_color_highlight(mnp, values);
+ const wmManipulator *mpr = ptr->data;
+ WM_manipulator_get_color_highlight(mpr, values);
}
static void rna_Manipulator_color_hi_set(PointerRNA *ptr, const float *values)
{
- wmManipulator *mnp = ptr->data;
- WM_manipulator_set_color_highlight(mnp, values);
+ wmManipulator *mpr = ptr->data;
+ WM_manipulator_set_color_highlight(mpr, values);
}
static void rna_Manipulator_unregister(struct Main *bmain, StructRNA *type);
@@ -351,14 +351,14 @@ static void rna_Manipulator_unregister(struct Main *UNUSED(bmain), StructRNA *ty
static void **rna_Manipulator_instance(PointerRNA *ptr)
{
- wmManipulator *mnp = ptr->data;
- return &mnp->py_instance;
+ wmManipulator *mpr = ptr->data;
+ return &mpr->py_instance;
}
static StructRNA *rna_Manipulator_refine(PointerRNA *mnp_ptr)
{
- wmManipulator *mnp = mnp_ptr->data;
- return (mnp->type && mnp->type->ext.srna) ? mnp->type->ext.srna : &RNA_Manipulator;
+ wmManipulator *mpr = mnp_ptr->data;
+ return (mpr->type && mpr->type->ext.srna) ? mpr->type->ext.srna : &RNA_Manipulator;
}
/** \} */
diff --git a/source/blender/windowmanager/manipulators/WM_manipulator_api.h b/source/blender/windowmanager/manipulators/WM_manipulator_api.h
index fd01a40452c..c24d1db3ba2 100644
--- a/source/blender/windowmanager/manipulators/WM_manipulator_api.h
+++ b/source/blender/windowmanager/manipulators/WM_manipulator_api.h
@@ -121,9 +121,9 @@ void WM_manipulator_property_def_func(
bool WM_manipulator_property_is_valid(
const struct wmManipulatorProperty *mpr_prop);
void WM_manipulator_property_value_set(
- struct bContext *C, const struct wmManipulator *mnp, struct wmManipulatorProperty *mpr_prop, const float value);
+ struct bContext *C, const struct wmManipulator *mpr, struct wmManipulatorProperty *mpr_prop, const float value);
float WM_manipulator_property_value_get(
- const struct wmManipulator *mnp, struct wmManipulatorProperty *mpr_prop);
+ const struct wmManipulator *mpr, struct wmManipulatorProperty *mpr_prop);
void WM_manipulator_property_range_get(
const struct wmManipulator *mpr, struct wmManipulatorProperty *mpr_prop,
float range[2]);
More information about the Bf-blender-cvs
mailing list