Commit: 85c5c5531e990b12fed60c428b70f887c1bd0c81
Author: Campbell Barton
Date:   Wed Jun 21 17:06:24 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB85c5c5531e990b12fed60c428b70f887c1bd0c81

Manipulator: edit_properties -> target_properties

Naming was too confusing between properties of a manipulator
and properties it edits.

===================================================================

M       source/blender/editors/manipulator_library/manipulator_library_utils.c
M       
source/blender/editors/manipulator_library/manipulator_types/arrow3d_manipulator.c
M       
source/blender/editors/manipulator_library/manipulator_types/cage2d_manipulator.c
M       
source/blender/editors/manipulator_library/manipulator_types/dial3d_manipulator.c
M       
source/blender/editors/manipulator_library/manipulator_types/grab3d_manipulator.c
M       source/blender/editors/mesh/editmesh_bisect.c
M       source/blender/editors/mesh/editmesh_extrude.c
M       source/blender/editors/space_node/node_manipulators.c
M       source/blender/editors/space_view3d/view3d_manipulators.c
M       source/blender/windowmanager/CMakeLists.txt
M       source/blender/windowmanager/manipulators/WM_manipulator_api.h
M       source/blender/windowmanager/manipulators/WM_manipulator_types.h
M       source/blender/windowmanager/manipulators/intern/wm_manipulator.c
R083    
source/blender/windowmanager/manipulators/intern/wm_manipulator_property.c      
source/blender/windowmanager/manipulators/intern/wm_manipulator_target_props.c

===================================================================

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/m

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to