[Bf-blender-cvs] [e3c2b451388] custom-manipulators: Cleanup: remove redundant user_data arg
Campbell Barton
noreply at git.blender.org
Thu Jun 22 06:02:30 CEST 2017
Commit: e3c2b451388349537161d8b2060a5f5bab354e1c
Author: Campbell Barton
Date: Thu Jun 22 14:05:39 2017 +1000
Branches: custom-manipulators
https://developer.blender.org/rBe3c2b451388349537161d8b2060a5f5bab354e1c
Cleanup: remove redundant user_data arg
This is already accessible from the property
===================================================================
M source/blender/editors/mesh/editmesh_bisect.c
M source/blender/editors/mesh/editmesh_extrude.c
M source/blender/windowmanager/manipulators/intern/wm_manipulator_target_props.c
M source/blender/windowmanager/manipulators/wm_manipulator_fn.h
===================================================================
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c
index 2a80d74e4e7..8f1ba716b83 100644
--- a/source/blender/editors/mesh/editmesh_bisect.c
+++ b/source/blender/editors/mesh/editmesh_bisect.c
@@ -456,7 +456,7 @@ static void manipulator_mesh_bisect_update_from_op(ManipulatorGroup *man)
/* depth callbacks */
static void manipulator_bisect_prop_depth_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop, void *UNUSED(user_data),
+ const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
float *value)
{
ManipulatorGroup *man = mpr->parent_mgroup->customdata;
@@ -473,7 +473,7 @@ static void manipulator_bisect_prop_depth_get(
}
static void manipulator_bisect_prop_depth_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop, void *UNUSED(user_data),
+ const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
const float *value)
{
ManipulatorGroup *man = mpr->parent_mgroup->customdata;
@@ -499,7 +499,7 @@ static void manipulator_bisect_prop_depth_set(
/* translate callbacks */
static void manipulator_bisect_prop_translate_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop, void *UNUSED(user_data),
+ const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
float *value)
{
ManipulatorGroup *man = mpr->parent_mgroup->customdata;
@@ -512,7 +512,7 @@ static void manipulator_bisect_prop_translate_get(
}
static void manipulator_bisect_prop_translate_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop, void *UNUSED(user_data),
+ const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
const float *value)
{
ManipulatorGroup *man = mpr->parent_mgroup->customdata;
@@ -528,7 +528,7 @@ static void manipulator_bisect_prop_translate_set(
/* angle callbacks */
static void manipulator_bisect_prop_angle_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop, void *UNUSED(user_data),
+ const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
float *value)
{
ManipulatorGroup *man = mpr->parent_mgroup->customdata;
@@ -554,7 +554,7 @@ static void manipulator_bisect_prop_angle_get(
}
static void manipulator_bisect_prop_angle_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop, void *UNUSED(user_data),
+ const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
const float *value)
{
ManipulatorGroup *man = mpr->parent_mgroup->customdata;
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index 75e901a6e1f..224ce5cfeb8 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -890,7 +890,7 @@ static void manipulator_mesh_spin_update_from_op(ManipulatorSpinGroup *man)
/* depth callbacks */
static void manipulator_spin_prop_depth_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop, void *UNUSED(user_data),
+ const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
float *value)
{
ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
@@ -907,7 +907,7 @@ static void manipulator_spin_prop_depth_get(
}
static void manipulator_spin_prop_depth_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop, void *UNUSED(user_data),
+ const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
const float *value)
{
ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
@@ -933,7 +933,7 @@ static void manipulator_spin_prop_depth_set(
/* translate callbacks */
static void manipulator_spin_prop_translate_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop, void *UNUSED(user_data),
+ const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
float *value)
{
ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
@@ -946,7 +946,7 @@ static void manipulator_spin_prop_translate_get(
}
static void manipulator_spin_prop_translate_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop, void *UNUSED(user_data),
+ const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
const float *value)
{
ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
@@ -962,7 +962,7 @@ static void manipulator_spin_prop_translate_set(
/* angle callbacks */
static void manipulator_spin_prop_axis_angle_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop, void *UNUSED(user_data),
+ const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
float *value)
{
ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
@@ -988,7 +988,7 @@ static void manipulator_spin_prop_axis_angle_get(
}
static void manipulator_spin_prop_axis_angle_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop, void *UNUSED(user_data),
+ const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
const float *value)
{
ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
@@ -1022,7 +1022,7 @@ static void manipulator_spin_prop_axis_angle_set(
/* angle callbacks */
static void manipulator_spin_prop_angle_get(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop, void *UNUSED(user_data),
+ const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
float *value)
{
ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
@@ -1033,7 +1033,7 @@ static void manipulator_spin_prop_angle_get(
}
static void manipulator_spin_prop_angle_set(
- const wmManipulator *mpr, wmManipulatorProperty *mpr_prop, void *UNUSED(user_data),
+ const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
const float *value)
{
ManipulatorSpinGroup *man = mpr->parent_mgroup->customdata;
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator_target_props.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator_target_props.c
index 73bbc750d0e..46bc40967c5 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulator_target_props.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator_target_props.c
@@ -165,7 +165,7 @@ float WM_manipulator_target_property_value_get(
if (mpr_prop->custom_func.value_get_fn) {
float value = 0.0f;
BLI_assert(mpr_prop->type->array_length == 1);
- mpr_prop->custom_func.value_get_fn(mpr, mpr_prop, mpr_prop->custom_func.user_data, &value);
+ mpr_prop->custom_func.value_get_fn(mpr, mpr_prop, &value);
return value;
}
@@ -183,7 +183,7 @@ void WM_manipulator_target_property_value_set(
{
if (mpr_prop->custom_func.value_set_fn) {
BLI_assert(mpr_prop->type->array_length == 1);
- mpr_prop->custom_func.value_set_fn(mpr, mpr_prop, mpr_prop->custom_func.user_data, &value);
+ mpr_prop->custom_func.value_set_fn(mpr, mpr_prop, &value);
return;
}
@@ -202,8 +202,7 @@ void WM_manipulator_target_property_value_get_array(
float *value)
{
if (mpr_prop->custom_func.value_get_fn) {
- mpr_prop->custom_func.value_get_fn(
- mpr, mpr_prop, mpr_prop->custom_func.user_data, value);
+ mpr_prop->custom_func.value_get_fn(mpr, mpr_prop, value);
return;
}
return RNA_property_float_get_array(&mpr_prop->ptr, mpr_prop->prop, value);
@@ -214,8 +213,7 @@ void WM_manipulator_target_property_value_set_array(
const float *value)
{
if (mpr_prop->custom_func.value_set_fn) {
- mpr_prop->custom_func.value_set_fn(
- mpr, mpr_prop, mpr_prop->custom_func.user_data, value);
+ mpr_prop->custom_func.value_set_fn(mpr, mpr_prop, value);
return;
}
RNA_property_float_set_array(&mpr_prop->ptr, mpr_prop->prop, value);
@@ -228,7 +226,7 @@ void WM_manipulator_target_property_range_get(
float range[2])
{
if (mpr_prop->custom_func.range_get_fn) {
- mpr_prop->custom_func.range_get_fn(mpr, mpr_prop, mpr_prop->custom_func.user_data, range);
+ mpr_prop->custom_func.range_get_fn(mpr, mpr_prop, range);
return;
}
diff --git a/source/blender/windowmanager/manipulators/wm_manipulator_fn.h b/source/blender/windowmanager/manipulators/wm_manipulator_fn.h
index a5c63807682..bb19fece7e1 100644
--- a/source/blender/windowmanager/manipulators/wm_manipulator_fn.h
+++ b/source/blender/windowmanager/manipulators/wm_manipulator_fn.h
@@ -60,13 +60,13 @@ typedef void (*wmManipulatorFnSelect)(struct bContext *, struct wmManipulator
/* wmManipulatorProperty */
typedef void (*wmManipulatorPropertyFnGet)(
- const struct wmManipulator *, struct wmManipulatorProperty *, void *user_data,
+ const struct wmManipulator *, struct wmManipulatorProperty *,
float *value);
typedef void (*wmManipulatorPropertyFnSet)(
- const struct wmManipulator *, struct wmManipulatorProperty *, void *user_data,
+ const struct wmManipulator *, struct wmManipulatorProperty *,
const float *value);
typedef void (*wmManipulatorPropertyFnRangeGet)(
- const struct wmManipulator *, struct wmManipulatorProperty *, void *user_data,
+ const struct wmManipulator *, struct wmManipulatorProperty *,
float range[2]);
typedef struct wmManipulatorPropertyFnParams {
More information about the Bf-blender-cvs
mailing list