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-23 07:48:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-23 07:50:44 +0300
commit0a5d7efab324f5293e86d329d04aba6c0deaecad (patch)
treeeda1655729485057e99e1eb6bb7c2c92c5c1be18 /source/blender/windowmanager
parent12b985f1b198972ed8d33518ac5c00470c382a95 (diff)
Manipulator: rename struct members
Rename: - matrix -> matrix_basis - user_scale -> scale_basis - scale -> scale_final Match RNA names being added to custom-manipulator branch.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/manipulators/WM_manipulator_types.h6
-rw-r--r--source/blender/windowmanager/manipulators/intern/wm_manipulator.c16
2 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/windowmanager/manipulators/WM_manipulator_types.h b/source/blender/windowmanager/manipulators/WM_manipulator_types.h
index b2256002c6f..5c6bfe02e0b 100644
--- a/source/blender/windowmanager/manipulators/WM_manipulator_types.h
+++ b/source/blender/windowmanager/manipulators/WM_manipulator_types.h
@@ -87,13 +87,13 @@ struct wmManipulator {
* besides this it's up to the manipulators internal code how the
* rotation components are used for drawing and interaction.
*/
- float matrix[4][4];
+ float matrix_basis[4][4];
/* custom offset from origin */
float matrix_offset[4][4];
/* runtime property, set the scale while drawing on the viewport */
- float scale;
+ float scale_final;
/* user defined scale, in addition to the original one */
- float user_scale;
+ float scale_basis;
/* user defined width for line drawing */
float line_width;
/* manipulator colors (uses default fallbacks if not defined) */
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
index e492aed9f37..5daea3149d6 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator.c
@@ -94,7 +94,7 @@ static wmManipulator *wm_manipulator_create(
WM_manipulator_properties_sanitize(mpr->ptr, 0);
- unit_m4(mpr->matrix);
+ unit_m4(mpr->matrix_basis);
unit_m4(mpr->matrix_offset);
return mpr;
@@ -149,7 +149,7 @@ static void manipulator_init(wmManipulator *mpr)
{
const float color_default[4] = {1.0f, 1.0f, 1.0f, 1.0f};
- mpr->user_scale = 1.0f;
+ mpr->scale_basis = 1.0f;
mpr->line_width = 1.0f;
/* defaults */
@@ -278,16 +278,16 @@ static void wm_manipulator_set_matrix_rotation_from_yz_axis__internal(
void WM_manipulator_set_matrix_rotation_from_z_axis(
wmManipulator *mpr, const float z_axis[3])
{
- wm_manipulator_set_matrix_rotation_from_z_axis__internal(mpr->matrix, z_axis);
+ wm_manipulator_set_matrix_rotation_from_z_axis__internal(mpr->matrix_basis, z_axis);
}
void WM_manipulator_set_matrix_rotation_from_yz_axis(
wmManipulator *mpr, const float y_axis[3], const float z_axis[3])
{
- wm_manipulator_set_matrix_rotation_from_yz_axis__internal(mpr->matrix, y_axis, z_axis);
+ wm_manipulator_set_matrix_rotation_from_yz_axis__internal(mpr->matrix_basis, y_axis, z_axis);
}
void WM_manipulator_set_matrix_location(wmManipulator *mpr, const float origin[3])
{
- copy_v3_v3(mpr->matrix[3], origin);
+ copy_v3_v3(mpr->matrix_basis[3], origin);
}
/**
@@ -320,7 +320,7 @@ void WM_manipulator_set_flag(wmManipulator *mpr, const int flag, const bool enab
void WM_manipulator_set_scale(wmManipulator *mpr, const float scale)
{
- mpr->user_scale = scale;
+ mpr->scale_basis = scale;
}
void WM_manipulator_set_line_width(wmManipulator *mpr, const float line_width)
@@ -457,7 +457,7 @@ void wm_manipulator_calculate_scale(wmManipulator *mpr, const bContext *C)
scale *= ED_view3d_pixel_size(rv3d, matrix_world[3]) / U.pixelsize;
}
else {
- scale *= ED_view3d_pixel_size(rv3d, mpr->matrix[3]) / U.pixelsize;
+ scale *= ED_view3d_pixel_size(rv3d, mpr->matrix_basis[3]) / U.pixelsize;
}
}
else {
@@ -465,7 +465,7 @@ void wm_manipulator_calculate_scale(wmManipulator *mpr, const bContext *C)
}
}
- mpr->scale = scale * mpr->user_scale;
+ mpr->scale_final = mpr->scale_basis * scale;
}
static void manipulator_update_prop_data(wmManipulator *mpr)