Fix T63495: Add torus changes size each time when unit scale != 1.0
This matches behavior in WM_operator_view3d_unit_defaults.
This commit is contained in:
parent
d3bcbe10c2
commit
0523994687
Notes:
blender-bot
2023-02-14 11:08:33 +01:00
Referenced by issue #63495, Torus incrementally changes size when unit is set to any value other than one.
|
@ -215,12 +215,13 @@ def object_add_grid_scale_apply_operator(operator, context):
|
|||
"""
|
||||
Scale an operators distance values by the grid size.
|
||||
"""
|
||||
# This is a Python version of the C function `WM_operator_view3d_unit_defaults`.
|
||||
grid_scale = object_add_grid_scale(context)
|
||||
|
||||
properties = operator.properties
|
||||
properties_def = properties.bl_rna.properties
|
||||
for prop_id in properties_def.keys():
|
||||
if not properties.is_property_set(prop_id):
|
||||
if not properties.is_property_set(prop_id, ghost=False):
|
||||
prop_def = properties_def[prop_id]
|
||||
if prop_def.unit == 'LENGTH' and prop_def.subtype == 'DISTANCE':
|
||||
setattr(operator, prop_id,
|
||||
|
|
Loading…
Reference in New Issue