Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-06-26 07:31:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-26 07:33:10 +0300
commit3edff2e1a4d1f187c956fba2d5b2954981dc62a2 (patch)
tree6c564af56b7d931b11720aa3a4336dd8c70facdf /source/blender/editors/mesh/editmesh_bisect.c
parent2d2c64dd187bb1d83c9b28d837d86ed5168d6819 (diff)
Manipulator: use 'void *' for callback data args
Non-float properties should be editable too.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_bisect.c')
-rw-r--r--source/blender/editors/mesh/editmesh_bisect.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c
index cdfc7c19308..9b6df11d470 100644
--- a/source/blender/editors/mesh/editmesh_bisect.c
+++ b/source/blender/editors/mesh/editmesh_bisect.c
@@ -457,10 +457,11 @@ 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,
- float *value)
+ void *value_p)
{
ManipulatorGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
+ float *value = value_p;
BLI_assert(mpr_prop->type->array_length == 1);
UNUSED_VARS_NDEBUG(mpr_prop);
@@ -474,10 +475,11 @@ static void manipulator_bisect_prop_depth_get(
static void manipulator_bisect_prop_depth_set(
const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
- const float *value)
+ const void *value_p)
{
ManipulatorGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
+ const float *value = value_p;
BLI_assert(mpr_prop->type->array_length == 1);
UNUSED_VARS_NDEBUG(mpr_prop);
@@ -500,7 +502,7 @@ static void manipulator_bisect_prop_depth_set(
/* translate callbacks */
static void manipulator_bisect_prop_translate_get(
const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
- float *value)
+ void *value_p)
{
ManipulatorGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
@@ -508,12 +510,12 @@ static void manipulator_bisect_prop_translate_get(
BLI_assert(mpr_prop->type->array_length == 3);
UNUSED_VARS_NDEBUG(mpr_prop);
- RNA_property_float_get_array(op->ptr, man->data.prop_plane_co, value);
+ RNA_property_float_get_array(op->ptr, man->data.prop_plane_co, value_p);
}
static void manipulator_bisect_prop_translate_set(
const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
- const float *value)
+ const void *value_p)
{
ManipulatorGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
@@ -521,7 +523,7 @@ static void manipulator_bisect_prop_translate_set(
BLI_assert(mpr_prop->type->array_length == 3);
UNUSED_VARS_NDEBUG(mpr_prop);
- RNA_property_float_set_array(op->ptr, man->data.prop_plane_co, value);
+ RNA_property_float_set_array(op->ptr, man->data.prop_plane_co, value_p);
manipulator_bisect_exec(man);
}
@@ -529,10 +531,11 @@ static void manipulator_bisect_prop_translate_set(
/* angle callbacks */
static void manipulator_bisect_prop_angle_get(
const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
- float *value)
+ void *value_p)
{
ManipulatorGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
+ float *value = value_p;
BLI_assert(mpr_prop->type->array_length == 1);
UNUSED_VARS_NDEBUG(mpr_prop);
@@ -555,10 +558,11 @@ static void manipulator_bisect_prop_angle_get(
static void manipulator_bisect_prop_angle_set(
const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
- const float *value)
+ const void *value_p)
{
ManipulatorGroup *man = mpr->parent_mgroup->customdata;
wmOperator *op = man->data.op;
+ const float *value = value_p;
BLI_assert(mpr_prop->type->array_length == 1);
UNUSED_VARS_NDEBUG(mpr_prop);