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-21 10:06:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-21 10:06:24 +0300
commit85c5c5531e990b12fed60c428b70f887c1bd0c81 (patch)
tree9e73e13edefbb1feea9c4ccab91e1180f98fb8bc /source/blender
parentc3a8b51413b61c7dca787a8a1b327e9f69dd2be3 (diff)
Manipulator: edit_properties -> target_properties
Naming was too confusing between properties of a manipulator and properties it edits.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/manipulator_library/manipulator_library_utils.c6
-rw-r--r--source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c28
-rw-r--r--source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c8
-rw-r--r--source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c14
-rw-r--r--source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c12
-rw-r--r--source/blender/editors/mesh/editmesh_bisect.c6
-rw-r--r--source/blender/editors/mesh/editmesh_extrude.c8
-rw-r--r--source/blender/editors/space_node/node_manipulators.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_manipulators.c10
-rw-r--r--source/blender/windowmanager/CMakeLists.txt2
-rw-r--r--source/blender/windowmanager/manipulators/WM_manipulator_api.h20
-rw-r--r--source/blender/windowmanager/manipulators/WM_manipulator_types.h2
-rw-r--r--source/blender/windowmanager/manipulators/intern/wm_manipulator.c8
-rw-r--r--source/blender/windowmanager/manipulators/intern/wm_manipulator_target_props.c (renamed from source/blender/windowmanager/manipulators/intern/wm_manipulator_property.c)32
14 files changed, 80 insertions, 80 deletions
diff --git a/source/blender/editors/manipulator_library/manipulator_library_utils.c b/source/blender/editors/manipulator_library/manipulator_library_utils.c
index 093842aeb65..9c182fcf4bc 100644
--- a/source/blender/editors/manipulator_library/manipulator_library_utils.c
+++ b/source/blender/editors/manipulator_library/manipulator_library_utils.c
@@ -116,12 +116,12 @@ void manipulator_property_data_update(
return;
}
- float value = WM_manipulator_property_value_get(mpr, mpr_prop);
+ float value = WM_manipulator_target_property_value_get(mpr, mpr_prop);
if (constrained) {
if ((data->flag & MANIPULATOR_CUSTOM_RANGE_SET) == 0) {
float range[2];
- WM_manipulator_property_range_get(mpr, mpr_prop, range);
+ WM_manipulator_target_property_range_get(mpr, mpr_prop, range);
data->range = range[1] - range[0];
data->min = range[0];
}
@@ -136,7 +136,7 @@ void manipulator_property_value_reset(
bContext *C, const wmManipulator *mpr, ManipulatorInteraction *inter,
wmManipulatorProperty *mpr_prop)
{
- WM_manipulator_property_value_set(C, mpr, mpr_prop, inter->init_value);
+ WM_manipulator_target_property_value_set(C, mpr, mpr_prop, inter->init_value);
}
/* -------------------------------------------------------------------- */
diff --git a/source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c b/source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c
index 17e5d53874d..e13815f3997 100644
--- a/source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c
+++ b/source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c
@@ -327,19 +327,19 @@ static void manipulator_arrow_modal(bContext *C, wmManipulator *mpr, const wmEve
ManipulatorCommonData *data = &arrow->data;
const float ofs_new = facdir * len_v3(offset);
- wmManipulatorProperty *mpr_prop = WM_manipulator_property_find(mpr, "offset");
+ wmManipulatorProperty *mpr_prop = WM_manipulator_target_property_find(mpr, "offset");
/* set the property for the operator and call its modal function */
- if (WM_manipulator_property_is_valid(mpr_prop)) {
+ if (WM_manipulator_target_property_is_valid(mpr_prop)) {
const int draw_options = RNA_enum_get(arrow->manipulator.ptr, "draw_options");
const bool constrained = (draw_options & ED_MANIPULATOR_ARROW_STYLE_CONSTRAINED) != 0;
const bool inverted = (draw_options & ED_MANIPULATOR_ARROW_STYLE_INVERTED) != 0;
const bool use_precision = (flag & WM_MANIPULATOR_TWEAK_PRECISE) != 0;
float value = manipulator_value_from_offset(data, inter, ofs_new, constrained, inverted, use_precision);
- WM_manipulator_property_value_set(C, mpr, mpr_prop, value);
+ WM_manipulator_target_property_value_set(C, mpr, mpr_prop, value);
/* get clamped value */
- value = WM_manipulator_property_value_get(mpr, mpr_prop);
+ value = WM_manipulator_target_property_value_get(mpr, mpr_prop);
data->offset = manipulator_offset_from_value(data, value, constrained, inverted);
}
@@ -366,11 +366,11 @@ static void manipulator_arrow_invoke(
{
ArrowManipulator3D *arrow = (ArrowManipulator3D *)mpr;
ManipulatorInteraction *inter = MEM_callocN(sizeof(ManipulatorInteraction), __func__);
- wmManipulatorProperty *mpr_prop = WM_manipulator_property_find(mpr, "offset");
+ wmManipulatorProperty *mpr_prop = WM_manipulator_target_property_find(mpr, "offset");
/* Some manipulators don't use properties. */
- if (mpr_prop && WM_manipulator_property_is_valid(mpr_prop)) {
- inter->init_value = WM_manipulator_property_value_get(mpr, mpr_prop);
+ if (mpr_prop && WM_manipulator_target_property_is_valid(mpr_prop)) {
+ inter->init_value = WM_manipulator_target_property_value_get(mpr, mpr_prop);
}
inter->init_offset = arrow->data.offset;
@@ -403,7 +403,7 @@ static void manipulator_arrow_exit(bContext *C, wmManipulator *mpr, const bool c
ManipulatorCommonData *data = &arrow->data;
ManipulatorInteraction *inter = mpr->interaction_data;
- wmManipulatorProperty *mpr_prop = WM_manipulator_property_find(mpr, "offset");
+ wmManipulatorProperty *mpr_prop = WM_manipulator_target_property_find(mpr, "offset");
manipulator_property_value_reset(C, mpr, inter, mpr_prop);
data->offset = inter->init_offset;
}
@@ -417,15 +417,15 @@ static void manipulator_arrow_exit(bContext *C, wmManipulator *mpr, const bool c
/**
* Define a custom property UI range
*
- * \note Needs to be called before WM_manipulator_property_def_rna!
+ * \note Needs to be called before WM_manipulator_target_property_def_rna!
*/
void ED_manipulator_arrow3d_set_ui_range(wmManipulator *mpr, const float min, const float max)
{
ArrowManipulator3D *arrow = (ArrowManipulator3D *)mpr;
BLI_assert(min < max);
- BLI_assert(!(WM_manipulator_property_find(mpr, "offset") && "Make sure this function "
- "is called before WM_manipulator_property_def_rna"));
+ BLI_assert(!(WM_manipulator_target_property_find(mpr, "offset") && "Make sure this function "
+ "is called before WM_manipulator_target_property_def_rna"));
arrow->data.range = max - min;
arrow->data.min = min;
@@ -435,13 +435,13 @@ void ED_manipulator_arrow3d_set_ui_range(wmManipulator *mpr, const float min, co
/**
* Define a custom factor for arrow min/max distance
*
- * \note Needs to be called before WM_manipulator_property_def_rna!
+ * \note Needs to be called before WM_manipulator_target_property_def_rna!
*/
void ED_manipulator_arrow3d_set_range_fac(wmManipulator *mpr, const float range_fac)
{
ArrowManipulator3D *arrow = (ArrowManipulator3D *)mpr;
- BLI_assert(!(WM_manipulator_property_find(mpr, "offset") && "Make sure this function "
- "is called before WM_manipulator_property_def_rna"));
+ BLI_assert(!(WM_manipulator_target_property_find(mpr, "offset") && "Make sure this function "
+ "is called before WM_manipulator_target_property_def_rna"));
arrow->data.range_fac = range_fac;
}
diff --git a/source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c b/source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c
index 21e5778d509..f35e3b481a6 100644
--- a/source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c
+++ b/source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c
@@ -510,13 +510,13 @@ static void manipulator_rect_transform_modal(
wmManipulatorProperty *mpr_prop;
- mpr_prop = WM_manipulator_property_find(mpr, "offset");
+ mpr_prop = WM_manipulator_target_property_find(mpr, "offset");
if (mpr_prop->prop != NULL) {
RNA_property_float_set_array(&mpr_prop->ptr, mpr_prop->prop, mpr->matrix_offset[3]);
RNA_property_update(C, &mpr_prop->ptr, mpr_prop->prop);
}
- mpr_prop = WM_manipulator_property_find(mpr, "scale");
+ mpr_prop = WM_manipulator_target_property_find(mpr, "scale");
if (mpr_prop->prop != NULL) {
if (transform_flag & ED_MANIPULATOR_RECT_TRANSFORM_FLAG_SCALE_UNIFORM) {
RNA_property_float_set(&mpr_prop->ptr, mpr_prop->prop, scale[0]);
@@ -556,13 +556,13 @@ static void manipulator_rect_transform_exit(bContext *C, wmManipulator *mpr, con
wmManipulatorProperty *mpr_prop;
/* reset properties */
- mpr_prop = WM_manipulator_property_find(mpr, "offset");
+ mpr_prop = WM_manipulator_target_property_find(mpr, "offset");
if (mpr_prop->prop != NULL) {
RNA_property_float_set_array(&mpr_prop->ptr, mpr_prop->prop, data->orig_offset);
RNA_property_update(C, &mpr_prop->ptr, mpr_prop->prop);
}
- mpr_prop = WM_manipulator_property_find(mpr, "scale");
+ mpr_prop = WM_manipulator_target_property_find(mpr, "scale");
if (mpr_prop->prop != NULL) {
const int transform_flag = RNA_enum_get(mpr->ptr, "transform");
if (transform_flag & ED_MANIPULATOR_RECT_TRANSFORM_FLAG_SCALE_UNIFORM) {
diff --git a/source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c b/source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c
index e8b1a583be9..40cf67e1133 100644
--- a/source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c
+++ b/source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c
@@ -293,7 +293,7 @@ static void dial_draw_intern(
DialInteraction *inter = mpr->interaction_data;
/* XXX, View3D rotation manipulator doesn't call modal. */
- if (mpr->properties_edit.first == NULL) {
+ if (mpr->target_properties.first == NULL) {
wmWindow *win = CTX_wm_window(C);
manipulator_dial_modal((bContext *)C, mpr, win->eventstate, 0);
}
@@ -396,9 +396,9 @@ static void manipulator_dial_modal(bContext *C, wmManipulator *mpr, const wmEven
inter->output.angle_ofs = angle_ofs;
/* set the property for the operator and call its modal function */
- wmManipulatorProperty *mpr_prop = WM_manipulator_property_find(mpr, "offset");
- if (mpr_prop && WM_manipulator_property_is_valid(mpr_prop)) {
- WM_manipulator_property_value_set(C, mpr, mpr_prop, inter->init_prop_angle + angle_delta);
+ wmManipulatorProperty *mpr_prop = WM_manipulator_target_property_find(mpr, "offset");
+ if (mpr_prop && WM_manipulator_target_property_is_valid(mpr_prop)) {
+ WM_manipulator_target_property_value_set(C, mpr, mpr_prop, inter->init_prop_angle + angle_delta);
}
}
@@ -419,9 +419,9 @@ static void manipulator_dial_invoke(
inter->init_mval[0] = event->mval[0];
inter->init_mval[1] = event->mval[1];
- wmManipulatorProperty *mpr_prop = WM_manipulator_property_find(mpr, "offset");
- if (mpr_prop && WM_manipulator_property_is_valid(mpr_prop)) {
- inter->init_prop_angle = WM_manipulator_property_value_get(mpr, mpr_prop);
+ wmManipulatorProperty *mpr_prop = WM_manipulator_target_property_find(mpr, "offset");
+ if (mpr_prop && WM_manipulator_target_property_is_valid(mpr_prop)) {
+ inter->init_prop_angle = WM_manipulator_target_property_value_get(mpr, mpr_prop);
}
mpr->interaction_data = inter;
diff --git a/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c b/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c
index b5eccaf2699..527e29c79e8 100644
--- a/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c
+++ b/source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c
@@ -196,9 +196,9 @@ static void manipulator_grab_modal(bContext *C, wmManipulator *mpr, const wmEven
add_v3_v3v3(inter->output.co_final, inter->init_prop_co, inter->output.co_ofs);
/* set the property for the operator and call its modal function */
- wmManipulatorProperty *mpr_prop = WM_manipulator_property_find(mpr, "offset");
- if (mpr_prop && WM_manipulator_property_is_valid(mpr_prop)) {
- WM_manipulator_property_value_set_array(C, mpr, mpr_prop, inter->output.co_final, 3);
+ wmManipulatorProperty *mpr_prop = WM_manipulator_target_property_find(mpr, "offset");
+ if (mpr_prop && WM_manipulator_target_property_is_valid(mpr_prop)) {
+ WM_manipulator_target_property_value_set_array(C, mpr, mpr_prop, inter->output.co_final, 3);
}
}
@@ -210,9 +210,9 @@ static void manipulator_grab_invoke(
inter->init_mval[0] = event->mval[0];
inter->init_mval[1] = event->mval[1];
- wmManipulatorProperty *mpr_prop = WM_manipulator_property_find(mpr, "offset");
- if (mpr_prop && WM_manipulator_property_is_valid(mpr_prop)) {
- WM_manipulator_property_value_get_array(mpr, mpr_prop, inter->init_prop_co, 3);
+ wmManipulatorProperty *mpr_prop = WM_manipulator_target_property_find(mpr, "offset");
+ if (mpr_prop && WM_manipulator_target_property_is_valid(mpr_prop)) {
+ WM_manipulator_target_property_value_get_array(mpr, mpr_prop, inter->init_prop_co, 3);
}
mpr->interaction_data = inter;
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c
index 34644bb7fd6..4d301c009ee 100644
--- a/source/blender/editors/mesh/editmesh_bisect.c
+++ b/source/blender/editors/mesh/editmesh_bisect.c
@@ -628,7 +628,7 @@ static void manipulator_mesh_bisect_setup(const bContext *C, wmManipulatorGroup
/* Setup property callbacks */
{
- WM_manipulator_property_def_func(
+ WM_manipulator_target_property_def_func(
man->translate_z, "offset",
&(const struct wmManipulatorPropertyFnParams) {
.value_get_fn = manipulator_bisect_prop_depth_get,
@@ -637,7 +637,7 @@ static void manipulator_mesh_bisect_setup(const bContext *C, wmManipulatorGroup
.user_data = NULL,
});
- WM_manipulator_property_def_func(
+ WM_manipulator_target_property_def_func(
man->translate_c, "offset",
&(const struct wmManipulatorPropertyFnParams) {
.value_get_fn = manipulator_bisect_prop_translate_get,
@@ -646,7 +646,7 @@ static void manipulator_mesh_bisect_setup(const bContext *C, wmManipulatorGroup
.user_data = NULL,
});
- WM_manipulator_property_def_func(
+ WM_manipulator_target_property_def_func(
man->rotate_c, "offset",
&(const struct wmManipulatorPropertyFnParams) {
.value_get_fn = manipulator_bisect_prop_angle_get,
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index cfeff6a65af..32f5dcd5526 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -1090,7 +1090,7 @@ static void manipulator_mesh_spin_setup(const bContext *C, wmManipulatorGroup *m
/* Setup property callbacks */
{
- WM_manipulator_property_def_func(
+ WM_manipulator_target_property_def_func(
man->translate_z, "offset",
&(const struct wmManipulatorPropertyFnParams) {
.value_get_fn = manipulator_spin_prop_depth_get,
@@ -1099,7 +1099,7 @@ static void manipulator_mesh_spin_setup(const bContext *C, wmManipulatorGroup *m
.user_data = NULL,
});
- WM_manipulator_property_def_func(
+ WM_manipulator_target_property_def_func(
man->translate_c, "offset",
&(const struct wmManipulatorPropertyFnParams) {
.value_get_fn = manipulator_spin_prop_translate_get,
@@ -1108,7 +1108,7 @@ static void manipulator_mesh_spin_setup(const bContext *C, wmManipulatorGroup *m
.user_data = NULL,
});
- WM_manipulator_property_def_func(
+ WM_manipulator_target_property_def_func(
man->rotate_c, "offset",
&(const struct wmManipulatorPropertyFnParams) {
.value_get_fn = manipulator_spin_prop_axis_angle_get,
@@ -1117,7 +1117,7 @@ static void manipulator_mesh_spin_setup(const bContext *C, wmManipulatorGroup *m
.user_data = NULL,
});
- WM_manipulator_property_def_func(
+ WM_manipulator_target_property_def_func(
man->angle_z, "offset",
&(const struct wmManipulatorPropertyFnParams) {
.value_get_fn = manipulator_spin_prop_angle_get,
diff --git a/source/blender/editors/space_node/node_manipulators.c b/source/blender/editors/space_node/node_manipulators.c
index e3f699cabdf..8b4ebd70874 100644
--- a/source/blender/editors/space_node/node_manipulators.c
+++ b/source/blender/editors/space_node/node_manipulators.c
@@ -96,8 +96,8 @@ static void WIDGETGROUP_node_transform_refresh(const bContext *C, wmManipulatorG
SpaceNode *snode = CTX_wm_space_node(C);
PointerRNA nodeptr;
RNA_pointer_create(snode->id, &RNA_SpaceNodeEditor, snode, &nodeptr);
- WM_manipulator_property_def_rna(cage, "offset", &nodeptr, "backdrop_offset", -1);
- WM_manipulator_property_def_rna(cage, "scale", &nodeptr, "backdrop_zoom", -1);
+ WM_manipulator_target_property_def_rna(cage, "offset", &nodeptr, "backdrop_offset", -1);
+ WM_manipulator_target_property_def_rna(cage, "scale", &nodeptr, "backdrop_zoom", -1);
}
else {
WM_manipulator_set_flag(cage, WM_MANIPULATOR_HIDDEN, true);
diff --git a/source/blender/editors/space_view3d/view3d_manipulators.c b/source/blender/editors/space_view3d/view3d_manipulators.c
index 907fe91009a..4d1357e1297 100644
--- a/source/blender/editors/space_view3d/view3d_manipulators.c
+++ b/source/blender/editors/space_view3d/view3d_manipulators.c
@@ -104,7 +104,7 @@ static void WIDGETGROUP_lamp_refresh(const bContext *C, wmManipulatorGroup *mgro
PointerRNA lamp_ptr;
const char *propname = "spot_size";
RNA_pointer_create(&la->id, &RNA_Lamp, la, &lamp_ptr);
- WM_manipulator_property_def_rna(wwrapper->manipulator, "offset", &lamp_ptr, propname, -1);
+ WM_manipulator_target_property_def_rna(wwrapper->manipulator, "offset", &lamp_ptr, propname, -1);
}
void VIEW3D_WGT_lamp(wmManipulatorGroupType *wgt)
@@ -237,7 +237,7 @@ static void WIDGETGROUP_camera_refresh(const bContext *C, wmManipulatorGroup *mg
WM_manipulator_set_flag(camgroup->dop_dist, WM_MANIPULATOR_HIDDEN, false);
/* need to set property here for undo. TODO would prefer to do this in _init */
- WM_manipulator_property_def_rna(camgroup->dop_dist, "offset", &camera_ptr, "dof_distance", -1);
+ WM_manipulator_target_property_def_rna(camgroup->dop_dist, "offset", &camera_ptr, "dof_distance", -1);
}
else {
WM_manipulator_set_flag(camgroup->dop_dist, WM_MANIPULATOR_HIDDEN, true);
@@ -281,8 +281,8 @@ static void WIDGETGROUP_camera_refresh(const bContext *C, wmManipulatorGroup *mg
WM_manipulator_set_scale(widget, drawsize);
/* need to set property here for undo. TODO would prefer to do this in _init */
- WM_manipulator_property_def_rna(camgroup->focal_len, "offset", &camera_ptr, "lens", -1);
- WM_manipulator_property_def_rna(camgroup->ortho_scale, "offset", &camera_ptr, "ortho_scale", -1);
+ WM_manipulator_target_property_def_rna(camgroup->focal_len, "offset", &camera_ptr, "lens", -1);
+ WM_manipulator_target_property_def_rna(camgroup->ortho_scale, "offset", &camera_ptr, "ortho_scale", -1);
}
}
@@ -347,7 +347,7 @@ static void WIDGETGROUP_forcefield_refresh(const bContext *C, wmManipulatorGroup
WM_manipulator_set_matrix_rotation_from_z_axis(wwrapper->manipulator, ob->obmat[2]);
WM_manipulator_set_matrix_offset_location(wwrapper->manipulator, ofs);
WM_manipulator_set_flag(wwrapper->manipulator, WM_MANIPULATOR_HIDDEN, false);
- WM_manipulator_property_def_rna(wwrapper->manipulator, "offset", &field_ptr, "strength", -1);
+ WM_manipulator_target_property_def_rna(wwrapper->manipulator, "offset", &field_ptr, "strength", -1);
}
else {
WM_manipulator_set_flag(wwrapper->manipulator, WM_MANIPULATOR_HIDDEN, true);
diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt
index a098fc94591..cfa97a9e177 100644
--- a/source/blender/windowmanager/CMakeLists.txt
+++ b/source/blender/windowmanager/CMakeLists.txt
@@ -75,7 +75,7 @@ set(SRC
manipulators/intern/wm_manipulator_group.c
manipulators/intern/wm_manipulator_group_type.c
manipulators/intern/wm_manipulator_map.c
- manipulators/intern/wm_manipulator_property.c
+ manipulators/intern/wm_manipulator_target_props.c
manipulators/intern/wm_manipulator_type.c
WM_api.h
diff --git a/source/blender/windowmanager/manipulators/WM_manipulator_api.h b/source/blender/windowmanager/manipulators/WM_manipulator_api.h
index 43a80cb1f80..6a5c2aeef71 100644
--- a/source/blender/windowmanager/manipulators/WM_manipulator_api.h
+++ b/source/blender/windowmanager/manipulators/WM_manipulator_api.h
@@ -131,33 +131,33 @@ void WM_manipulatorconfig_update_tag_remove(struct wmManipulatorMapType *mmap_ty
void WM_manipulatorconfig_update(struct Main *bmain);
-/* wm_maniulator_property.c */
-struct wmManipulatorProperty *WM_manipulator_property_find(
+/* wm_maniulator_target_props.c */
+struct wmManipulatorProperty *WM_manipulator_target_property_find(
struct wmManipulator *mpr, const char *idname);
-void WM_manipulator_property_def_rna(
+void WM_manipulator_target_property_def_rna(
struct wmManipulator *mpr, const char *idname,
struct PointerRNA *ptr, const char *propname, int index);
-void WM_manipulator_property_def_func(
+void WM_manipulator_target_property_def_func(
struct wmManipulator *mpr, const char *idname,
const struct wmManipulatorPropertyFnParams *params);
-bool WM_manipulator_property_is_valid(
+bool WM_manipulator_target_property_is_valid(
const struct wmManipulatorProperty *mpr_prop);
-float WM_manipulator_property_value_get(
+float WM_manipulator_target_property_value_get(
const struct wmManipulator *mpr, struct wmManipulatorProperty *mpr_prop);
-void WM_manipulator_property_value_set(
+void WM_manipulator_target_property_value_set(
struct bContext *C, const struct wmManipulator *mpr, struct wmManipulatorProperty *mpr_prop,
const float value);
-void WM_manipulator_property_value_get_array(
+void WM_manipulator_target_property_value_get_array(
const struct wmManipulator *mpr, struct wmManipulatorProperty *mpr_prop,
float *value, const int value_len);
-void WM_manipulator_property_value_set_array(
+void WM_manipulator_target_property_value_set_array(
struct bContext *C, const struct wmManipulator *mpr, struct wmManipulatorProperty *mpr_prop,
const float *value, const int value_len);
-void WM_manipulator_property_range_get(
+void WM_manipulator_target_property_range_get(
const struct wmManipulator *mpr, struct wmManipulatorProperty *mpr_prop,
float range[2]);
diff --git a/source/blender/windowmanager/manipulators/WM_manipulator_types.h b/source/blender/windowmanager/manipulators/WM_manipulator_types.h
index f3064a62607..dc30a7fa40d 100644
--- a/source/blender/windowmanager/manipulators/WM_manipulator_types.h
+++ b/source/blender/windowmanager/manipulators/WM_manipulator_types.h
@@ -116,7 +116,7 @@ struct wmManipulator {
* Public API's should use string names,
* private API's can pass 'wmManipulatorProperty' directly.
*/
- ListBase properties_edit;
+ ListBase target_properties;
struct IDProperty *properties;
};
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
index 938edb56153..1156298c51a 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
@@ -197,7 +197,7 @@ void WM_manipulator_free(ListBase *manipulatorlist, wmManipulatorMap *mmap, wmMa
if (mpr->op_data.ptr.data) {
WM_operator_properties_free(&mpr->op_data.ptr);
}
- BLI_freelistN(&mpr->properties_edit);
+ BLI_freelistN(&mpr->target_properties);
if (mpr->ptr != NULL) {
WM_manipulator_properties_free(mpr->ptr);
@@ -461,9 +461,9 @@ void wm_manipulator_calculate_scale(wmManipulator *mpr, const bContext *C)
static void manipulator_update_prop_data(wmManipulator *mpr)
{
/* manipulator property might have been changed, so update manipulator */
- if (mpr->type->property_update && !BLI_listbase_is_empty(&mpr->properties_edit)) {
- for (wmManipulatorProperty *mpr_prop = mpr->properties_edit.first; mpr_prop; mpr_prop = mpr_prop->next) {
- if (WM_manipulator_property_is_valid(mpr_prop)) {
+ if (mpr->type->property_update && !BLI_listbase_is_empty(&mpr->target_properties)) {
+ for (wmManipulatorProperty *mpr_prop = mpr->target_properties.first; mpr_prop; mpr_prop = mpr_prop->next) {
+ if (WM_manipulator_target_property_is_valid(mpr_prop)) {
mpr->type->property_update(mpr, mpr_prop);
}
}
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator_property.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator_target_props.c
index beaf2abdc17..d43a9b8882d 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulator_property.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator_target_props.c
@@ -18,7 +18,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/windowmanager/manipulators/intern/wm_manipulator_property.c
+/** \file blender/windowmanager/manipulators/intern/wm_manipulator_target_props.c
* \ingroup wm
*/
@@ -53,30 +53,30 @@
/** \name Property Definition
* \{ */
-wmManipulatorProperty *WM_manipulator_property_find(wmManipulator *mpr, const char *idname)
+wmManipulatorProperty *WM_manipulator_target_property_find(wmManipulator *mpr, const char *idname)
{
- return BLI_findstring(&mpr->properties_edit, idname, offsetof(wmManipulatorProperty, idname));
+ return BLI_findstring(&mpr->target_properties, idname, offsetof(wmManipulatorProperty, idname));
}
-static wmManipulatorProperty *wm_manipulator_property_def_internal(
+static wmManipulatorProperty *wm_manipulator_target_property_def_internal(
wmManipulator *mpr, const char *idname)
{
- wmManipulatorProperty *mpr_prop = WM_manipulator_property_find(mpr, idname);
+ wmManipulatorProperty *mpr_prop = WM_manipulator_target_property_find(mpr, idname);
if (mpr_prop == NULL) {
const uint idname_size = strlen(idname) + 1;
mpr_prop = MEM_callocN(sizeof(wmManipulatorProperty) + idname_size, __func__);
memcpy(mpr_prop->idname, idname, idname_size);
- BLI_addtail(&mpr->properties_edit, mpr_prop);
+ BLI_addtail(&mpr->target_properties, mpr_prop);
}
return mpr_prop;
}
-void WM_manipulator_property_def_rna(
+void WM_manipulator_target_property_def_rna(
wmManipulator *mpr, const char *idname,
PointerRNA *ptr, const char *propname, int index)
{
- wmManipulatorProperty *mpr_prop = wm_manipulator_property_def_internal(mpr, idname);
+ wmManipulatorProperty *mpr_prop = wm_manipulator_target_property_def_internal(mpr, idname);
/* if manipulator evokes an operator we cannot use it for property manipulation */
mpr->op_data.type = NULL;
@@ -90,11 +90,11 @@ void WM_manipulator_property_def_rna(
}
}
-void WM_manipulator_property_def_func(
+void WM_manipulator_target_property_def_func(
wmManipulator *mpr, const char *idname,
const wmManipulatorPropertyFnParams *params)
{
- wmManipulatorProperty *mpr_prop = wm_manipulator_property_def_internal(mpr, idname);
+ wmManipulatorProperty *mpr_prop = wm_manipulator_target_property_def_internal(mpr, idname);
/* if manipulator evokes an operator we cannot use it for property manipulation */
mpr->op_data.type = NULL;
@@ -117,13 +117,13 @@ void WM_manipulator_property_def_func(
/** \name Property Access
* \{ */
-bool WM_manipulator_property_is_valid(const wmManipulatorProperty *mpr_prop)
+bool WM_manipulator_target_property_is_valid(const wmManipulatorProperty *mpr_prop)
{
return ((mpr_prop->prop != NULL) ||
(mpr_prop->custom_func.value_get_fn && mpr_prop->custom_func.value_set_fn));
}
-float WM_manipulator_property_value_get(
+float WM_manipulator_target_property_value_get(
const wmManipulator *mpr, wmManipulatorProperty *mpr_prop)
{
if (mpr_prop->custom_func.value_get_fn) {
@@ -140,7 +140,7 @@ float WM_manipulator_property_value_get(
}
}
-void WM_manipulator_property_value_set(
+void WM_manipulator_target_property_value_set(
bContext *C, const wmManipulator *mpr,
wmManipulatorProperty *mpr_prop, const float value)
{
@@ -159,7 +159,7 @@ void WM_manipulator_property_value_set(
RNA_property_update(C, &mpr_prop->ptr, mpr_prop->prop);
}
-void WM_manipulator_property_value_get_array(
+void WM_manipulator_target_property_value_get_array(
const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
float *value, const int value_len)
{
@@ -172,7 +172,7 @@ void WM_manipulator_property_value_get_array(
return RNA_property_float_get_array(&mpr_prop->ptr, mpr_prop->prop, value);
}
-void WM_manipulator_property_value_set_array(
+void WM_manipulator_target_property_value_set_array(
bContext *C, const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
const float *value, const int value_len)
{
@@ -187,7 +187,7 @@ void WM_manipulator_property_value_set_array(
RNA_property_update(C, &mpr_prop->ptr, mpr_prop->prop);
}
-void WM_manipulator_property_range_get(
+void WM_manipulator_target_property_range_get(
const wmManipulator *mpr, wmManipulatorProperty *mpr_prop,
float range[2])
{