diff --git a/archipack/archipack_thumbs.py b/archipack/archipack_thumbs.py index c43c9a75a8b35def88d79c640a34ba704f25fdf5..4ae4d02029e8cc9bf014510707b045117972f3b3 100644 --- a/archipack/archipack_thumbs.py +++ b/archipack/archipack_thumbs.py @@ -42,7 +42,7 @@ def create_lamp(context, loc): lamp = context.active_object lamp.data.use_nodes = True tree = lamp.data.node_tree - return tree, tree.nodes + return tree, tree.nodes, lamp.data def create_camera(context, loc, rot): @@ -119,7 +119,10 @@ def generateThumb(context, cls, preset, engine): elif engine == 'BLENDER_EEVEE': eevee = context.scene.eevee - + eevee.use_gtao = True + eevee.use_ssr = True + eevee.use_soft_shadows = True + eevee.taa_render_samples = 64 else: raise RuntimeError("Unsupported render engine %s" % engine) @@ -150,6 +153,7 @@ def generateThumb(context, cls, preset, engine): o.select_set(state=True) bpy.ops.view3d.camera_to_view_selected() + cam.data.lens = 45 log("Prepare scene") # add plane @@ -164,17 +168,18 @@ def generateThumb(context, cls, preset, engine): apply_simple_material(p, "Plane", (1, 1, 1, 1)) # add 3 lights - tree, nodes = create_lamp(context, (3.69736, -7, 6.0)) + tree, nodes, lamp = create_lamp(context, (3.69736, -7, 6.0)) + lamp.energy = 50 emit = nodes["Emission"] emit.inputs[1].default_value = 2000.0 - tree, nodes = create_lamp(context, (9.414563179016113, 5.446230888366699, 5.903861999511719)) + tree, nodes, lamp = create_lamp(context, (9.414563179016113, 5.446230888366699, 5.903861999511719)) emit = nodes["Emission"] falloff = nodes.new(type="ShaderNodeLightFalloff") falloff.inputs[0].default_value = 5 tree.links.new(falloff.outputs[2], emit.inputs[1]) - tree, nodes = create_lamp(context, (-7.847615718841553, 1.03135085105896, 5.903861999511719)) + tree, nodes, lamp = create_lamp(context, (-7.847615718841553, 1.03135085105896, 5.903861999511719)) emit = nodes["Emission"] falloff = nodes.new(type="ShaderNodeLightFalloff") falloff.inputs[0].default_value = 5 diff --git a/archipack/archipack_wall2.py b/archipack/archipack_wall2.py index 1916f32daeb99a67adf5e640e74930c852b06398..750cd31385d2e5dd39da1a35126acf2f313f5e21 100644 --- a/archipack/archipack_wall2.py +++ b/archipack/archipack_wall2.py @@ -2100,7 +2100,7 @@ class ARCHIPACK_OT_wall2_draw(ArchipackDrawTool, Operator): def modal(self, context, event): context.area.tag_redraw() - if event.type in {'NONE', 'TIMER', 'EVT_TWEAK_L', 'WINDOW_DEACTIVATE'}: + if event.type in {'NONE', 'TIMER', 'TIMER_REPORT', 'EVT_TWEAK_L', 'WINDOW_DEACTIVATE'}: return {'PASS_THROUGH'} if self.keymap.check(event, self.keymap.delete):