MCPcopy
hub / github.com/TencentARC/Pixal3D / init_render

Function init_render

data_toolkit/blender_script/render_cond.py:38–58  ·  view source on GitHub ↗
(engine='CYCLES', resolution=512)

Source from the content-addressed store, hash-verified

36
37
38def init_render(engine='CYCLES', resolution=512):
39 bpy.context.scene.render.engine = engine
40 bpy.context.scene.render.resolution_x = resolution
41 bpy.context.scene.render.resolution_y = resolution
42 bpy.context.scene.render.resolution_percentage = 100
43 bpy.context.scene.render.image_settings.file_format = 'PNG'
44 bpy.context.scene.render.image_settings.color_mode = 'RGBA'
45 bpy.context.scene.render.film_transparent = True
46
47 bpy.context.scene.cycles.device = 'GPU'
48 bpy.context.scene.cycles.samples = 32
49 bpy.context.scene.cycles.filter_type = 'BOX'
50 bpy.context.scene.cycles.filter_width = 1
51 bpy.context.scene.cycles.diffuse_bounces = 1
52 bpy.context.scene.cycles.glossy_bounces = 1
53 bpy.context.scene.cycles.transparent_max_bounces = 3
54 bpy.context.scene.cycles.transmission_bounces = 3
55 bpy.context.scene.cycles.use_denoising = True
56
57 bpy.context.preferences.addons['cycles'].preferences.get_devices()
58 bpy.context.preferences.addons['cycles'].preferences.compute_device_type = 'CUDA'
59
60
61def init_scene() -> None:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected