Fix: GPv3: Thickness adjustment conversion doesn't use object scale
To get the same visual result compared to GPv2, the thickness adjustment value needed to be divided by the object scale.
This commit is contained in:
@@ -1308,7 +1308,9 @@ static void layer_adjustments_to_modifiers(ConversionData &conversion_data,
|
||||
/* Convert the "pixel" offset value into a radius value.
|
||||
* GPv2 used a conversion of 1 "px" = 0.001. */
|
||||
/* NOTE: this offset may be negative. */
|
||||
const float radius_offset = float(thickness_px) * LEGACY_RADIUS_CONVERSION_FACTOR;
|
||||
const float uniform_object_scale = math::average(float3(dst_object.scale));
|
||||
const float radius_offset = math::safe_divide(
|
||||
float(thickness_px) * LEGACY_RADIUS_CONVERSION_FACTOR, uniform_object_scale);
|
||||
|
||||
const auto offset_radius_ntree_ensure = [&](Library *owner_library) {
|
||||
if (bNodeTree **ntree = conversion_data.offset_radius_ntree_by_library.lookup_ptr(
|
||||
|
||||
Reference in New Issue
Block a user