diff options
author | Vilém Duha <vilda.novak@gmail.com> | 2019-08-11 00:45:24 +0300 |
---|---|---|
committer | Vilém Duha <vilda.novak@gmail.com> | 2019-08-12 16:58:36 +0300 |
commit | 9bc02e82d2b268dfe3d50acb9b92385853bf7929 (patch) | |
tree | 0739932f24fd1a24113ed40f37ef06791095847b | |
parent | 30660b7d903a3fcd326c7238dced696e5029e500 (diff) |
BlenderKit: model thumbnail resolution options
-rw-r--r-- | blenderkit/__init__.py | 7 | ||||
-rw-r--r-- | blenderkit/autothumb.py | 1 | ||||
-rw-r--r-- | blenderkit/autothumb_model_bg.py | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/blenderkit/__init__.py b/blenderkit/__init__.py index 6a2a68b3..c6b25312 100644 --- a/blenderkit/__init__.py +++ b/blenderkit/__init__.py @@ -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) diff --git a/blenderkit/autothumb.py b/blenderkit/autothumb.py index c38be3d1..b5f659aa 100644 --- a/blenderkit/autothumb.py +++ b/blenderkit/autothumb.py @@ -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) diff --git a/blenderkit/autothumb_model_bg.py b/blenderkit/autothumb_model_bg.py index 5df0738b..9173391e 100644 --- a/blenderkit/autothumb_model_bg.py +++ b/blenderkit/autothumb_model_bg.py @@ -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' |