Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Leger <stephen@3dservices.ch>2017-09-01 14:31:09 +0300
committerStephen Leger <stephen@3dservices.ch>2017-09-01 14:31:22 +0300
commitf4d6aad738ae8b368841aee77e0008480fe42f25 (patch)
tree553c1e311c6691d1f7ea2cdd9d48852910410e95 /archipack/archipack_thumbs.py
parent184cd288d914a919f5d235fb66b00d2a6bf2aed8 (diff)
archipack: background renderer use factory-startup to prevent other addon issues
Diffstat (limited to 'archipack/archipack_thumbs.py')
-rw-r--r--archipack/archipack_thumbs.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/archipack/archipack_thumbs.py b/archipack/archipack_thumbs.py
index c9ab7ad2..8f652ab2 100644
--- a/archipack/archipack_thumbs.py
+++ b/archipack/archipack_thumbs.py
@@ -42,7 +42,10 @@ def generateThumb(context, cls, preset):
render = context.scene.cycles
render.progressive = 'PATH'
render.samples = 24
- render.use_square_samples = True
+ try:
+ render.use_square_samples = True
+ except:
+ pass
render.preview_samples = 24
render.aa_samples = 24
render.transparent_max_bounces = 8
@@ -179,5 +182,13 @@ if __name__ == "__main__":
cls = arg[4:]
if arg.startswith("preset:"):
preset = arg[7:]
-
+ if arg.startswith("matlib:"):
+ matlib = arg[7:]
+ if arg.startswith("addon:"):
+ module = arg[6:]
+ try:
+ bpy.ops.wm.addon_enable(module=module)
+ bpy.context.user_preferences.addons[module].preferences.matlib_path = matlib
+ except:
+ raise RuntimeError("module name not found")
generateThumb(bpy.context, cls, preset)