Skip to content

Commit 186a8fc

Browse files
authored
Fix API change of newer blender
1 parent d54aa8b commit 186a8fc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mGPT/render/blender/scene.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ def setup_renderer(denoising=True, oldrender=True, accelerator="gpu", device=[0]
2323
if denoising:
2424
bpy.context.scene.cycles.use_denoising = True
2525

26-
bpy.context.scene.render.tile_x = 256
27-
bpy.context.scene.render.tile_y = 256
26+
try:
27+
bpy.context.scene.render.tile_x = 256
28+
bpy.context.scene.render.tile_y = 256
29+
except AttributeError as e:
30+
print(e)
31+
bpy.context.scene.cycles.tile_size = 256
2832
bpy.context.scene.cycles.samples = 64
2933
# bpy.context.scene.cycles.denoiser = 'OPTIX'
3034

0 commit comments

Comments
 (0)