diff options
author | Thomas Dinges <blender@dingto.org> | 2011-11-05 14:34:29 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2011-11-05 14:34:29 +0400 |
commit | 010cd66747b83cf34eeb87328fded1badc3e1a4a (patch) | |
tree | ffd6d44fe77535b6886eba2f8ec26f00212405dc | |
parent | 133a7df75e2bdd7efe82c7d50389cf198433684d (diff) |
VIEW3D_PT_tools_meshedit_options panel:
* Removed ob check and add a proper poll function.
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index e6869a0d204..332577a7902 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -172,28 +172,31 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel): class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel): bl_context = "mesh_edit" bl_label = "Mesh Options" + + @classmethod + def poll(cls, context): + return context.active_object def draw(self, context): layout = self.layout ob = context.active_object - if ob: - tool_settings = context.tool_settings - mesh = ob.data + tool_settings = context.tool_settings + mesh = ob.data - col = layout.column(align=True) - col.active = tool_settings.proportional_edit == 'DISABLED' - col.prop(mesh, "use_mirror_x") + col = layout.column(align=True) + col.active = tool_settings.proportional_edit == 'DISABLED' + col.prop(mesh, "use_mirror_x") - row = col.row() - row.active = ob.data.use_mirror_x - row.prop(mesh, "use_mirror_topology") + row = col.row() + row.active = ob.data.use_mirror_x + row.prop(mesh, "use_mirror_topology") - col = layout.column(align=True) - col.label("Edge Select Mode:") - col.prop(tool_settings, "edge_path_mode", text="") - col.prop(tool_settings, "edge_path_live_unwrap") + col = layout.column(align=True) + col.label("Edge Select Mode:") + col.prop(tool_settings, "edge_path_mode", text="") + col.prop(tool_settings, "edge_path_live_unwrap") # ********** default tools for editmode_curve **************** |