diff options
author | Robert Guetzkow <rjg> | 2020-12-09 14:19:13 +0300 |
---|---|---|
committer | Robert Guetzkow <gitcommit@outlook.de> | 2020-12-09 14:20:06 +0300 |
commit | ff83176c7f46ec16666bec79bbda5d0147b5ed7c (patch) | |
tree | 7452ae3fbcdee1a8db9a2a75f10c1449771033c5 /io_scene_obj | |
parent | 1191a172ac389e3d068a8ef7d16f36457e67e3bc (diff) |
Fix T84328: Correct errors caused by renaming
In rBA6aa8e130eff59059886e203ff95221609f63b222 all occurrences
of "lamp" where replaced with "light" which also accidentally
renamed "clamp" to "clight". In case of the x3d importer and
object carver add-on this broke some functionality. This
commit fixes the names to match the use the correct properties
of the Python API and use semantically correct names for other
add-on where the renaming didn't cause functional changes.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D9782
Diffstat (limited to 'io_scene_obj')
-rw-r--r-- | io_scene_obj/__init__.py | 4 | ||||
-rw-r--r-- | io_scene_obj/import_obj.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py index e9fc8259..e20d50ea 100644 --- a/io_scene_obj/__init__.py +++ b/io_scene_obj/__init__.py @@ -110,7 +110,7 @@ class ImportOBJ(bpy.types.Operator, ImportHelper): ), ) - global_clight_size: FloatProperty( + global_clamp_size: FloatProperty( name="Clamp Size", description="Clamp bounds under this value (zero to disable)", min=0.0, max=1000.0, @@ -196,7 +196,7 @@ class OBJ_PT_import_transform(bpy.types.Panel): sfile = context.space_data operator = sfile.active_operator - layout.prop(operator, "global_clight_size") + layout.prop(operator, "global_clamp_size") layout.prop(operator, "axis_forward") layout.prop(operator, "axis_up") diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py index 85db6aec..a303eda5 100644 --- a/io_scene_obj/import_obj.py +++ b/io_scene_obj/import_obj.py @@ -905,7 +905,7 @@ def any_number_as_int(svalue): def load(context, filepath, *, - global_clight_size=0.0, + global_clamp_size=0.0, use_smooth_groups=True, use_edges=True, use_split_objects=True, @@ -1293,7 +1293,7 @@ def load(context, axis_min = [1000000000] * 3 axis_max = [-1000000000] * 3 - if global_clight_size: + if global_clamp_size: # Get all object bounds for ob in new_objects: for v in ob.bound_box: @@ -1307,7 +1307,7 @@ def load(context, max_axis = max(axis_max[0] - axis_min[0], axis_max[1] - axis_min[1], axis_max[2] - axis_min[2]) scale = 1.0 - while global_clight_size < max_axis * scale: + while global_clamp_size < max_axis * scale: scale = scale / 10.0 for obj in new_objects: |