From e80d72279eccffa081da9de1b072f988a822325b Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Thu, 18 Nov 2010 19:14:50 +0100 Subject: [PATCH] MtsBlend: hide preview buttons (depends on an as-of-yet unapplied patch to blender) --- tools/blender/mitsuba/ui/materials/__init__.py | 2 +- tools/blender/mitsuba/ui/render_panels.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/blender/mitsuba/ui/materials/__init__.py b/tools/blender/mitsuba/ui/materials/__init__.py index 35604a17..f1565d64 100644 --- a/tools/blender/mitsuba/ui/materials/__init__.py +++ b/tools/blender/mitsuba/ui/materials/__init__.py @@ -111,7 +111,7 @@ class MATERIAL_PT_preview_mts(MaterialButtonsPanel, bpy.types.Panel): def draw(self, context): if not hasattr(context, 'material'): return - self.layout.template_preview(context.material) + self.layout.template_preview(context.material, show_buttons=False) engine = context.scene.mitsuba_engine row = self.layout.row(True) row.prop(engine, "preview_depth") diff --git a/tools/blender/mitsuba/ui/render_panels.py b/tools/blender/mitsuba/ui/render_panels.py index 0d2b2fc4..9ac5c5fa 100644 --- a/tools/blender/mitsuba/ui/render_panels.py +++ b/tools/blender/mitsuba/ui/render_panels.py @@ -65,9 +65,8 @@ class engine(render_described_context, bpy.types.Panel): actualChange = cached_binary_path != None cached_binary_path = binary_path context.scene.mitsuba_engine.binary_path = binary_path - if actualChange: - print('Updating binary_path to "%s"\n' % binary_path) - efutil.write_config_value('mitsuba', 'defaults', 'binary_path', binary_path) + print('Updating binary_path to "%s"\n' % binary_path) + efutil.write_config_value('mitsuba', 'defaults', 'binary_path', binary_path) super().draw(context) class integrator(render_described_context, bpy.types.Panel):