Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/ui/properties_data_metaball.py')
-rw-r--r--release/scripts/ui/properties_data_metaball.py43
1 files changed, 12 insertions, 31 deletions
diff --git a/release/scripts/ui/properties_data_metaball.py b/release/scripts/ui/properties_data_metaball.py
index 215ca207bc9..dbc0f642c7c 100644
--- a/release/scripts/ui/properties_data_metaball.py
+++ b/release/scripts/ui/properties_data_metaball.py
@@ -20,8 +20,6 @@
import bpy
from rna_prop_ui import PropertyPanel
-narrowui = bpy.context.user_preferences.view.properties_width_check
-
class DataButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -43,21 +41,14 @@ class DATA_PT_context_metaball(DataButtonsPanel, bpy.types.Panel):
ob = context.object
mball = context.meta_ball
space = context.space_data
- wide_ui = context.region.width > narrowui
-
- if wide_ui:
- split = layout.split(percentage=0.65)
- if ob:
- split.template_ID(ob, "data")
- split.separator()
- elif mball:
- split.template_ID(space, "pin_id")
- split.separator()
- else:
- if ob:
- layout.template_ID(ob, "data")
- elif mball:
- layout.template_ID(space, "pin_id")
+
+ split = layout.split(percentage=0.65)
+ if ob:
+ split.template_ID(ob, "data")
+ split.separator()
+ elif mball:
+ split.template_ID(space, "pin_id")
+ split.separator()
class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
@@ -71,7 +62,6 @@ class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
layout = self.layout
mball = context.meta_ball
- wide_ui = context.region.width > narrowui
split = layout.split()
@@ -81,16 +71,12 @@ class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
sub.prop(mball, "wire_size", text="View")
sub.prop(mball, "render_size", text="Render")
- if wide_ui:
- col = split.column()
+ col = split.column()
col.label(text="Settings:")
col.prop(mball, "threshold", text="Threshold")
layout.label(text="Update:")
- if wide_ui:
- layout.prop(mball, "flag", expand=True)
- else:
- layout.prop(mball, "flag", text="")
+ layout.prop(mball, "flag", expand=True)
class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
@@ -104,12 +90,8 @@ class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
layout = self.layout
metaelem = context.meta_ball.active_element
- wide_ui = context.region.width > narrowui
- if wide_ui:
- layout.prop(metaelem, "type")
- else:
- layout.prop(metaelem, "type", text="")
+ layout.prop(metaelem, "type")
split = layout.split()
@@ -119,8 +101,7 @@ class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
col.prop(metaelem, "negative", text="Negative")
col.prop(metaelem, "hide", text="Hide")
- if wide_ui:
- col = split.column(align=True)
+ col = split.column(align=True)
if metaelem.type in ('CUBE', 'ELLIPSOID'):
col.label(text="Size:")