BlenderKit: model thumbnail resolution options
This commit is contained in:
parent
30660b7d90
commit
9bc02e82d2
|
@ -820,6 +820,13 @@ class BlenderKitModelUploadProps(PropertyGroup, BlenderKitCommonUploadProps):
|
|||
description='typical placing of the interior. Leave on ground for most objects that respect gravity :)',
|
||||
)
|
||||
|
||||
thumbnail_resolution: EnumProperty(
|
||||
name="Resolution",
|
||||
items=thumbnail_resolutions,
|
||||
description="Thumbnail resolution.",
|
||||
default="512",
|
||||
)
|
||||
|
||||
thumbnail_samples: IntProperty(name="Cycles Samples",
|
||||
description="cycles samples setting", default=200,
|
||||
min=5, max=5000)
|
||||
|
|
|
@ -142,6 +142,7 @@ def start_thumbnailer(self, context):
|
|||
"thumbnail_angle": bkit.thumbnail_angle,
|
||||
"thumbnail_snap_to": bkit.thumbnail_snap_to,
|
||||
"thumbnail_background_lightness": bkit.thumbnail_background_lightness,
|
||||
"thumbnail_resolution": bkit.thumbnail_resolution,
|
||||
"thumbnail_samples": bkit.thumbnail_samples,
|
||||
"thumbnail_denoising": bkit.thumbnail_denoising,
|
||||
}, s)
|
||||
|
|
|
@ -153,6 +153,9 @@ if __name__ == "__main__":
|
|||
img.filepath = ipath
|
||||
img.reload()
|
||||
|
||||
bpy.context.scene.render.resolution_x = int(data['thumbnail_resolution'])
|
||||
bpy.context.scene.render.resolution_y = int(data['thumbnail_resolution'])
|
||||
|
||||
bg_blender.progress('rendering thumbnail')
|
||||
render_thumbnails()
|
||||
fpath = BLENDERKIT_THUMBNAIL_PATH + '0001.jpg'
|
||||
|
|
Loading…
Reference in New Issue