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_lamp_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_lamp_maker.py')
-rw-r--r--archimesh/achm_lamp_maker.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/archimesh/achm_lamp_maker.py b/archimesh/achm_lamp_maker.py
index e8918a4a..724f21a4 100644
--- a/archimesh/achm_lamp_maker.py
+++ b/archimesh/achm_lamp_maker.py
@@ -354,6 +354,8 @@ class AchmLamp(Operator):
row.prop(self, 'tr03')
box = layout.box()
+ if not context.scene.render.engine == 'CYCLES':
+ box.enabled = False
box.prop(self, 'crt_mat')
if self.crt_mat:
row = box.row()
@@ -484,7 +486,7 @@ def generate_lamp(self):
mybulb.name = "Lamp_Bulb"
mybulb.parent = myholder
mybulb.location = (0, 0, radbulb + self.holder + 0.04)
- if self.crt_mat:
+ if self.crt_mat and bpy.context.scene.render.engine == 'CYCLES':
mat = create_emission_material(mybulb.name, True, 0.8, 0.8, 0.8, self.energy)
set_material(mybulb, mat)