diff options
author | Antonioya <blendergit@gmail.com> | 2016-08-09 19:01:14 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2016-08-09 19:01:14 +0300 |
commit | f3a93f08e81a185e058f2acb0ec4c7e1cc99f8d5 (patch) | |
tree | 6dd59ef3ce1f128c7c886f67ff518e121f1b05f4 /archimesh/achm_window_panel.py | |
parent | ce2ced159895f41a7dbfac38f61e6d3421dd7346 (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_window_panel.py')
-rw-r--r-- | archimesh/achm_window_panel.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/archimesh/achm_window_panel.py b/archimesh/achm_window_panel.py index 27f0dd6f..ce7cb34e 100644 --- a/archimesh/achm_window_panel.py +++ b/archimesh/achm_window_panel.py @@ -397,15 +397,16 @@ def do_ctrl_box(myobject): myctrl.draw_type = 'WIRE' myctrl.hide = False myctrl.hide_render = True - myctrl.cycles_visibility.camera = False - myctrl.cycles_visibility.diffuse = False - myctrl.cycles_visibility.glossy = False - myctrl.cycles_visibility.transmission = False - myctrl.cycles_visibility.scatter = False - myctrl.cycles_visibility.shadow = False - - mat = create_transparent_material("hidden_material", False) - set_material(myctrl, mat) + if bpy.context.scene.render.engine == 'CYCLES': + myctrl.cycles_visibility.camera = False + myctrl.cycles_visibility.diffuse = False + myctrl.cycles_visibility.glossy = False + myctrl.cycles_visibility.transmission = False + myctrl.cycles_visibility.scatter = False + myctrl.cycles_visibility.shadow = False + + mat = create_transparent_material("hidden_material", False) + set_material(myctrl, mat) # ------------------------------------------------------------------------------ |