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_lattice.py')
-rw-r--r--release/scripts/ui/properties_data_lattice.py35
1 files changed, 11 insertions, 24 deletions
diff --git a/release/scripts/ui/properties_data_lattice.py b/release/scripts/ui/properties_data_lattice.py
index 972dc18977a..a2dfeb191b8 100644
--- a/release/scripts/ui/properties_data_lattice.py
+++ b/release/scripts/ui/properties_data_lattice.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_lattice(DataButtonsPanel, bpy.types.Panel):
ob = context.object
lat = context.lattice
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 lat:
- split.template_ID(space, "pin_id")
- split.separator()
- else:
- if ob:
- layout.template_ID(ob, "data")
- elif lat:
- layout.template_ID(space, "pin_id")
+
+ split = layout.split(percentage=0.65)
+ if ob:
+ split.template_ID(ob, "data")
+ split.separator()
+ elif lat:
+ split.template_ID(space, "pin_id")
+ split.separator()
class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
@@ -71,27 +62,23 @@ class DATA_PT_lattice(DataButtonsPanel, bpy.types.Panel):
layout = self.layout
lat = context.lattice
- wide_ui = context.region.width > narrowui
split = layout.split()
col = split.column()
col.prop(lat, "points_u")
- if wide_ui:
- col = split.column()
+ col = split.column()
col.prop(lat, "interpolation_type_u", text="")
split = layout.split()
col = split.column()
col.prop(lat, "points_v")
- if wide_ui:
- col = split.column()
+ col = split.column()
col.prop(lat, "interpolation_type_v", text="")
split = layout.split()
col = split.column()
col.prop(lat, "points_w")
- if wide_ui:
- col = split.column()
+ col = split.column()
col.prop(lat, "interpolation_type_w", text="")
row = layout.row()