diff options
9 files changed, 31 insertions, 31 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_library_utils.c b/source/blender/editors/gizmo_library/gizmo_library_utils.c index 07c230c5503..a53fb894a34 100644 --- a/source/blender/editors/gizmo_library/gizmo_library_utils.c +++ b/source/blender/editors/gizmo_library/gizmo_library_utils.c @@ -121,7 +121,7 @@ void gizmo_property_data_update( return; } - float value = WM_gizmo_target_property_value_get(gz, gz_prop); + float value = WM_gizmo_target_property_float_get(gz, gz_prop); if (constrained) { if ((data->flag & GIZMO_CUSTOM_RANGE_SET) == 0) { @@ -145,7 +145,7 @@ void gizmo_property_value_reset( bContext *C, const wmGizmo *gz, GizmoInteraction *inter, wmGizmoProperty *gz_prop) { - WM_gizmo_target_property_value_set(C, gz, gz_prop, inter->init_value); + WM_gizmo_target_property_float_set(C, gz, gz_prop, inter->init_value); } /* -------------------------------------------------------------------- */ diff --git a/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c index 0f8389af17d..d72dbe0f54d 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/arrow3d_gizmo.c @@ -309,9 +309,9 @@ static int gizmo_arrow_modal( const bool use_precision = (tweak_flag & WM_GIZMO_TWEAK_PRECISE) != 0; float value = gizmo_value_from_offset(data, inter, ofs_new, constrained, inverted, use_precision); - WM_gizmo_target_property_value_set(C, gz, gz_prop, value); + WM_gizmo_target_property_float_set(C, gz, gz_prop, value); /* get clamped value */ - value = WM_gizmo_target_property_value_get(gz, gz_prop); + value = WM_gizmo_target_property_float_get(gz, gz_prop); data->offset = gizmo_offset_from_value(data, value, constrained, inverted); } @@ -344,7 +344,7 @@ static int gizmo_arrow_invoke( /* Some gizmos don't use properties. */ if (WM_gizmo_target_property_is_valid(gz_prop)) { - inter->init_value = WM_gizmo_target_property_value_get(gz, gz_prop); + inter->init_value = WM_gizmo_target_property_float_get(gz, gz_prop); } inter->init_offset = arrow->data.offset; @@ -380,7 +380,7 @@ static void gizmo_arrow_exit(bContext *C, wmGizmo *gz, const bool cancel) /* Assign incase applying the opetration needs an updated offset * editmesh bisect needs this. */ if (is_prop_valid) { - data->offset = WM_gizmo_target_property_value_get(gz, gz_prop); + data->offset = WM_gizmo_target_property_float_get(gz, gz_prop); } return; } diff --git a/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c index bb9cac595be..da84c8217e7 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/cage2d_gizmo.c @@ -880,7 +880,7 @@ static int gizmo_cage2d_modal( gz_prop = WM_gizmo_target_property_find(gz, "matrix"); if (gz_prop->type != NULL) { - WM_gizmo_target_property_value_get_array(gz, gz_prop, &gz->matrix_offset[0][0]); + WM_gizmo_target_property_float_get_array(gz, gz_prop, &gz->matrix_offset[0][0]); } if (gz->highlight_part == ED_GIZMO_CAGE2D_PART_TRANSLATE) { @@ -995,7 +995,7 @@ static int gizmo_cage2d_modal( } if (gz_prop->type != NULL) { - WM_gizmo_target_property_value_set_array(C, gz, gz_prop, &gz->matrix_offset[0][0]); + WM_gizmo_target_property_float_set_array(C, gz, gz_prop, &gz->matrix_offset[0][0]); } /* tag the region for redraw */ @@ -1009,7 +1009,7 @@ static void gizmo_cage2d_property_update(wmGizmo *gz, wmGizmoProperty *gz_prop) { if (STREQ(gz_prop->type->idname, "matrix")) { if (WM_gizmo_target_property_array_length(gz, gz_prop) == 16) { - WM_gizmo_target_property_value_get_array(gz, gz_prop, &gz->matrix_offset[0][0]); + WM_gizmo_target_property_float_get_array(gz, gz_prop, &gz->matrix_offset[0][0]); } else { BLI_assert(0); @@ -1034,7 +1034,7 @@ static void gizmo_cage2d_exit(bContext *C, wmGizmo *gz, const bool cancel) /* reset properties */ gz_prop = WM_gizmo_target_property_find(gz, "matrix"); if (gz_prop->type != NULL) { - WM_gizmo_target_property_value_set_array(C, gz, gz_prop, &data->orig_matrix_offset[0][0]); + WM_gizmo_target_property_float_set_array(C, gz, gz_prop, &data->orig_matrix_offset[0][0]); } copy_m4_m4(gz->matrix_offset, data->orig_matrix_offset); diff --git a/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c index 0f1d309c927..79339b63777 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/cage3d_gizmo.c @@ -508,7 +508,7 @@ static int gizmo_cage3d_modal( gz_prop = WM_gizmo_target_property_find(gz, "matrix"); if (gz_prop->type != NULL) { - WM_gizmo_target_property_value_get_array(gz, gz_prop, &gz->matrix_offset[0][0]); + WM_gizmo_target_property_float_get_array(gz, gz_prop, &gz->matrix_offset[0][0]); } if (gz->highlight_part == ED_GIZMO_CAGE3D_PART_TRANSLATE) { @@ -591,7 +591,7 @@ static int gizmo_cage3d_modal( } if (gz_prop->type != NULL) { - WM_gizmo_target_property_value_set_array(C, gz, gz_prop, &gz->matrix_offset[0][0]); + WM_gizmo_target_property_float_set_array(C, gz, gz_prop, &gz->matrix_offset[0][0]); } /* tag the region for redraw */ @@ -605,7 +605,7 @@ static void gizmo_cage3d_property_update(wmGizmo *gz, wmGizmoProperty *gz_prop) { if (STREQ(gz_prop->type->idname, "matrix")) { if (WM_gizmo_target_property_array_length(gz, gz_prop) == 16) { - WM_gizmo_target_property_value_get_array(gz, gz_prop, &gz->matrix_offset[0][0]); + WM_gizmo_target_property_float_get_array(gz, gz_prop, &gz->matrix_offset[0][0]); } else { BLI_assert(0); @@ -628,7 +628,7 @@ static void gizmo_cage3d_exit(bContext *C, wmGizmo *gz, const bool cancel) /* reset properties */ gz_prop = WM_gizmo_target_property_find(gz, "matrix"); if (gz_prop->type != NULL) { - WM_gizmo_target_property_value_set_array(C, gz, gz_prop, &data->orig_matrix_offset[0][0]); + WM_gizmo_target_property_float_set_array(C, gz, gz_prop, &data->orig_matrix_offset[0][0]); } copy_m4_m4(gz->matrix_offset, data->orig_matrix_offset); diff --git a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c index 8e04703c14e..7a3dc2d5710 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c @@ -415,7 +415,7 @@ static int gizmo_dial_modal( /* set the property for the operator and call its modal function */ wmGizmoProperty *gz_prop = WM_gizmo_target_property_find(gz, "offset"); if (WM_gizmo_target_property_is_valid(gz_prop)) { - WM_gizmo_target_property_value_set(C, gz, gz_prop, inter->init_prop_angle + angle_delta); + WM_gizmo_target_property_float_set(C, gz, gz_prop, inter->init_prop_angle + angle_delta); } return OPERATOR_RUNNING_MODAL; } @@ -439,7 +439,7 @@ static int gizmo_dial_invoke( wmGizmoProperty *gz_prop = WM_gizmo_target_property_find(gz, "offset"); if (WM_gizmo_target_property_is_valid(gz_prop)) { - inter->init_prop_angle = WM_gizmo_target_property_value_get(gz, gz_prop); + inter->init_prop_angle = WM_gizmo_target_property_float_get(gz, gz_prop); } gz->interaction_data = inter; diff --git a/source/blender/editors/gizmo_library/gizmo_types/grab3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/grab3d_gizmo.c index fcbd333078d..ad81bae6157 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/grab3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/grab3d_gizmo.c @@ -256,7 +256,7 @@ static int gizmo_grab_modal( /* set the property for the operator and call its modal function */ wmGizmoProperty *gz_prop = WM_gizmo_target_property_find(gz, "offset"); if (WM_gizmo_target_property_is_valid(gz_prop)) { - WM_gizmo_target_property_value_set_array(C, gz, gz_prop, grab->prop_co); + WM_gizmo_target_property_float_set_array(C, gz, gz_prop, grab->prop_co); } else { zero_v3(grab->prop_co); @@ -280,7 +280,7 @@ static int gizmo_grab_invoke( #else wmGizmoProperty *gz_prop = WM_gizmo_target_property_find(gz, "offset"); if (WM_gizmo_target_property_is_valid(gz_prop)) { - WM_gizmo_target_property_value_get_array(gz, gz_prop, inter->init_prop_co); + WM_gizmo_target_property_float_get_array(gz, gz_prop, inter->init_prop_co); } #endif @@ -315,7 +315,7 @@ static void gizmo_grab_property_update(wmGizmo *gz, wmGizmoProperty *gz_prop) { GrabGizmo3D *grab = (GrabGizmo3D *)gz; if (WM_gizmo_target_property_is_valid(gz_prop)) { - WM_gizmo_target_property_value_get_array(gz, gz_prop, grab->prop_co); + WM_gizmo_target_property_float_get_array(gz, gz_prop, grab->prop_co); } else { zero_v3(grab->prop_co); diff --git a/source/blender/python/intern/bpy_rna_gizmo.c b/source/blender/python/intern/bpy_rna_gizmo.c index 76f74261c74..cf0d88a4dc4 100644 --- a/source/blender/python/intern/bpy_rna_gizmo.c +++ b/source/blender/python/intern/bpy_rna_gizmo.c @@ -378,11 +378,11 @@ static PyObject *bpy_gizmo_target_get_value(PyObject *UNUSED(self), PyObject *ar { if (array_len != 0) { float *value = BLI_array_alloca(value, array_len); - WM_gizmo_target_property_value_get_array(gz, gz_prop, value); + WM_gizmo_target_property_float_get_array(gz, gz_prop, value); return PyC_Tuple_PackArray_F32(value, array_len); } else { - float value = WM_gizmo_target_property_value_get(gz, gz_prop); + float value = WM_gizmo_target_property_float_get(gz, gz_prop); return PyFloat_FromDouble(value); } break; @@ -451,14 +451,14 @@ static PyObject *bpy_gizmo_target_set_value(PyObject *UNUSED(self), PyObject *ar { goto fail; } - WM_gizmo_target_property_value_set_array(BPy_GetContext(), gz, gz_prop, value); + WM_gizmo_target_property_float_set_array(BPy_GetContext(), gz, gz_prop, value); } else { float value; if ((value = PyFloat_AsDouble(params.value)) == -1.0f && PyErr_Occurred()) { goto fail; } - WM_gizmo_target_property_value_set(BPy_GetContext(), gz, gz_prop, value); + WM_gizmo_target_property_float_set(BPy_GetContext(), gz, gz_prop, value); } Py_RETURN_NONE; } diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_api.h b/source/blender/windowmanager/gizmo/WM_gizmo_api.h index dd39cc96d6f..b59bdd4cf63 100644 --- a/source/blender/windowmanager/gizmo/WM_gizmo_api.h +++ b/source/blender/windowmanager/gizmo/WM_gizmo_api.h @@ -199,16 +199,16 @@ void WM_gizmo_target_property_clear_rna( bool WM_gizmo_target_property_is_valid_any(struct wmGizmo *gz); bool WM_gizmo_target_property_is_valid( const struct wmGizmoProperty *gz_prop); -float WM_gizmo_target_property_value_get( +float WM_gizmo_target_property_float_get( const struct wmGizmo *gz, struct wmGizmoProperty *gz_prop); -void WM_gizmo_target_property_value_set( +void WM_gizmo_target_property_float_set( struct bContext *C, const struct wmGizmo *gz, struct wmGizmoProperty *gz_prop, const float value); -void WM_gizmo_target_property_value_get_array( +void WM_gizmo_target_property_float_get_array( const struct wmGizmo *gz, struct wmGizmoProperty *gz_prop, float *value); -void WM_gizmo_target_property_value_set_array( +void WM_gizmo_target_property_float_set_array( struct bContext *C, const struct wmGizmo *gz, struct wmGizmoProperty *gz_prop, const float *value); diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c index 601c54b8be5..536dc5329bb 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c @@ -189,7 +189,7 @@ bool WM_gizmo_target_property_is_valid(const wmGizmoProperty *gz_prop) (gz_prop->custom_func.value_get_fn && gz_prop->custom_func.value_set_fn)); } -float WM_gizmo_target_property_value_get( +float WM_gizmo_target_property_float_get( const wmGizmo *gz, wmGizmoProperty *gz_prop) { if (gz_prop->custom_func.value_get_fn) { @@ -207,7 +207,7 @@ float WM_gizmo_target_property_value_get( } } -void WM_gizmo_target_property_value_set( +void WM_gizmo_target_property_float_set( bContext *C, const wmGizmo *gz, wmGizmoProperty *gz_prop, const float value) { @@ -227,7 +227,7 @@ void WM_gizmo_target_property_value_set( RNA_property_update(C, &gz_prop->ptr, gz_prop->prop); } -void WM_gizmo_target_property_value_get_array( +void WM_gizmo_target_property_float_get_array( const wmGizmo *gz, wmGizmoProperty *gz_prop, float *value) { @@ -238,7 +238,7 @@ void WM_gizmo_target_property_value_get_array( RNA_property_float_get_array(&gz_prop->ptr, gz_prop->prop, value); } -void WM_gizmo_target_property_value_set_array( +void WM_gizmo_target_property_float_set_array( bContext *C, const wmGizmo *gz, wmGizmoProperty *gz_prop, const float *value) { |