[Bf-extensions-cvs] [a03651b] master: Made Amaranth addon working if Cycles engine is disabled
Sergey Sharybin
noreply at git.blender.org
Mon Nov 25 08:43:10 CET 2013
Commit: a03651b0f409d11b1656151915111cbbd444cc0a
Author: Sergey Sharybin
Date: Mon Nov 25 13:41:54 2013 +0600
http://developer.blender.org/rBACa03651b0f409d11b1656151915111cbbd444cc0a
Made Amaranth addon working if Cycles engine is disabled
===================================================================
M scene_amaranth_toolset.py
===================================================================
diff --git a/scene_amaranth_toolset.py b/scene_amaranth_toolset.py
index ace37fb..b590f99 100755
--- a/scene_amaranth_toolset.py
+++ b/scene_amaranth_toolset.py
@@ -1085,6 +1085,8 @@ kmi_defs = (
)
def register():
+ import sys
+ have_cycles = True if "_cycles" in sys.modules else False
bpy.utils.register_class(AmaranthToolsetPreferences)
@@ -1109,13 +1111,15 @@ def register():
bpy.types.NODE_HT_header.append(node_templates_pulldown)
bpy.types.NODE_HT_header.append(node_stats)
- bpy.types.CyclesMaterial_PT_settings.append(material_cycles_settings_extra)
- bpy.types.CyclesRender_PT_sampling.append(render_cycles_scene_samples)
+ if have_cycles:
+ bpy.types.CyclesMaterial_PT_settings.append(material_cycles_settings_extra)
+ bpy.types.CyclesRender_PT_sampling.append(render_cycles_scene_samples)
bpy.types.FILEBROWSER_HT_header.append(button_directory_current_blend)
bpy.types.SCENE_PT_simplify.append(unsimplify_ui)
- bpy.types.CyclesScene_PT_simplify.append(unsimplify_ui)
+ if have_cycles:
+ bpy.types.CyclesScene_PT_simplify.append(unsimplify_ui)
bpy.types.PARTICLE_PT_render.prepend(particles_material_info)
More information about the Bf-extensions-cvs
mailing list