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:
authorCampbell Barton <ideasman42@gmail.com>2018-05-30 18:47:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-30 19:00:11 +0300
commit85ce4d957cee0de45b620d30af4061253ff8b18f (patch)
treec5b7144dcbfb26071c554a73e3aafaa1b69b8310 /release
parent9fabe3ef530189c23763681262e5e31b56620d08 (diff)
UI: use split property layout for some panels
Object, render, scene properties now use split-property layout, also cycles interface. Patch by @billreynish w/ minor edits.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py185
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py159
-rw-r--r--release/scripts/startup/bl_ui/properties_scene.py116
3 files changed, 227 insertions, 233 deletions
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index f0526fc0271..54b647f5b66 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -48,25 +48,40 @@ class OBJECT_PT_transform(ObjectButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
+ col = layout.column()
ob = context.object
- row = layout.row()
+ sub = col.row(align=True)
+ sub.prop(ob, "location")
+ sub.prop(ob, "lock_location", text="")
- row.column().prop(ob, "location")
if ob.rotation_mode == 'QUATERNION':
- row.column().prop(ob, "rotation_quaternion", text="Rotation")
+ sub = col.row(align=True)
+ sub.prop(ob, "rotation_quaternion", text="Rotation")
+ subsub = sub.column(align=True)
+ subsub.prop(ob, "lock_rotation_w", text="")
+ subsub.prop(ob, "lock_rotation", text="")
elif ob.rotation_mode == 'AXIS_ANGLE':
- #row.column().label(text="Rotation")
+ # row.column().label(text="Rotation")
#row.column().prop(pchan, "rotation_angle", text="Angle")
#row.column().prop(pchan, "rotation_axis", text="Axis")
- row.column().prop(ob, "rotation_axis_angle", text="Rotation")
+ sub = col.row(align=True)
+ sub.prop(ob, "rotation_axis_angle", text="Rotation")
+ subsub = sub.column(align=True)
+ subsub.prop(ob, "lock_rotation_w", text="")
+ subsub.prop(ob, "lock_rotation", text="")
else:
- row.column().prop(ob, "rotation_euler", text="Rotation")
+ sub = col.row(align=True)
+ sub.prop(ob, "rotation_euler", text="Rotation")
+ sub.prop(ob, "lock_rotation", text="")
- row.column().prop(ob, "scale")
+ sub = col.row(align=True)
+ sub.prop(ob, "scale")
+ sub.prop(ob, "lock_scale", text="")
- layout.prop(ob, "rotation_mode")
+ col.prop(ob, "rotation_mode")
class OBJECT_PT_delta_transform(ObjectButtonsPanel, Panel):
@@ -75,102 +90,65 @@ class OBJECT_PT_delta_transform(ObjectButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
ob = context.object
- row = layout.row()
+ col = layout.column()
- row.column().prop(ob, "delta_location")
+ col.column().prop(ob, "delta_location")
if ob.rotation_mode == 'QUATERNION':
- row.column().prop(ob, "delta_rotation_quaternion", text="Rotation")
+ col.column().prop(ob, "delta_rotation_quaternion", text="Rotation")
elif ob.rotation_mode == 'AXIS_ANGLE':
- #row.column().label(text="Rotation")
+ # row.column().label(text="Rotation")
#row.column().prop(pchan, "delta_rotation_angle", text="Angle")
#row.column().prop(pchan, "delta_rotation_axis", text="Axis")
#row.column().prop(ob, "delta_rotation_axis_angle", text="Rotation")
- row.column().label(text="Not for Axis-Angle")
+ col.column().label(text="Not for Axis-Angle")
else:
- row.column().prop(ob, "delta_rotation_euler", text="Delta Rotation")
-
- row.column().prop(ob, "delta_scale")
-
-
-class OBJECT_PT_transform_locks(ObjectButtonsPanel, Panel):
- bl_label = "Transform Locks"
- bl_options = {'DEFAULT_CLOSED'}
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
-
- split = layout.split(percentage=0.1)
+ col.column().prop(ob, "delta_rotation_euler", text="Delta Rotation")
- col = split.column(align=True)
- col.label(text="")
- col.label(text="X:")
- col.label(text="Y:")
- col.label(text="Z:")
-
- split.column().prop(ob, "lock_location", text="Location")
- split.column().prop(ob, "lock_rotation", text="Rotation")
- split.column().prop(ob, "lock_scale", text="Scale")
-
- if ob.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
- row = layout.row()
- row.prop(ob, "lock_rotations_4d", text="Lock Rotation")
-
- sub = row.row()
- sub.active = ob.lock_rotations_4d
- sub.prop(ob, "lock_rotation_w", text="W")
+ col.column().prop(ob, "delta_scale")
class OBJECT_PT_relations(ObjectButtonsPanel, Panel):
bl_label = "Relations"
+ bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
ob = context.object
- split = layout.split()
-
- col = split.column()
- col.prop(ob, "pass_index")
+ col = layout.column()
- col = split.column()
- col.label(text="Parent:")
- col.prop(ob, "parent", text="")
+ col.prop(ob, "parent")
sub = col.column()
- sub.prop(ob, "parent_type", text="")
+ sub.prop(ob, "parent_type")
parent = ob.parent
if parent and ob.parent_type == 'BONE' and parent.type == 'ARMATURE':
- sub.prop_search(ob, "parent_bone", parent.data, "bones", text="")
+ sub.prop_search(ob, "parent_bone", parent.data, "bones")
sub.active = (parent is not None)
+ col = col.column()
+ col.active = (ob.parent is not None)
+ col.prop(ob, "use_slow_parent")
+ sub = col.column()
+ sub.active = (ob.use_slow_parent)
+ sub.prop(ob, "slow_parent_offset", text="Offset")
-class OBJECT_PT_relations_extras(ObjectButtonsPanel, Panel):
- bl_label = "Relations Extras"
- bl_options = {'DEFAULT_CLOSED'}
-
- def draw(self, context):
- layout = self.layout
-
- ob = context.object
+ col.separator()
- split = layout.split()
+ col = layout.column()
- col = split.column()
- col.label(text="Tracking Axes:")
- col.prop(ob, "track_axis", text="Axis")
+ col.prop(ob, "track_axis", text="Tracking Axis")
col.prop(ob, "up_axis", text="Up Axis")
- col = split.column()
- col.prop(ob, "use_slow_parent")
- row = col.row()
- row.active = ((ob.parent is not None) and (ob.use_slow_parent))
- row.prop(ob, "slow_parent_offset", text="Offset")
+ col.separator()
+
+ col.prop(ob, "pass_index")
class COLLECTION_MT_specials(Menu):
@@ -222,9 +200,11 @@ class OBJECT_PT_collections(ObjectButtonsPanel, Panel):
class OBJECT_PT_display(ObjectButtonsPanel, Panel):
bl_label = "Display"
+ bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
obj = context.object
obj_type = obj.type
@@ -233,9 +213,7 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
is_empty_image = (obj_type == 'EMPTY' and obj.empty_draw_type == 'IMAGE')
is_dupli = (obj.dupli_type != 'NONE')
- split = layout.split()
-
- col = split.column()
+ col = layout.column(align=True)
col.prop(obj, "show_name", text="Name")
col.prop(obj, "show_axis", text="Axis")
# Makes no sense for cameras, armatures, etc.!
@@ -245,48 +223,44 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
if obj_type == 'MESH' or is_dupli:
col.prop(obj, "show_all_edges")
- col = split.column()
- row = col.row()
- row.prop(obj, "show_bounds", text="Bounds")
- sub = row.row()
- sub.active = obj.show_bounds
- sub.prop(obj, "draw_bounds_type", text="")
+ col = layout.column()
+ col.prop(obj, "show_bounds", text="Bounds")
+ col = layout.column()
+ col.active = obj.show_bounds
+ col.prop(obj, "draw_bounds_type")
+ col = layout.column()
if is_geometry:
col.prop(obj, "show_texture_space", text="Texture Space")
- col.prop(obj.display, "show_shadows")
+ col.prop(obj.display, "show_shadows", text="Shadow")
col.prop(obj, "show_x_ray", text="X-Ray")
- if obj_type == 'MESH' or is_empty_image:
- col.prop(obj, "show_transparent", text="Transparency")
+# if obj_type == 'MESH' or is_empty_image:
+ # col.prop(obj, "show_transparent", text="Transparency")
- split = layout.split()
-
- col = split.column()
+ col = layout.column()
if is_wire:
# wire objects only use the max. draw type for duplis
col.active = is_dupli
- col.label(text="Maximum Dupli Draw Type:")
- else:
- col.label(text="Maximum Draw Type:")
- col.prop(obj, "draw_type", text="")
+ col.prop(
+ obj, "draw_type",
+ text="Maximum Dupli Draw Type" if is_wire else "Maximum Dupli Draw Type",
+ )
- col = split.column()
+ col = layout.column()
if is_geometry or is_empty_image:
# Only useful with object having faces/materials...
- col.label(text="Object Color:")
- col.prop(obj, "color", text="")
+ col.prop(obj, "color")
- col = layout.column()
+ col = layout.column(align=True)
col.active = bool(is_dupli or obj.particle_systems)
- col.label(text="Duplicator Visibility:")
- row = col.row(align=True)
- row.prop(obj, "show_duplicator_for_viewport", text="Viewport")
- row.prop(obj, "show_duplicator_for_render", text="Render")
+ col.prop(obj, "show_duplicator_for_viewport")
+ col.prop(obj, "show_duplicator_for_render")
class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
bl_label = "Duplication"
+ bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
@@ -295,14 +269,15 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
layout.row().prop(ob, "dupli_type", expand=True)
+ layout.use_property_split = True
+
if ob.dupli_type == 'FRAMES':
- split = layout.split()
- col = split.column(align=True)
+ col = layout.column(align=True)
col.prop(ob, "dupli_frames_start", text="Start")
col.prop(ob, "dupli_frames_end", text="End")
- col = split.column(align=True)
+ col = layout.column(align=True)
col.prop(ob, "dupli_frames_on", text="On")
col.prop(ob, "dupli_frames_off", text="Off")
@@ -312,9 +287,9 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
layout.prop(ob, "use_dupli_vertices_rotation", text="Rotation")
elif ob.dupli_type == 'FACES':
- row = layout.row()
- row.prop(ob, "use_dupli_faces_scale", text="Scale")
- sub = row.row()
+ col = layout.column()
+ col.prop(ob, "use_dupli_faces_scale", text="Scale")
+ sub = col.column()
sub.active = ob.use_dupli_faces_scale
sub.prop(ob, "dupli_faces_scale", text="Inherit Scale")
@@ -370,9 +345,7 @@ classes = (
OBJECT_PT_context_object,
OBJECT_PT_transform,
OBJECT_PT_delta_transform,
- OBJECT_PT_transform_locks,
OBJECT_PT_relations,
- OBJECT_PT_relations_extras,
COLLECTION_MT_specials,
OBJECT_PT_collections,
OBJECT_PT_display,
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 404e4c4500b..92608cfccb9 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -125,6 +125,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
scene = context.scene
rd = scene.render
@@ -134,41 +135,33 @@ class RENDER_PT_dimensions(RenderButtonsPanel, Panel):
row.operator("render.preset_add", text="", icon='ZOOMIN')
row.operator("render.preset_add", text="", icon='ZOOMOUT').remove_active = True
- split = layout.split()
-
- col = split.column()
- sub = col.column(align=True)
- sub.label(text="Resolution:")
- sub.prop(rd, "resolution_x", text="X")
- sub.prop(rd, "resolution_y", text="Y")
- sub.prop(rd, "resolution_percentage", text="")
+ col = layout.column(align=True)
+ col.prop(rd, "resolution_x", text="Resolution X")
+ col.prop(rd, "resolution_y", text="Y")
+ col.prop(rd, "resolution_percentage")
- sub.label(text="Aspect Ratio:")
- sub.prop(rd, "pixel_aspect_x", text="X")
- sub.prop(rd, "pixel_aspect_y", text="Y")
+ col = layout.column(align=True)
+ col.prop(rd, "pixel_aspect_x", text="Aspect X")
+ col.prop(rd, "pixel_aspect_y", text="Y")
- row = col.row()
- row.prop(rd, "use_border", text="Border")
- sub = row.row()
+ col = layout.column(align=True)
+ col.prop(rd, "use_border", text="Border")
+ sub = col.column(align=True)
sub.active = rd.use_border
sub.prop(rd, "use_crop_to_border", text="Crop")
- col = split.column()
- sub = col.column(align=True)
- sub.label(text="Frame Range:")
- sub.prop(scene, "frame_start")
- sub.prop(scene, "frame_end")
- sub.prop(scene, "frame_step")
+ col = layout.column(align=True)
+ col.prop(scene, "frame_start", text="Frame Range Start")
+ col.prop(scene, "frame_end", text="End")
+ col.prop(scene, "frame_step", text="Step")
- sub.label(text="Frame Rate:")
+ col = layout.split(percentage=0.5)
+ col.label(text="Frame Rate")
+ self.draw_framerate(col, rd)
- self.draw_framerate(sub, rd)
-
- subrow = sub.row(align=True)
- subrow.label(text="Time Remapping:")
- subrow = sub.row(align=True)
- subrow.prop(rd, "frame_map_old", text="Old")
- subrow.prop(rd, "frame_map_new", text="New")
+ col = layout.column(align=True)
+ col.prop(rd, "frame_map_old", text="Time Remapping Old")
+ col.prop(rd, "frame_map_new", text="New")
class RENDER_PT_post_processing(RenderButtonsPanel, Panel):
@@ -178,16 +171,15 @@ class RENDER_PT_post_processing(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
rd = context.scene.render
- split = layout.split()
-
- col = split.column()
+ col = layout.column(align=True)
col.prop(rd, "use_compositing")
col.prop(rd, "use_sequencer")
- split.prop(rd, "dither_intensity", text="Dither", slider=True)
+ col.prop(rd, "dither_intensity", text="Dither", slider=True)
class RENDER_PT_stamp(RenderButtonsPanel, Panel):
@@ -197,24 +189,13 @@ class RENDER_PT_stamp(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = False
rd = context.scene.render
- layout.prop(rd, "use_stamp")
- col = layout.column()
- col.active = rd.use_stamp
- row = col.row()
- row.prop(rd, "stamp_font_size", text="Font Size")
- row.prop(rd, "use_stamp_labels", text="Draw Labels")
-
- row = col.row()
- row.column().prop(rd, "stamp_foreground", slider=True)
- row.column().prop(rd, "stamp_background", slider=True)
-
- layout.label("Enabled Metadata")
split = layout.split()
- col = split.column()
+ col = split.column(align=True)
col.prop(rd, "use_stamp_time", text="Time")
col.prop(rd, "use_stamp_date", text="Date")
col.prop(rd, "use_stamp_render_time", text="RenderTime")
@@ -222,7 +203,7 @@ class RENDER_PT_stamp(RenderButtonsPanel, Panel):
col.prop(rd, "use_stamp_scene", text="Scene")
col.prop(rd, "use_stamp_memory", text="Memory")
- col = split.column()
+ col = split.column(align=True)
col.prop(rd, "use_stamp_camera", text="Camera")
col.prop(rd, "use_stamp_lens", text="Lens")
col.prop(rd, "use_stamp_filename", text="Filename")
@@ -230,14 +211,26 @@ class RENDER_PT_stamp(RenderButtonsPanel, Panel):
col.prop(rd, "use_stamp_marker", text="Marker")
col.prop(rd, "use_stamp_sequencer_strip", text="Seq. Strip")
- row = layout.split(percentage=0.2)
+ if rd.use_sequencer:
+ col.prop(rd, "use_stamp_strip_meta", text="Sequence Strip")
+
+ row = layout.split(percentage=0.3)
row.prop(rd, "use_stamp_note", text="Note")
sub = row.row()
sub.active = rd.use_stamp_note
sub.prop(rd, "stamp_note_text", text="")
- if rd.use_sequencer:
- layout.label("Sequencer:")
- layout.prop(rd, "use_stamp_strip_meta")
+
+ layout.use_property_split = True
+
+ layout.separator()
+
+ layout.prop(rd, "use_stamp", text="Burn Into Image")
+ col = layout.column()
+ col.active = rd.use_stamp
+ col.prop(rd, "stamp_font_size", text="Font Size")
+ col.prop(rd, "use_stamp_labels", text="Draw Labels")
+ col.column().prop(rd, "stamp_foreground", slider=True)
+ col.column().prop(rd, "stamp_background", slider=True)
class RENDER_PT_output(RenderButtonsPanel, Panel):
@@ -246,6 +239,7 @@ class RENDER_PT_output(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = False
rd = context.scene.render
image_settings = rd.image_settings
@@ -253,17 +247,17 @@ class RENDER_PT_output(RenderButtonsPanel, Panel):
layout.prop(rd, "filepath", text="")
- split = layout.split()
-
- col = split.column()
- col.active = not rd.is_movie_format
- col.prop(rd, "use_overwrite")
- col.prop(rd, "use_placeholder")
+ layout.use_property_split = True
- col = split.column()
+ col = layout.column(align=True)
+ sub = col.column(align=True)
+ sub.active = not rd.is_movie_format
+ sub.prop(rd, "use_overwrite")
+ sub.prop(rd, "use_placeholder")
col.prop(rd, "use_file_extension")
col.prop(rd, "use_render_cache")
+ layout.use_property_split = False
layout.template_image_settings(image_settings, color_management=False)
if rd.use_multiview:
layout.template_image_views(image_settings)
@@ -447,6 +441,7 @@ class RENDER_PT_eevee_ambient_occlusion(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
scene = context.scene
props = scene.eevee
@@ -475,6 +470,7 @@ class RENDER_PT_eevee_motion_blur(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
scene = context.scene
props = scene.eevee
@@ -500,6 +496,7 @@ class RENDER_PT_eevee_depth_of_field(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
scene = context.scene
props = scene.eevee
@@ -525,6 +522,8 @@ class RENDER_PT_eevee_bloom(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
+
scene = context.scene
props = scene.eevee
@@ -554,20 +553,32 @@ class RENDER_PT_eevee_volumetric(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
+
scene = context.scene
props = scene.eevee
layout.active = props.use_volumetric
col = layout.column()
- col.prop(props, "volumetric_start")
- col.prop(props, "volumetric_end")
+ sub = col.column(align=True)
+ sub.prop(props, "volumetric_start")
+ sub.prop(props, "volumetric_end")
col.prop(props, "volumetric_tile_size")
+ col.separator()
col.prop(props, "volumetric_samples")
- col.prop(props, "volumetric_sample_distribution")
+ sub.prop(props, "volumetric_sample_distribution")
+ col.separator()
col.prop(props, "use_volumetric_lights")
- col.prop(props, "volumetric_light_clamp")
+
+ sub = col.column()
+ sub.active = props.use_volumetric_lights
+ sub.prop(props, "volumetric_light_clamp", text="Light Clamping")
+ col.separator()
col.prop(props, "use_volumetric_shadows")
- col.prop(props, "volumetric_shadow_samples")
+ sub = col.column()
+ sub.active = props.use_volumetric_shadows
+ sub.prop(props, "volumetric_shadow_samples", text="Shadow Samples")
+ col.separator()
col.prop(props, "use_volumetric_colored_transmittance")
@@ -587,9 +598,13 @@ class RENDER_PT_eevee_subsurface_scattering(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
+
scene = context.scene
props = scene.eevee
+ layout.active = props.use_sss
+
col = layout.column()
col.prop(props, "sss_samples")
col.prop(props, "sss_jitter_threshold")
@@ -612,12 +627,14 @@ class RENDER_PT_eevee_screen_space_reflections(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
+
scene = context.scene
props = scene.eevee
col = layout.column()
col.active = props.use_ssr
- col.prop(props, "use_ssr_refraction")
+ col.prop(props, "use_ssr_refraction", text="Refraction")
col.prop(props, "use_ssr_halfres")
col.prop(props, "ssr_quality")
col.prop(props, "ssr_max_roughness")
@@ -637,6 +654,8 @@ class RENDER_PT_eevee_shadows(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
+
scene = context.scene
props = scene.eevee
@@ -658,6 +677,8 @@ class RENDER_PT_eevee_sampling(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
+
scene = context.scene
props = scene.eevee
@@ -678,6 +699,8 @@ class RENDER_PT_eevee_indirect_lighting(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
+
scene = context.scene
props = scene.eevee
@@ -698,15 +721,13 @@ class RENDER_PT_eevee_film(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
+
scene = context.scene
rd = scene.render
- split = layout.split()
-
- col = split.column()
+ col = layout.column()
col.prop(rd, "filter_size")
-
- col = split.column()
col.prop(rd, "alpha_mode", text="Alpha")
@@ -737,9 +758,9 @@ classes = (
RENDER_PT_context,
RENDER_PT_dimensions,
RENDER_PT_post_processing,
- RENDER_PT_stamp,
RENDER_PT_output,
RENDER_PT_encoding,
+ RENDER_PT_stamp,
RENDER_UL_renderviews,
RENDER_PT_stereoscopy,
RENDER_PT_hair,
diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py
index 4f3b293faa3..23714584acd 100644
--- a/release/scripts/startup/bl_ui/properties_scene.py
+++ b/release/scripts/startup/bl_ui/properties_scene.py
@@ -19,10 +19,10 @@
# <pep8 compliant>
import bpy
from bpy.types import (
- Menu,
- Panel,
- UIList,
- )
+ Menu,
+ Panel,
+ UIList,
+)
from rna_prop_ui import PropertyPanel
@@ -69,12 +69,12 @@ class SCENE_PT_scene(SceneButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
-
+ layout.use_property_split = True
scene = context.scene
layout.prop(scene, "camera")
- layout.prop(scene, "background_set", text="Background")
- layout.prop(scene, "active_clip", text="Active Clip")
+ layout.prop(scene, "background_set")
+ layout.prop(scene, "active_clip")
class SCENE_PT_unit(SceneButtonsPanel, Panel):
@@ -91,23 +91,18 @@ class SCENE_PT_unit(SceneButtonsPanel, Panel):
row.operator("scene.units_length_preset_add", text="", icon='ZOOMIN')
row.operator("scene.units_length_preset_add", text="", icon='ZOOMOUT').remove_active = True
- layout.separator()
+ layout.use_property_split = True
- split = layout.split(percentage=0.35)
- split.label("Length:")
- split.prop(unit, "system", text="")
- split = layout.split(percentage=0.35)
- split.label("Angle:")
- split.prop(unit, "system_rotation", text="")
+ col = layout.column()
+ col.prop(unit, "system")
+
+ col = layout.column()
+ col.prop(unit, "system_rotation")
col = layout.column()
col.enabled = unit.system != 'NONE'
- split = col.split(percentage=0.35)
- split.label("Unit Scale:")
- split.prop(unit, "scale_length", text="")
- split = col.split(percentage=0.35)
- split.row()
- split.prop(unit, "use_separate")
+ col.prop(unit, "scale_length")
+ col.prop(unit, "use_separate")
class SceneKeyingSetsPanel:
@@ -115,18 +110,19 @@ class SceneKeyingSetsPanel:
@staticmethod
def draw_keyframing_settings(context, layout, ks, ksp):
SceneKeyingSetsPanel._draw_keyframing_setting(
- context, layout, ks, ksp, "Needed",
- "use_insertkey_override_needed", "use_insertkey_needed",
- userpref_fallback="use_keyframe_insert_needed")
-
+ context, layout, ks, ksp, "Needed",
+ "use_insertkey_override_needed", "use_insertkey_needed",
+ userpref_fallback="use_keyframe_insert_needed",
+ )
SceneKeyingSetsPanel._draw_keyframing_setting(
- context, layout, ks, ksp, "Visual",
- "use_insertkey_override_visual", "use_insertkey_visual",
- userpref_fallback="use_visual_keying")
-
+ context, layout, ks, ksp, "Visual",
+ "use_insertkey_override_visual", "use_insertkey_visual",
+ userpref_fallback="use_visual_keying",
+ )
SceneKeyingSetsPanel._draw_keyframing_setting(
- context, layout, ks, ksp, "XYZ to RGB",
- "use_insertkey_override_xyz_to_rgb", "use_insertkey_xyz_to_rgb")
+ context, layout, ks, ksp, "XYZ to RGB",
+ "use_insertkey_override_xyz_to_rgb", "use_insertkey_xyz_to_rgb",
+ )
@staticmethod
def _draw_keyframing_setting(context, layout, ks, ksp, label, toggle_prop, prop, userpref_fallback=None):
@@ -197,6 +193,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel):
class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel):
bl_label = "Active Keying Set"
+ bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
@classmethod
@@ -258,22 +255,21 @@ class SCENE_PT_color_management(SceneButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
scene = context.scene
col = layout.column()
- col.label(text="Display:")
col.prop(scene.display_settings, "display_device")
- col = layout.column()
col.separator()
- col.label(text="Render:")
- col.template_colormanaged_view_settings(scene, "view_settings")
col = layout.column()
+ col.template_colormanaged_view_settings(scene, "view_settings")
+
col.separator()
- col.label(text="Sequencer:")
- col.prop(scene.sequencer_colorspace_settings, "name")
+ col = layout.column()
+ col.prop(scene.sequencer_colorspace_settings, "name", text="Sequencer Color Space")
class SCENE_PT_audio(SceneButtonsPanel, Panel):
@@ -283,27 +279,29 @@ class SCENE_PT_audio(SceneButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
scene = context.scene
rd = context.scene.render
ffmpeg = rd.ffmpeg
layout.prop(scene, "audio_volume")
- layout.operator("sound.bake_animation")
- split = layout.split()
+ col = layout.column()
+ col.prop(scene, "audio_distance_model")
+
+ col.prop(ffmpeg, "audio_channels")
+ col.prop(ffmpeg, "audio_mixrate", text="Sample Rate")
- col = split.column()
- col.label("Distance Model:")
- col.prop(scene, "audio_distance_model", text="")
- sub = col.column(align=True)
- sub.prop(scene, "audio_doppler_speed", text="Speed")
- sub.prop(scene, "audio_doppler_factor", text="Doppler")
+ layout.separator()
- col = split.column()
- col.label("Format:")
- col.prop(ffmpeg, "audio_channels", text="")
- col.prop(ffmpeg, "audio_mixrate", text="Rate")
+ col = layout.column(align=True)
+ col.prop(scene, "audio_doppler_speed", text="Doppler Speed")
+ col.prop(scene, "audio_doppler_factor", text="Doppler Factor")
+
+ layout.separator()
+
+ layout.operator("sound.bake_animation")
class SCENE_PT_physics(SceneButtonsPanel, Panel):
@@ -315,16 +313,18 @@ class SCENE_PT_physics(SceneButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
scene = context.scene
layout.active = scene.use_gravity
- layout.prop(scene, "gravity", text="")
+ layout.prop(scene, "gravity")
class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel):
bl_label = "Rigid Body World"
+ bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
@classmethod
@@ -403,6 +403,7 @@ class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel):
class SCENE_PT_simplify(SceneButtonsPanel, Panel):
bl_label = "Simplify"
+ bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
def draw_header(self, context):
@@ -411,22 +412,21 @@ class SCENE_PT_simplify(SceneButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
rd = context.scene.render
layout.active = rd.use_simplify
- split = layout.split()
+ col = layout.column()
+ col.prop(rd, "simplify_subdivision", text="Max Viewport Subdivision")
+ col.prop(rd, "simplify_child_particles", text="Max Child Particles")
- col = split.column()
- col.label(text="Viewport:")
- col.prop(rd, "simplify_subdivision", text="Subdivision")
- col.prop(rd, "simplify_child_particles", text="Child Particles")
+ col.separator()
- col = split.column()
- col.label(text="Render:")
- col.prop(rd, "simplify_subdivision_render", text="Subdivision")
- col.prop(rd, "simplify_child_particles_render", text="Child Particles")
+ col = layout.column()
+ col.prop(rd, "simplify_subdivision_render", text="Max Render Subdivision")
+ col.prop(rd, "simplify_child_particles_render", text="Max Child Particles")
class SCENE_PT_viewport_display(SceneButtonsPanel, Panel):