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:
authorHans Goudey <h.goudey@me.com>2020-09-09 16:41:15 +0300
committerHans Goudey <h.goudey@me.com>2020-09-09 16:41:15 +0300
commit842f52d418aaccae45c8e400eb0a8bddef0dbb51 (patch)
tree800dc6f6db8b2dbf4d2c4c78713e79bdce6d025c /source/blender/editors/space_view3d/view3d_draw.c
parent6dc7266cf1f4ee4e6e6eaa7e4949fcff11372479 (diff)
Cleanup: Rename public "bUnit" functions
This commit renames the functions in "BKE_unit.h` to be consistent with the naming in the rest of blenkernel. bUnit_AsString -> BKE_unit_value_as_string_adaptive bUnit_AsString2 -> BKE_unit_value_as_string bUnit_ReplaceString -> BKE_unit_replace_string bUnit_ApplyPreferredUnit -> BKE_unit_apply_preferred_unit bUnit_ToUnitAltName -> BKE_unit_name_to_alt bUnit_ClosestScalar -> BKE_unit_closest_scalar bUnit_BaseScalar -> BKE_unit_base_scalar bUnit_IsValid -> BKE_unit_is_valid bUnit_GetSystem -> BKE_unit_system_get bUnit_GetBaseUnit -> BKE_unit_base_get bUnit_GetBaseUnitOfType -> BKE_unit_base_of_type_get bUnit_GetName -> BKE_unit_name_get bUnit_GetNameDisplay -> BKE_unit_display_name_get bUnit_GetIdentifier -> BKE_unit_identifier_get bUnit_GetScaler -> BKE_unit_scalar_get bUnit_IsSuppressed -> BKE_unit_is_suppressed Differential Revision: https://developer.blender.org/D8828
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 6cd940244b4..da44815b31a 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -879,14 +879,14 @@ float ED_scene_grid_scale(const Scene *scene, const char **r_grid_unit)
const void *usys;
int len;
- bUnit_GetSystem(scene->unit.system, B_UNIT_LENGTH, &usys, &len);
+ BKE_unit_system_get(scene->unit.system, B_UNIT_LENGTH, &usys, &len);
if (usys) {
- int i = bUnit_GetBaseUnit(usys);
+ int i = BKE_unit_base_get(usys);
if (r_grid_unit) {
- *r_grid_unit = bUnit_GetNameDisplay(usys, i);
+ *r_grid_unit = BKE_unit_display_name_get(usys, i);
}
- return (float)bUnit_GetScaler(usys, i) / scene->unit.scale_length;
+ return (float)BKE_unit_scalar_get(usys, i) / scene->unit.scale_length;
}
}
@@ -906,20 +906,20 @@ void ED_view3d_grid_steps(const Scene *scene,
{
const void *usys;
int i, len;
- bUnit_GetSystem(scene->unit.system, B_UNIT_LENGTH, &usys, &len);
+ BKE_unit_system_get(scene->unit.system, B_UNIT_LENGTH, &usys, &len);
float grid_scale = v3d->grid;
BLI_assert(STEPS_LEN >= len);
if (usys) {
if (rv3d->view == RV3D_VIEW_USER) {
/* Skip steps */
- len = bUnit_GetBaseUnit(usys) + 1;
+ len = BKE_unit_base_get(usys) + 1;
}
grid_scale /= scene->unit.scale_length;
for (i = 0; i < len; i++) {
- r_grid_steps[i] = (float)bUnit_GetScaler(usys, len - 1 - i) * grid_scale;
+ r_grid_steps[i] = (float)BKE_unit_scalar_get(usys, len - 1 - i) * grid_scale;
}
for (; i < STEPS_LEN; i++) {
/* Fill last slots */
@@ -971,10 +971,10 @@ float ED_view3d_grid_view_scale(Scene *scene,
if (r_grid_unit) {
const void *usys;
int len;
- bUnit_GetSystem(scene->unit.system, B_UNIT_LENGTH, &usys, &len);
+ BKE_unit_system_get(scene->unit.system, B_UNIT_LENGTH, &usys, &len);
if (usys) {
- *r_grid_unit = bUnit_GetNameDisplay(usys, len - i - 1);
+ *r_grid_unit = BKE_unit_display_name_get(usys, len - i - 1);
}
}
}