Skip to content

Commit

Permalink
archipack 2.8 fix issue #T58698 (event TIMER_REPORT)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-leger committed Dec 4, 2018
1 parent a77bee4 commit dbb224a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions archipack/archipack_thumbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion archipack/archipack_wall2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2100,7 +2100,7 @@ def ensure_ccw(self):
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):
Expand Down

0 comments on commit dbb224a

Please sign in to comment.