io_scene_3ds: Moved specular color texture to specular tint #104918

Merged
Sebastian Sille merged 89 commits from :main into main 2023-09-27 00:42:09 +02:00
Showing only changes of commit 4b5cf79d3c - Show all commits

View File

@ -1632,17 +1632,10 @@ def load_3ds(filepath, context, CONSTRAIN=10.0, UNITS=False, IMAGE_SEARCH=True,
# Select all new objects
for ob in imported_objects:
if ob.type == 'LIGHT' and ob.data.type == 'SPOT':
square = math.sqrt(pow(1.0,2) + pow(1.0,2))
aspect = ob.empty_display_size
fac = 1.0
ratio = (fac / aspect)
align = fac - (ratio - aspect if ratio > fac else aspect - ratio)
shift = align + (align / 2.0)
if aspect > 1.0:
ob.scale.x = fac + align
ob.scale.y = fac - align
elif aspect < 1.0:
ob.scale.x = fac - align
ob.scale.y = fac + align
ob.scale.x = (aspect * square / (math.sqrt(pow(aspect,2) + 1.0)))
ob.scale.y = (square / (math.sqrt(pow(aspect,2) + 1.0)))
ob.select_set(True)
if not APPLY_MATRIX: # Reset transform
bpy.ops.object.rotation_clear()