diff options
author | Vilém Duha <vilda.novak@gmail.com> | 2020-12-30 14:04:27 +0300 |
---|---|---|
committer | Vilém Duha <vilda.novak@gmail.com> | 2020-12-30 14:04:27 +0300 |
commit | eb514f2106defdccb0f6d4ce8ae8a254b23b844c (patch) | |
tree | e924ff1ebc566333508e19f8caf29be0f450b767 /blenderkit | |
parent | f56c051d7475d1c5592e5e1f54b43aa8c0d44f53 (diff) |
BlenderKit: fix thumbnailer
The bakground was too glossy and could create unnecessary gradients in the background
Fix hiding of the modifier for high particle counts with particle_plants
Diffstat (limited to 'blenderkit')
-rw-r--r-- | blenderkit/append_link.py | 11 | ||||
-rw-r--r-- | blenderkit/blendfiles/thumbnailer.blend | bin | 295494 -> 296184 bytes |
2 files changed, 7 insertions, 4 deletions
diff --git a/blenderkit/append_link.py b/blenderkit/append_link.py index d0bc59b0..4044a30d 100644 --- a/blenderkit/append_link.py +++ b/blenderkit/append_link.py @@ -273,12 +273,15 @@ def append_particle_system(file_name, obnames=[], location=(0, 0, 0), link=False target_object.display_type = 'BOUNDS' # 2nd level of optimization - reduce percentage of displayed particles. ps.display_percentage = min(ps.display_percentage, max(1, int(100 * display_threshold / total_count))) - # 3rd level - hide particle system from viewport. - if total_count > total_max_threshold: - ps.show_viewport = False - #only now set the particle system count, if set sooner blender would probably crash quite often. + #here we can also tune down number of children displayed. + #set the count ps.count = count + #add the modifier bpy.ops.object.particle_system_add() + # 3rd level - hide particle system from viewport - is done on the modifier.. + if total_count > total_max_threshold: + target_object.modifiers[-1].show_viewport = False + target_object.particle_systems[-1].settings = ps target_object.select_set(False) diff --git a/blenderkit/blendfiles/thumbnailer.blend b/blenderkit/blendfiles/thumbnailer.blend Binary files differindex 88cf8655..f588fda9 100644 --- a/blenderkit/blendfiles/thumbnailer.blend +++ b/blenderkit/blendfiles/thumbnailer.blend |