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/makesrna/intern
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/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index ebec5e3bff8..bf97e4fcc0f 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2514,7 +2514,7 @@ static const EnumPropertyItem *rna_UnitSettings_itemf_wrapper(const int system,
{
const void *usys;
int len;
- bUnit_GetSystem(system, type, &usys, &len);
+ BKE_unit_system_get(system, type, &usys, &len);
EnumPropertyItem *items = NULL;
int totitem = 0;
@@ -2526,10 +2526,10 @@ static const EnumPropertyItem *rna_UnitSettings_itemf_wrapper(const int system,
RNA_enum_item_add(&items, &totitem, &adaptive);
for (int i = 0; i < len; i++) {
- if (!bUnit_IsSuppressed(usys, i)) {
+ if (!BKE_unit_is_suppressed(usys, i)) {
EnumPropertyItem tmp = {0};
- tmp.identifier = bUnit_GetIdentifier(usys, i);
- tmp.name = bUnit_GetNameDisplay(usys, i);
+ tmp.identifier = BKE_unit_identifier_get(usys, i);
+ tmp.name = BKE_unit_display_name_get(usys, i);
tmp.value = i;
RNA_enum_item_add(&items, &totitem, &tmp);
}
@@ -2587,8 +2587,8 @@ static void rna_UnitSettings_system_update(Main *UNUSED(bmain),
unit->mass_unit = USER_UNIT_ADAPTIVE;
}
else {
- unit->length_unit = bUnit_GetBaseUnitOfType(unit->system, B_UNIT_LENGTH);
- unit->mass_unit = bUnit_GetBaseUnitOfType(unit->system, B_UNIT_MASS);
+ unit->length_unit = BKE_unit_base_of_type_get(unit->system, B_UNIT_LENGTH);
+ unit->mass_unit = BKE_unit_base_of_type_get(unit->system, B_UNIT_MASS);
}
}