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:
authorAntonioya <blendergit@gmail.com>2016-08-09 19:01:14 +0300
committerAntonioya <blendergit@gmail.com>2016-08-09 19:01:14 +0300
commitf3a93f08e81a185e058f2acb0ec4c7e1cc99f8d5 (patch)
tree6dd59ef3ce1f128c7c886f67ff518e121f1b05f4 /archimesh/achm_shelves_maker.py
parentce2ced159895f41a7dbfac38f61e6d3421dd7346 (diff)
Archimesh: Fix error when Cycles is not enabled
Now if cycles render is not enabled or not selected, the materials are not created.
Diffstat (limited to 'archimesh/achm_shelves_maker.py')
-rw-r--r--archimesh/achm_shelves_maker.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/archimesh/achm_shelves_maker.py b/archimesh/achm_shelves_maker.py
index 0bc0b299..6cbab554 100644
--- a/archimesh/achm_shelves_maker.py
+++ b/archimesh/achm_shelves_maker.py
@@ -174,6 +174,8 @@ class AchmShelves(Operator):
add_shelves(self, box, idx + 1, self.shelves[idx])
box = layout.box()
+ if not context.scene.render.engine == 'CYCLES':
+ box.enabled = False
box.prop(self, 'crt_mat')
else:
row = layout.row()
@@ -316,7 +318,7 @@ def generate_shelves(self):
bpy.context.scene.objects.active = boxes[0]
# Create materials
- if self.crt_mat:
+ if self.crt_mat and bpy.context.scene.render.engine == 'CYCLES':
mat = create_diffuse_material("Shelves_material", False, 0.8, 0.8, 0.8)
for box in boxes:
set_material(box, mat)