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>2019-02-18 07:43:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-18 07:43:55 +0300
commitcc10d8653575e0d299b330521c98027f1dc8da36 (patch)
treee48d07b85d634119b9b1c52fe8dc480949eba7ba /source/blender/editors/sculpt_paint
parent4719e7ec7a9c3095117bd2b0b08aeb1d72c62d98 (diff)
DNA: rename Object.size -> scale
Resolves a common cause of confusion.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 725179869f6..d3506b44770 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -4412,12 +4412,12 @@ static void sculpt_update_cache_invariants(
else {
max_scale = 0.0f;
for (i = 0; i < 3; i ++) {
- max_scale = max_ff(max_scale, fabsf(ob->size[i]));
+ max_scale = max_ff(max_scale, fabsf(ob->scale[i]));
}
}
- cache->scale[0] = max_scale / ob->size[0];
- cache->scale[1] = max_scale / ob->size[1];
- cache->scale[2] = max_scale / ob->size[2];
+ cache->scale[0] = max_scale / ob->scale[0];
+ cache->scale[1] = max_scale / ob->scale[1];
+ cache->scale[2] = max_scale / ob->scale[2];
cache->plane_trim_squared = brush->plane_trim * brush->plane_trim;
@@ -5881,7 +5881,7 @@ void ED_object_sculptmode_enter_ex(
BKE_sculpt_mask_layers_ensure(ob, mmd);
}
- if (!(fabsf(ob->size[0] - ob->size[1]) < 1e-4f && fabsf(ob->size[1] - ob->size[2]) < 1e-4f)) {
+ if (!(fabsf(ob->scale[0] - ob->scale[1]) < 1e-4f && fabsf(ob->scale[1] - ob->scale[2]) < 1e-4f)) {
BKE_report(reports, RPT_WARNING,
"Object has non-uniform scale, sculpting may be unpredictable");
}