UI: use single column properties for object data

patch by @billreynish w/ minor edits
This commit is contained in:
Campbell Barton 2018-06-01 18:44:06 +02:00
parent bfe1d0e0dc
commit d18cd768bb
14 changed files with 578 additions and 613 deletions

@ -77,15 +77,13 @@ class DATA_PT_display(ArmatureButtonsPanel, Panel):
layout.row().prop(arm, "draw_type", expand=True)
split = layout.split()
layout.use_property_split = True
col = split.column()
col = layout.column()
col.prop(arm, "show_names", text="Names")
col.prop(arm, "show_axes", text="Axes")
col.prop(arm, "show_bone_custom_shapes", text="Shapes")
col = split.column()
col.prop(arm, "show_group_colors", text="Colors")
col.prop(arm, "show_group_colors", text="Group Colors")
if ob:
col.prop(ob, "show_x_ray", text="X-Ray")
col.prop(arm, "use_deform_delay", text="Delay Refresh")
@ -149,7 +147,8 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel):
sub = row.row(align=True)
sub.operator("pose.group_assign", text="Assign")
sub.operator("pose.group_unassign", text="Remove") # row.operator("pose.bone_group_remove_from", text="Remove")
# row.operator("pose.bone_group_remove_from", text="Remove")
sub.operator("pose.group_unassign", text="Remove")
sub = row.row(align=True)
sub.operator("pose.group_select", text="Select")
@ -196,7 +195,11 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
if pose_marker_active is not None:
col.operator("poselib.pose_remove", icon='ZOOMOUT', text="")
col.operator("poselib.apply_pose", icon='ZOOM_SELECTED', text="").pose_index = poselib.pose_markers.active_index
col.operator(
"poselib.apply_pose",
icon='ZOOM_SELECTED',
text="",
).pose_index = poselib.pose_markers.active_index
col.operator("poselib.action_sanitize", icon='HELP', text="") # XXX: put in menu?
@ -216,21 +219,19 @@ class DATA_PT_ghost(ArmatureButtonsPanel, Panel):
layout.row().prop(arm, "ghost_type", expand=True)
split = layout.split()
layout.use_property_split = True
col = split.column(align=True)
col = layout.column(align=True)
if arm.ghost_type == 'RANGE':
col.prop(arm, "ghost_frame_start", text="Start")
col.prop(arm, "ghost_frame_start", text="Frame Start")
col.prop(arm, "ghost_frame_end", text="End")
col.prop(arm, "ghost_size", text="Step")
elif arm.ghost_type == 'CURRENT_FRAME':
col.prop(arm, "ghost_step", text="Range")
col.prop(arm, "ghost_step", text="Frame Range")
col.prop(arm, "ghost_size", text="Step")
col = split.column()
col.label(text="Display:")
col.prop(arm, "show_only_ghost_selected", text="Selected Only")
col.prop(arm, "show_only_ghost_selected", text="Display Selected Only")
class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
@ -244,6 +245,7 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
ob = context.object
itasc = ob.pose.ik_param
@ -251,34 +253,37 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
layout.prop(ob.pose, "ik_solver")
if itasc:
layout.use_property_split = False
layout.row().prop(itasc, "mode", expand=True)
layout.use_property_split = True
simulation = (itasc.mode == 'SIMULATION')
if simulation:
layout.label(text="Reiteration:")
layout.row().prop(itasc, "reiteration_method", expand=True)
layout.prop(itasc, "reiteration_method", expand=False)
row = layout.row()
row.active = not simulation or itasc.reiteration_method != 'NEVER'
row.prop(itasc, "precision")
row.prop(itasc, "iterations")
col = layout.column()
col.active = not simulation or itasc.reiteration_method != 'NEVER'
col.prop(itasc, "precision")
col.prop(itasc, "iterations")
if simulation:
layout.prop(itasc, "use_auto_step")
row = layout.row()
col = layout.column(align=True)
if itasc.use_auto_step:
row.prop(itasc, "step_min", text="Min")
row.prop(itasc, "step_max", text="Max")
col.prop(itasc, "step_min", text="Steps Min")
col.prop(itasc, "step_max", text="Max")
else:
row.prop(itasc, "step_count")
col.prop(itasc, "step_count", text="Steps")
layout.prop(itasc, "solver")
if simulation:
layout.prop(itasc, "feedback")
layout.prop(itasc, "velocity_max")
if itasc.solver == 'DLS':
row = layout.row()
row.prop(itasc, "damping_max", text="Damp", slider=True)
row.prop(itasc, "damping_epsilon", text="Eps", slider=True)
col = layout.column()
col.separator()
col.prop(itasc, "damping_max", text="Damping Max", slider=True)
col.prop(itasc, "damping_epsilon", text="Damping Epsilon", slider=True)
from .properties_animviz import (
MotionPathButtonsPanel,

@ -62,88 +62,63 @@ class BONE_PT_transform(BoneButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
ob = context.object
bone = context.bone
col = layout.column()
if bone and ob:
pchan = ob.pose.bones[bone.name]
row = layout.row()
col = row.column()
col.prop(pchan, "location")
col.active = not (bone.parent and bone.use_connect)
col = row.column()
sub = col.row(align=True)
sub.prop(pchan, "location")
sub.prop(pchan, "lock_location", text="")
col = layout.column()
if pchan.rotation_mode == 'QUATERNION':
col.prop(pchan, "rotation_quaternion", text="Rotation")
sub = col.row(align=True)
sub.prop(pchan, "rotation_quaternion", text="Rotation")
subsub = sub.column(align=True)
subsub.prop(pchan, "lock_rotation_w", text="")
subsub.prop(pchan, "lock_rotation", text="")
elif pchan.rotation_mode == 'AXIS_ANGLE':
#col.label(text="Rotation")
# col.label(text="Rotation")
#col.prop(pchan, "rotation_angle", text="Angle")
#col.prop(pchan, "rotation_axis", text="Axis")
col.prop(pchan, "rotation_axis_angle", text="Rotation")
sub = col.row(align=True)
sub.prop(pchan, "rotation_axis_angle", text="Rotation")
subsub = sub.column(align=True)
subsub.prop(pchan, "lock_rotation_w", text="")
subsub.prop(pchan, "lock_rotation", text="")
else:
col.prop(pchan, "rotation_euler", text="Rotation")
sub = col.row(align=True)
sub.prop(pchan, "rotation_euler", text="Rotation")
sub.prop(pchan, "lock_rotation", text="")
row.column().prop(pchan, "scale")
col = layout.column()
sub = col.row(align=True)
sub.prop(pchan, "scale")
sub.prop(pchan, "lock_scale", text="")
layout.prop(pchan, "rotation_mode")
col = layout.column()
col.prop(pchan, "rotation_mode")
elif context.edit_bone:
bone = context.edit_bone
row = layout.row()
row.column().prop(bone, "head")
row.column().prop(bone, "tail")
col = layout.column()
col.prop(bone, "head")
col.prop(bone, "tail")
col = row.column()
sub = col.column(align=True)
sub.label(text="Roll:")
sub.prop(bone, "roll", text="")
sub.label()
sub.prop(bone, "lock")
col = layout.column()
col.prop(bone, "roll")
col.prop(bone, "lock")
class BONE_PT_transform_locks(BoneButtonsPanel, Panel):
bl_label = "Transform Locks"
bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
ob = context.object
return ob and ob.mode == 'POSE' and context.bone
def draw(self, context):
layout = self.layout
ob = context.object
bone = context.bone
pchan = ob.pose.bones[bone.name]
split = layout.split(percentage=0.1)
col = split.column(align=True)
col.label(text="")
col.label(text="X:")
col.label(text="Y:")
col.label(text="Z:")
col = split.column()
col.active = not (bone.parent and bone.use_connect)
col.prop(pchan, "lock_location", text="Location")
col = split.column()
col.prop(pchan, "lock_rotation", text="Rotation")
col = split.column()
col.prop(pchan, "lock_scale", text="Scale")
if pchan.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
row = layout.row()
row.prop(pchan, "lock_rotations_4d", text="Lock Rotation")
sub = row.row()
sub.active = pchan.lock_rotations_4d
sub.prop(pchan, "lock_rotation_w", text="W")
col = layout.column()
col.prop(bone, "tail_radius")
col.prop(bone, "envelope_distance")
class BONE_PT_curved(BoneButtonsPanel, Panel):
@ -166,54 +141,52 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
bbone = bone
layout = self.layout
layout.use_property_split = True
layout.prop(bone, "bbone_segments", text="Segments")
col = layout.column()
col.active = bone.bbone_segments > 1
row = col.row()
sub = row.column(align=True)
sub.label(text="Curve XY Offsets:")
sub.prop(bbone, "bbone_curveinx", text="In X")
sub.prop(bbone, "bbone_curveoutx", text="Out X")
sub.prop(bbone, "bbone_curveiny", text="In Y")
sub.prop(bbone, "bbone_curveouty", text="Out Y")
col = layout.column(align=True)
col.prop(bbone, "bbone_curveinx", text="Curve In X")
col.prop(bbone, "bbone_curveiny", text="In Y")
sub = row.column(align=True)
sub.label("Roll:")
sub.prop(bbone, "bbone_rollin", text="In")
sub.prop(bbone, "bbone_rollout", text="Out")
sub.prop(bone, "use_endroll_as_inroll")
col = layout.column(align=True)
col.prop(bbone, "bbone_curveoutx", text="Curve Out X")
col.prop(bbone, "bbone_curveouty", text="Out Y")
row = col.row()
sub = row.column(align=True)
sub.label(text="Scale:")
sub.prop(bbone, "bbone_scalein", text="In")
sub.prop(bbone, "bbone_scaleout", text="Out")
col = layout.column(align=True)
col.prop(bbone, "bbone_rollin", text="Roll In")
col.prop(bbone, "bbone_rollout", text="Out")
col.prop(bone, "use_endroll_as_inroll")
sub = row.column(align=True)
sub.label("Easing:")
sub.prop(bbone, "bbone_easein", text="In")
sub.prop(bbone, "bbone_easeout", text="Out")
col = layout.column(align=True)
col.prop(bbone, "bbone_scalein", text="Scale In")
col.prop(bbone, "bbone_scaleout", text="Out")
col = layout.column(align=True)
col.prop(bbone, "bbone_easein", text="Ease In")
col.prop(bbone, "bbone_easeout", text="Out")
if pchan:
layout.separator()
col = layout.column()
col.use_property_split = False
col.prop(pchan, "use_bbone_custom_handles")
row = col.row()
row.active = pchan.use_bbone_custom_handles
col = layout.column(align=True)
col.active = pchan.use_bbone_custom_handles
col.use_property_split = True
sub = row.column(align=True)
sub.label(text="In:")
sub.prop_search(pchan, "bbone_custom_handle_start", ob.pose, "bones", text="")
sub.prop(pchan, "use_bbone_relative_start_handle", text="Relative")
sub = col.column()
sub.prop_search(pchan, "bbone_custom_handle_start", ob.pose, "bones", text="Custom Handle Start")
sub.prop_search(pchan, "bbone_custom_handle_end", ob.pose, "bones", text="End")
sub = row.column(align=True)
sub.label(text="Out:")
sub.prop_search(pchan, "bbone_custom_handle_end", ob.pose, "bones", text="")
sub.prop(pchan, "use_bbone_relative_end_handle", text="Relative")
sub = col.column(align=True)
sub.prop(pchan, "use_bbone_relative_start_handle", text="Relative Handle Start")
sub.prop(pchan, "use_bbone_relative_end_handle", text="End")
class BONE_PT_relations(BoneButtonsPanel, Panel):
@ -221,6 +194,7 @@ class BONE_PT_relations(BoneButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
ob = context.object
bone = context.bone
@ -232,26 +206,22 @@ class BONE_PT_relations(BoneButtonsPanel, Panel):
elif bone is None:
bone = context.edit_bone
split = layout.split()
col = split.column()
col.label(text="Layers:")
col = layout.column()
col.use_property_split = False
col.prop(bone, "layers", text="")
col.use_property_split = True
col = layout.column()
col.separator()
if ob and pchan:
col.label(text="Bone Group:")
col.prop_search(pchan, "bone_group", ob.pose, "bone_groups", text="")
col.label(text="Object Children:")
col.prop(bone, "use_relative_parent")
col = split.column()
col.label(text="Parent:")
if context.bone:
col.prop(bone, "parent", text="")
col.prop(bone, "parent")
else:
col.prop_search(bone, "parent", arm, "edit_bones", text="")
col.prop_search(bone, "parent", arm, "edit_bones")
if ob and pchan:
col.prop(bone, "use_relative_parent")
col.prop_search(pchan, "bone_group", ob.pose, "bone_groups", text="Bone Group")
sub = col.column()
sub.active = (bone.parent is not None)
@ -274,6 +244,7 @@ class BONE_PT_display(BoneButtonsPanel, Panel):
# note. this works ok in edit-mode but isn't
# all that useful so disabling for now.
layout = self.layout
layout.use_property_split = True
ob = context.object
bone = context.bone
@ -285,23 +256,20 @@ class BONE_PT_display(BoneButtonsPanel, Panel):
bone = context.edit_bone
if bone:
split = layout.split()
col = split.column()
col = layout.column()
col.prop(bone, "hide", text="Hide")
sub = col.column()
sub.active = bool(pchan and pchan.custom_shape)
sub.prop(bone, "show_wire", text="Wireframe")
if pchan:
col = split.column()
col.label(text="Custom Shape:")
col.prop(pchan, "custom_shape", text="")
col = layout.column()
col.prop(pchan, "custom_shape")
if pchan.custom_shape:
col.prop(pchan, "use_custom_shape_bone_size", text="Bone Size")
col.prop(pchan, "custom_shape_scale", text="Scale")
col.prop_search(pchan, "custom_shape_transform", ob.pose, "bones", text="At")
col.prop_search(pchan, "custom_shape_transform", ob.pose, "bones")
class BONE_PT_inverse_kinematics(BoneButtonsPanel, Panel):
@ -315,80 +283,82 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
ob = context.object
bone = context.bone
pchan = ob.pose.bones[bone.name]
row = layout.row()
active = pchan.is_in_ik_chain
split = layout.split(percentage=0.25)
split.prop(pchan, "lock_ik_x", text="X")
split.active = active
row = split.row()
row.prop(pchan, "ik_stiffness_x", text="Stiffness", slider=True)
row.active = pchan.lock_ik_x is False and active
col = layout.column()
col.prop(pchan, "ik_stretch", slider=True)
col.active = active
split = layout.split(percentage=0.25)
sub = split.row()
layout.separator()
sub.prop(pchan, "use_ik_limit_x", text="Limit")
col = layout.column(align=True)
col.prop(pchan, "lock_ik_x", text="Lock IK X")
col.prop(pchan, "lock_ik_y", text="Y")
col.prop(pchan, "lock_ik_z", text="Z")
col = layout.column(align=True)
sub = col.column(align=True)
sub.active = pchan.lock_ik_x is False and active
sub = split.row(align=True)
sub.prop(pchan, "ik_min_x", text="")
sub.prop(pchan, "ik_max_x", text="")
sub.active = pchan.lock_ik_x is False and pchan.use_ik_limit_x and active
split = layout.split(percentage=0.25)
split.prop(pchan, "lock_ik_y", text="Y")
split.active = active
row = split.row()
row.prop(pchan, "ik_stiffness_y", text="Stiffness", slider=True)
row.active = pchan.lock_ik_y is False and active
split = layout.split(percentage=0.25)
sub = split.row()
sub.prop(pchan, "use_ik_limit_y", text="Limit")
sub.prop(pchan, "ik_stiffness_x", text="Stiffness X", slider=True)
sub = col.column(align=True)
sub.active = pchan.lock_ik_y is False and active
sub.prop(pchan, "ik_stiffness_y", text="Y", slider=True)
sub = col.column(align=True)
sub.active = pchan.lock_ik_z is False and active
sub.prop(pchan, "ik_stiffness_z", text="Z", slider=True)
sub = split.row(align=True)
sub.prop(pchan, "ik_min_y", text="")
sub.prop(pchan, "ik_max_y", text="")
col = layout.column(align=True)
sub = col.column()
sub.active = pchan.lock_ik_x is False and active
sub.prop(pchan, "use_ik_limit_x", text="Limit X")
sub = col.column(align=True)
sub.active = pchan.lock_ik_x is False and pchan.use_ik_limit_x and active
sub.prop(pchan, "ik_min_x", text="Min")
sub.prop(pchan, "ik_max_x", text="Max")
col.separator()
sub = col.column()
sub.active = pchan.lock_ik_y is False and active
sub.prop(pchan, "use_ik_limit_y", text="Limit Y")
sub = col.column(align=True)
sub.active = pchan.lock_ik_y is False and pchan.use_ik_limit_y and active
sub.prop(pchan, "ik_min_y", text="Min")
sub.prop(pchan, "ik_max_y", text="Max")
split = layout.split(percentage=0.25)
split.prop(pchan, "lock_ik_z", text="Z")
split.active = active
sub = split.row()
sub.prop(pchan, "ik_stiffness_z", text="Stiffness", slider=True)
col.separator()
sub = col.column()
sub.active = pchan.lock_ik_z is False and active
sub.prop(pchan, "use_ik_limit_z", text="Limit Z")
split = layout.split(percentage=0.25)
sub = split.row()
sub.prop(pchan, "use_ik_limit_z", text="Limit")
sub.active = pchan.lock_ik_z is False and active
sub = split.row(align=True)
sub.prop(pchan, "ik_min_z", text="")
sub.prop(pchan, "ik_max_z", text="")
sub = col.column(align=True)
sub.active = pchan.lock_ik_z is False and pchan.use_ik_limit_z and active
sub.prop(pchan, "ik_min_z", text="Min")
sub.prop(pchan, "ik_max_z", text="Max")
split = layout.split(percentage=0.25)
split.label(text="Stretch:")
sub = split.row()
sub.prop(pchan, "ik_stretch", text="", slider=True)
sub.active = active
col.separator()
if ob.pose.ik_solver == 'ITASC':
split = layout.split()
col = split.column()
col = layout.column()
col.prop(pchan, "use_ik_rotation_control", text="Control Rotation")
col.active = active
col = split.column()
col.prop(pchan, "ik_rotation_weight", text="Weight", slider=True)
col = layout.column()
col.prop(pchan, "ik_rotation_weight", text="IK Rotation Weight", slider=True)
col.active = active
# not supported yet
#row = layout.row()
@ -410,6 +380,7 @@ class BONE_PT_deform(BoneButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
bone = context.bone
@ -418,17 +389,15 @@ class BONE_PT_deform(BoneButtonsPanel, Panel):
layout.active = bone.use_deform
row = layout.row()
col = layout.column()
col.prop(bone, "envelope_distance", text="Envelope Distance")
col.prop(bone, "envelope_weight", text="Envelope Weight")
col.prop(bone, "use_envelope_multiply", text="Envelope Multiply")
col = row.column(align=True)
col.label(text="Envelope:")
col.prop(bone, "envelope_distance", text="Distance")
col.prop(bone, "envelope_weight", text="Weight")
col.prop(bone, "use_envelope_multiply", text="Multiply")
col.separator()
col = row.column(align=True)
col.label(text="Envelope Radius:")
col.prop(bone, "head_radius", text="Head")
col = layout.column(align=True)
col.prop(bone, "head_radius", text="Radius Head")
col.prop(bone, "tail_radius", text="Tail")
@ -448,7 +417,6 @@ class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, Panel):
classes = (
BONE_PT_context_bone,
BONE_PT_transform,
BONE_PT_transform_locks,
BONE_PT_curved,
BONE_PT_relations,
BONE_PT_display,

@ -76,21 +76,22 @@ class DATA_PT_lens(CameraButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
cam = context.camera
layout.row().prop(cam, "type", expand=True)
layout.prop(cam, "type")
split = layout.split()
col = layout.column()
col.separator()
col = split.column()
if cam.type == 'PERSP':
row = col.row()
col = layout.column()
if cam.lens_unit == 'MILLIMETERS':
row.prop(cam, "lens")
col.prop(cam, "lens")
elif cam.lens_unit == 'FOV':
row.prop(cam, "angle")
row.prop(cam, "lens_unit", text="")
col.prop(cam, "lens_unit")
elif cam.type == 'ORTHO':
col.prop(cam, "ortho_scale")
@ -99,40 +100,36 @@ class DATA_PT_lens(CameraButtonsPanel, Panel):
engine = context.engine
if engine == 'CYCLES':
ccam = cam.cycles
col.prop(ccam, "panorama_type", text="Type")
col.prop(ccam, "panorama_type")
if ccam.panorama_type == 'FISHEYE_EQUIDISTANT':
col.prop(ccam, "fisheye_fov")
elif ccam.panorama_type == 'FISHEYE_EQUISOLID':
row = layout.row()
row.prop(ccam, "fisheye_lens", text="Lens")
row.prop(ccam, "fisheye_fov")
col.prop(ccam, "fisheye_lens", text="Lens")
col.prop(ccam, "fisheye_fov")
elif ccam.panorama_type == 'EQUIRECTANGULAR':
row = layout.row()
sub = row.column(align=True)
sub.prop(ccam, "latitude_min")
sub.prop(ccam, "latitude_max")
sub = row.column(align=True)
sub.prop(ccam, "longitude_min")
sub.prop(ccam, "longitude_max")
sub = col.column(align=True)
sub.prop(ccam, "latitude_min", text="Latitute Min")
sub.prop(ccam, "latitude_max", text="Max")
sub = col.column(align=True)
sub.prop(ccam, "longitude_min", text="Longiture Min")
sub.prop(ccam, "longitude_max", text="Max")
elif engine in {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'}:
row = col.row()
if cam.lens_unit == 'MILLIMETERS':
row.prop(cam, "lens")
col.prop(cam, "lens")
elif cam.lens_unit == 'FOV':
row.prop(cam, "angle")
row.prop(cam, "lens_unit", text="")
col.prop(cam, "angle")
col.prop(cam, "lens_unit")
split = layout.split()
col = layout.column()
col.separator()
sub = col.column(align=True)
sub.prop(cam, "shift_x", text="Shift X")
sub.prop(cam, "shift_y", text="Y")
col = split.column(align=True)
col.label(text="Shift:")
col.prop(cam, "shift_x", text="X")
col.prop(cam, "shift_y", text="Y")
col = split.column(align=True)
col.label(text="Clipping:")
col.prop(cam, "clip_start", text="Start")
col.prop(cam, "clip_end", text="End")
sub.prop(cam, "clip_start", text="Clip Start")
sub.prop(cam, "clip_end", text="End")
class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel):
@ -147,6 +144,8 @@ class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
render = context.scene.render
st = context.camera.stereo
cam = context.camera
@ -154,9 +153,9 @@ class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel):
is_spherical_stereo = cam.type != 'ORTHO' and render.use_spherical_stereo
use_spherical_stereo = is_spherical_stereo and st.use_spherical_stereo
col = layout.column()
col.row().prop(st, "convergence_mode", expand=True)
layout.prop(st, "convergence_mode")
col = layout.column()
sub = col.column()
sub.active = st.convergence_mode != 'PARALLEL'
sub.prop(st, "convergence_distance")
@ -165,20 +164,20 @@ class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel):
if is_spherical_stereo:
col.separator()
row = col.row()
row.prop(st, "use_spherical_stereo")
sub = row.row()
col.prop(st, "use_spherical_stereo")
sub = col.column()
sub.active = st.use_spherical_stereo
sub.prop(st, "use_pole_merge")
row = col.row(align=True)
row.active = st.use_pole_merge
row.prop(st, "pole_merge_angle_from")
row.prop(st, "pole_merge_angle_to")
col.label(text="Pivot:")
row = col.row()
row.active = not use_spherical_stereo
row.prop(st, "pivot", expand=True)
sub = col.column(align=True)
sub.active = st.use_pole_merge
sub.prop(st, "pole_merge_angle_from", text="Pole Merge Angle Start")
sub.prop(st, "pole_merge_angle_to", text="End")
col = layout.column()
col.active = not use_spherical_stereo
col.separator()
col.prop(st, "pivot")
class DATA_PT_camera(CameraButtonsPanel, Panel):
@ -196,57 +195,55 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
row.operator("camera.preset_add", text="", icon='ZOOMIN')
row.operator("camera.preset_add", text="", icon='ZOOMOUT').remove_active = True
layout.label(text="Sensor:")
layout.use_property_split = True
split = layout.split()
col = layout.column()
col.prop(cam, "sensor_fit")
col = split.column(align=True)
if cam.sensor_fit == 'AUTO':
col.prop(cam, "sensor_width", text="Size")
col.prop(cam, "sensor_width")
else:
sub = col.column(align=True)
sub.active = cam.sensor_fit == 'HORIZONTAL'
sub.prop(cam, "sensor_width", text="Width")
sub = col.column(align=True)
sub.active = cam.sensor_fit == 'VERTICAL'
sub.prop(cam, "sensor_height", text="Height")
col = split.column(align=True)
col.prop(cam, "sensor_fit", text="")
class DATA_PT_camera_dof(CameraButtonsPanel, Panel):
bl_label = "Depth of Field"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
def draw(self, context):
layout = self.layout
layout.use_property_split = True
cam = context.camera
dof_options = cam.gpu_dof
split = layout.split()
col = split.column()
col.label(text="Focus:")
col.prop(cam, "dof_object", text="")
col = layout.column()
col.prop(cam, "dof_object", text="Focus on Object")
sub = col.column()
sub.active = (cam.dof_object is None)
sub.prop(cam, "dof_distance", text="Distance")
sub.prop(cam, "dof_distance", text="Focus Distance")
col.separator()
if context.engine == 'BLENDER_EEVEE':
col = split.column(align=True)
col.label("Aperture:")
col = layout.column()
col.label("Aperture")
engine = context.engine
sub = col.column(align=True)
sub.prop(dof_options, "fstop")
sub.prop(dof_options, "blades")
sub.prop(dof_options, "rotation")
sub.prop(dof_options, "ratio")
col.prop(dof_options, "fstop")
col.prop(dof_options, "blades")
col.prop(dof_options, "rotation")
col.prop(dof_options, "ratio")
else:
hq_support = dof_options.is_hq_supported
col = split.column(align=True)
col.label("Viewport:")
col = layout.column()
col.label("Viewport")
sub = col.column()
sub.active = hq_support
sub.prop(dof_options, "use_high_quality")
@ -358,24 +355,21 @@ class DATA_PT_camera_background_image(CameraButtonsPanel, Panel):
class DATA_PT_camera_display(CameraButtonsPanel, Panel):
bl_label = "Display"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
def draw(self, context):
layout = self.layout
layout.use_property_split = True
cam = context.camera
split = layout.split()
split.label()
split.prop_menu_enum(cam, "show_guide")
col = split.column()
col.prop(cam, "show_limits", text="Limits")
col.prop(cam, "show_mist", text="Mist")
col = layout.column(align=True)
col.prop(cam, "show_sensor", text="Sensor")
col.prop(cam, "show_name", text="Name")
col = split.column()
col.prop_menu_enum(cam, "show_guide")
col.separator()
col.prop(cam, "draw_size", text="Size")
col.separator()
@ -384,6 +378,13 @@ class DATA_PT_camera_display(CameraButtonsPanel, Panel):
sub.active = cam.show_passepartout
sub.prop(cam, "passepartout_alpha", text="Alpha", slider=True)
col.separator()
col.prop(cam, "show_limits", text="Limits")
col.prop(cam, "show_mist", text="Mist")
col.prop(cam, "show_sensor", text="Sensor")
col.prop(cam, "show_name", text="Name")
class DATA_PT_camera_safe_areas(CameraButtonsPanel, Panel):
bl_label = "Safe Areas"
@ -413,27 +414,30 @@ def draw_display_safe_settings(layout, safe_data, settings):
show_safe_areas = settings.show_safe_areas
show_safe_center = settings.show_safe_center
split = layout.split()
layout.use_property_split = True
col = split.column()
row = col.row(align=True)
row = layout.row(align=True)
row.menu("SAFE_AREAS_MT_presets", text=bpy.types.SAFE_AREAS_MT_presets.bl_label)
row.operator("safe_areas.preset_add", text="", icon='ZOOMIN')
row.operator("safe_areas.preset_add", text="", icon='ZOOMOUT').remove_active = True
col = split.column()
layout.separator()
col = layout.column()
col.active = show_safe_areas
sub = col.column()
sub.prop(safe_data, "title", slider=True)
sub.prop(safe_data, "action", slider=True)
col.separator()
col.prop(settings, "show_safe_center", text="Center-Cut Safe Areas")
split = layout.split()
col = split.column()
col.active = show_safe_areas
col.prop(safe_data, "title", slider=True)
col.prop(safe_data, "action", slider=True)
col = split.column()
col.active = show_safe_areas and show_safe_center
col.prop(safe_data, "title_center", slider=True)
col.prop(safe_data, "action_center", slider=True)
sub = col.column()
sub.active = show_safe_areas and show_safe_center
sub.prop(safe_data, "title_center", slider=True)
sub.prop(safe_data, "action_center", slider=True)
classes = (
@ -445,8 +449,8 @@ classes = (
DATA_PT_camera_stereoscopy,
DATA_PT_camera_dof,
DATA_PT_camera_display,
DATA_PT_camera_background_image,
DATA_PT_camera_safe_areas,
DATA_PT_camera_background_image,
DATA_PT_custom_props_camera,
)

@ -93,43 +93,42 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel):
row = layout.row()
row.prop(curve, "dimensions", expand=True)
split = layout.split()
layout.use_property_split = True
col = layout.column()
sub = col.column(align=True)
sub.prop(curve, "resolution_u", text="Resolution Preview U")
if is_surf:
sub.prop(curve, "resolution_v", text="V")
col = split.column()
col.label(text="Resolution:")
sub = col.column(align=True)
sub.prop(curve, "resolution_u", text="Preview U")
sub.prop(curve, "render_resolution_u", text="Render U")
if is_surf:
sub.prop(curve, "render_resolution_v", text="V")
col.separator()
if is_curve:
col.label(text="Twisting:")
col.prop(curve, "twist_mode", text="")
col.prop(curve, "twist_mode")
col.prop(curve, "twist_smooth", text="Smooth")
elif is_text:
col.label(text="Display:")
col.prop(curve, "use_fast_edit", text="Fast Editing")
col = split.column()
if is_surf:
sub = col.column()
sub.label(text="")
sub = col.column(align=True)
sub.prop(curve, "resolution_v", text="Preview V")
sub.prop(curve, "render_resolution_v", text="Render V")
if is_curve or is_text:
col.label(text="Fill:")
col = layout.column()
col.separator()
sub = col.column()
sub.active = (curve.dimensions == '2D' or (curve.bevel_object is None and curve.dimensions == '3D'))
sub.prop(curve, "fill_mode", text="")
sub.prop(curve, "fill_mode")
col.prop(curve, "use_fill_deform")
if is_curve:
col.label(text="Path/Curve-Deform:")
col = layout.column()
col.separator()
sub = col.column()
subsub = sub.row()
subsub.prop(curve, "use_radius")
subsub.prop(curve, "use_stretch")
sub.prop(curve, "use_radius")
sub.prop(curve, "use_stretch")
sub.prop(curve, "use_deform_bounds")
@ -140,16 +139,17 @@ class DATA_PT_curve_texture_space(CurveButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
curve = context.curve
row = layout.row()
row.prop(curve, "use_auto_texspace")
row.prop(curve, "use_uv_as_generated")
col = layout.column()
col.prop(curve, "use_uv_as_generated")
col.prop(curve, "use_auto_texspace")
row = layout.row()
row.column().prop(curve, "texspace_location", text="Location")
row.column().prop(curve, "texspace_size", text="Size")
col = layout.column()
col.prop(curve, "texspace_location")
col.prop(curve, "texspace_size")
layout.operator("curve.match_texture_space")
@ -163,49 +163,54 @@ class DATA_PT_geometry_curve(CurveButtonsPanelCurve, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
curve = context.curve
split = layout.split()
col = split.column()
col.label(text="Modification:")
col = layout.column()
col.prop(curve, "offset")
col.prop(curve, "extrude")
col.label(text="Taper Object:")
col.prop(curve, "taper_object", text="")
col = split.column()
col.label(text="Bevel:")
col.prop(curve, "bevel_depth", text="Depth")
col.prop(curve, "bevel_resolution", text="Resolution")
col.label(text="Bevel Object:")
col.prop(curve, "bevel_object", text="")
sub = col.column()
sub.active = (curve.bevel_object is None)
sub.prop(curve, "extrude")
col.prop(curve, "taper_object")
sub = col.column()
sub.active = curve.taper_object is not None
sub.prop(curve, "use_map_taper")
col.separator()
layout.label(text="Bevel")
col = layout.column()
sub = col.column()
sub.active = (curve.bevel_object is None)
sub.prop(curve, "bevel_depth", text="Depth")
sub.prop(curve, "bevel_resolution", text="Resolution")
col.prop(curve, "bevel_object", text="Object")
sub = col.column()
sub.active = curve.bevel_object is not None
sub.prop(curve, "use_fill_caps")
if type(curve) is not TextCurve:
col = layout.column(align=True)
row = col.row()
row.label(text="Bevel Factor:")
col = layout.column()
col.active = (
(curve.bevel_depth > 0.0) or
(curve.extrude > 0.0) or
(curve.bevel_object is not None))
row = col.row(align=True)
row.prop(curve, "bevel_factor_mapping_start", text="")
row.prop(curve, "bevel_factor_start", text="Start")
row = col.row(align=True)
row.prop(curve, "bevel_factor_mapping_end", text="")
row.prop(curve, "bevel_factor_end", text="End")
(curve.bevel_depth > 0.0) or
(curve.extrude > 0.0) or
(curve.bevel_object is not None)
)
sub = col.column(align=True)
sub.prop(curve, "bevel_factor_start", text="Bevel Start")
sub.prop(curve, "bevel_factor_end", text="End")
row = layout.row()
sub = row.row()
sub.active = curve.taper_object is not None
sub.prop(curve, "use_map_taper")
sub = row.row()
sub.active = curve.bevel_object is not None
sub.prop(curve, "use_fill_caps")
sub = col.column(align=True)
sub.prop(curve, "bevel_factor_mapping_start", text="Bevel Mapping Start")
sub.prop(curve, "bevel_factor_mapping_end", text="End")
class DATA_PT_pathanim(CurveButtonsPanelCurve, Panel):
@ -218,6 +223,7 @@ class DATA_PT_pathanim(CurveButtonsPanelCurve, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
curve = context.curve
@ -228,8 +234,9 @@ class DATA_PT_pathanim(CurveButtonsPanelCurve, Panel):
col.prop(curve, "eval_time")
# these are for paths only
row = layout.row()
row.prop(curve, "use_path_follow")
col.separator()
col.prop(curve, "use_path_follow")
class DATA_PT_active_spline(CurveButtonsPanelActive, Panel):
@ -237,65 +244,64 @@ class DATA_PT_active_spline(CurveButtonsPanelActive, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
curve = context.curve
act_spline = curve.splines.active
is_surf = type(curve) is SurfaceCurve
is_poly = (act_spline.type == 'POLY')
split = layout.split()
col = layout.column()
if is_poly:
# These settings are below but its easier to have
# polys set aside since they use so few settings
row = layout.row()
row.label(text="Cyclic:")
row.prop(act_spline, "use_cyclic_u", text="U")
layout.prop(act_spline, "use_smooth")
col.prop(act_spline, "use_cyclic_u")
col.prop(act_spline, "use_smooth")
else:
col = split.column()
col.label(text="Cyclic:")
if act_spline.type == 'NURBS':
col.label(text="Bezier:")
col.label(text="Endpoint:")
col.label(text="Order:")
col.label(text="Resolution:")
col = split.column()
col.prop(act_spline, "use_cyclic_u", text="U")
if act_spline.type == 'NURBS':
sub = col.column()
# sub.active = (not act_spline.use_cyclic_u)
sub.prop(act_spline, "use_bezier_u", text="U")
sub.prop(act_spline, "use_endpoint_u", text="U")
sub = col.column()
sub.prop(act_spline, "order_u", text="U")
col.prop(act_spline, "resolution_u", text="U")
sub = col.column(align=True)
sub.prop(act_spline, "use_cyclic_u")
if is_surf:
col = split.column()
col.prop(act_spline, "use_cyclic_v", text="V")
sub.prop(act_spline, "use_cyclic_v", text="V")
# its a surface, assume its a nurbs
sub = col.column()
sub.active = (not act_spline.use_cyclic_v)
sub.prop(act_spline, "use_bezier_v", text="V")
sub.prop(act_spline, "use_endpoint_v", text="V")
sub = col.column()
sub.prop(act_spline, "order_v", text="V")
if act_spline.type == 'NURBS':
sub = col.column(align=True)
# sub.active = (not act_spline.use_cyclic_u)
sub.prop(act_spline, "use_bezier_u", text="Bezier U")
if is_surf:
subsub = sub.column()
subsub.active = (not act_spline.use_cyclic_v)
subsub.prop(act_spline, "use_bezier_v", text="V")
sub = col.column(align=True)
sub.prop(act_spline, "use_endpoint_u", text="Endpoint U")
if is_surf:
subsub = sub.column()
subsub.active = (not act_spline.use_cyclic_v)
subsub.prop(act_spline, "use_endpoint_v", text="V")
sub = col.column(align=True)
sub.prop(act_spline, "order_u", text="Order U")
if is_surf:
sub.prop(act_spline, "order_v", text="V")
sub = col.column(align=True)
sub.prop(act_spline, "resolution_u", text="Resolution U")
if is_surf:
sub.prop(act_spline, "resolution_v", text="V")
if act_spline.type == 'BEZIER':
col = layout.column()
col.label(text="Interpolation:")
col.separator()
sub = col.column()
sub.active = (curve.dimensions == '3D')
sub.prop(act_spline, "tilt_interpolation", text="Tilt")
sub.prop(act_spline, "tilt_interpolation", text="Interpolation Tilt")
col.prop(act_spline, "radius_interpolation", text="Radius")
@ -324,42 +330,36 @@ class DATA_PT_font(CurveButtonsPanelText, Panel):
row.label(text="Bold & Italic")
row.template_ID(text, "font_bold_italic", open="font.open", unlink="font.unlink")
layout.separator()
row = layout.row(align=True)
row.prop(char, "use_bold", toggle=True)
row.prop(char, "use_italic", toggle=True)
row.prop(char, "use_underline", toggle=True)
row.prop(char, "use_small_caps", toggle=True)
layout.use_property_split = True
# layout.prop(text, "font")
split = layout.split()
col = layout.column()
col.separator()
col = split.column()
col.prop(text, "size", text="Size")
col = split.column()
col.prop(text, "shear")
split = layout.split()
col.separator()
col = split.column()
col.label(text="Object Font:")
col.prop(text, "family", text="")
col.prop(text, "family")
col.prop(text, "follow_curve")
col = split.column()
col.label(text="Text on Curve:")
col.prop(text, "follow_curve", text="")
col.separator()
split = layout.split()
col = split.column()
sub = col.column(align=True)
sub.label(text="Underline:")
sub.prop(text, "underline_position", text="Position")
sub.prop(text, "underline_height", text="Thickness")
sub.prop(text, "underline_position", text="Underline Position")
sub.prop(text, "underline_height", text="Underline Thickness")
col = split.column()
col.label(text="Character:")
col.prop(char, "use_bold")
col.prop(char, "use_italic")
col.prop(char, "use_underline")
row = layout.row()
row.prop(text, "small_caps_scale", text="Small Caps")
row.prop(char, "use_small_caps")
col.prop(text, "small_caps_scale", text="Small Caps Scale")
class DATA_PT_paragraph(CurveButtonsPanelText, Panel):
@ -370,23 +370,21 @@ class DATA_PT_paragraph(CurveButtonsPanelText, Panel):
text = context.curve
layout.label(text="Horizontal Alignment:")
layout.label(text="Alignment")
layout.row().prop(text, "align_x", expand=True)
layout.label(text="Vertical Alignment:")
layout.row().prop(text, "align_y", expand=True)
split = layout.split()
layout.use_property_split = True
col = split.column(align=True)
col.label(text="Spacing:")
col.prop(text, "space_character", text="Letter")
col.prop(text, "space_word", text="Word")
col.prop(text, "space_line", text="Line")
col = layout.column(align=True)
col.prop(text, "space_character", text="Character Spacing")
col.prop(text, "space_word", text="Word Spacing")
col.prop(text, "space_line", text="Line Spacing")
col = split.column(align=True)
col.label(text="Offset:")
col.prop(text, "offset_x", text="X")
layout.separator()
col = layout.column(align=True)
col.prop(text, "offset_x", text="Offset X")
col.prop(text, "offset_y", text="Y")
@ -398,10 +396,7 @@ class DATA_PT_text_boxes(CurveButtonsPanelText, Panel):
text = context.curve
split = layout.split()
col = split.column()
col.operator("font.textbox_add", icon='ZOOMIN')
col = split.column()
layout.operator("font.textbox_add", icon='ZOOMIN')
for i, box in enumerate(text.text_boxes):
@ -409,19 +404,16 @@ class DATA_PT_text_boxes(CurveButtonsPanelText, Panel):
row = boxy.row()
split = row.split()
col = row.column()
col.use_property_split = True
col = split.column(align=True)
sub = col.column(align=True)
sub.prop(box, "width", text="Size X")
sub.prop(box, "height", text="Y")
col.label(text="Dimensions:")
col.prop(box, "width", text="Width")
col.prop(box, "height", text="Height")
col = split.column(align=True)
col.label(text="Offset:")
col.prop(box, "x", text="X")
col.prop(box, "y", text="Y")
sub = col.column(align=True)
sub.prop(box, "x", text="Offset X")
sub.prop(box, "y", text="Y")
row.operator("font.textbox_remove", text="", icon='X', emboss=False).index = i

@ -36,10 +36,11 @@ class DATA_PT_empty(DataButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
ob = context.object
layout.prop(ob, "empty_draw_type", text="Display")
layout.prop(ob, "empty_draw_type", text="Display As")
if ob.empty_draw_type == 'IMAGE':
layout.template_ID(ob, "data", open="image.open", unlink="object.unlink_data")
@ -49,9 +50,11 @@ class DATA_PT_empty(DataButtonsPanel, Panel):
row = layout.row(align=True)
layout.prop(ob, "color", text="Transparency", index=3, slider=True)
row = layout.row(align=True)
row.prop(ob, "empty_image_offset", text="Offset X", index=0)
row.prop(ob, "empty_image_offset", text="Offset Y", index=1)
col = layout.col(align=True)
col.prop(ob, "empty_image_offset", text="Offset X", index=0)
col.prop(ob, "empty_image_offset", text="Y", index=1)
layout.separator()
layout.prop(ob, "empty_draw_size", text="Size")

@ -80,27 +80,27 @@ class DATA_PT_lamp(DataButtonsPanel, Panel):
layout.row().prop(lamp, "type", expand=True)
split = layout.split()
layout.use_property_split = True
col = split.column()
sub = col.column()
sub.prop(lamp, "color", text="")
sub.prop(lamp, "energy")
col = col.column()
col.prop(lamp, "color")
col.prop(lamp, "energy")
if lamp.type in {'POINT', 'SPOT'}:
sub.label(text="Falloff:")
sub.prop(lamp, "falloff_type", text="")
sub.prop(lamp, "distance")
sub.prop(lamp, "shadow_soft_size", text="Radius")
col = col.column()
col.label(text="Falloff")
col.prop(lamp, "falloff_type")
col.prop(lamp, "distance")
col.prop(lamp, "shadow_soft_size")
if lamp.falloff_type == 'LINEAR_QUADRATIC_WEIGHTED':
col.label(text="Attenuation Factors:")
sub = col.column(align=True)
sub.prop(lamp, "linear_attenuation", slider=True, text="Linear")
sub.prop(lamp, "quadratic_attenuation", slider=True, text="Quadratic")
elif lamp.falloff_type == 'INVERSE_COEFFICIENTS':
col.label(text="Inverse Coefficients:")
col.label(text="Inverse Coefficients")
sub = col.column(align=True)
sub.prop(lamp, "constant_coefficient", text="Constant")
sub.prop(lamp, "linear_coefficient", text="Linear")
@ -119,31 +119,31 @@ class DATA_PT_EEVEE_lamp(DataButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
lamp = context.lamp
layout.row().prop(lamp, "type", expand=True)
split = layout.split()
layout.use_property_split = True
col = split.column()
sub = col.column()
sub.prop(lamp, "color", text="")
sub.prop(lamp, "energy")
col = layout.column()
col.prop(lamp, "color")
col.prop(lamp, "energy")
col.prop(lamp, "specular_factor", text="Specular")
col.separator()
if lamp.type in {'POINT', 'SPOT', 'SUN'}:
sub.prop(lamp, "shadow_soft_size", text="Radius")
col.prop(lamp, "shadow_soft_size", text="Radius")
elif lamp.type == 'AREA':
sub = sub.column(align=True)
sub.prop(lamp, "shape", text="")
if lamp.shape in {'SQUARE', 'DISK'}:
col.prop(lamp, "shape")
sub = col.column(align=True)
if lamp.shape in {'SQUARE', 'DISK'}:
sub.prop(lamp, "size")
elif lamp.shape in {'RECTANGLE', 'ELLIPSE'}:
sub.prop(lamp, "size", text="Size X")
sub.prop(lamp, "size_y", text="Size Y")
col = split.column()
col.prop(lamp, "specular_factor", text="Specular")
sub.prop(lamp, "size_y", text="Y")
class DATA_PT_EEVEE_shadow(DataButtonsPanel, Panel):
@ -162,49 +162,45 @@ class DATA_PT_EEVEE_shadow(DataButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
lamp = context.lamp
split = layout.split()
split.active = lamp.use_shadow
layout.active = lamp.use_shadow
sub = split.column()
col = sub.column(align=True)
col.prop(lamp, "shadow_buffer_clip_start", text="Clip Start")
col.prop(lamp, "shadow_buffer_clip_end", text="Clip End")
col = sub.column()
col.prop(lamp, "shadow_buffer_soft", text="Soft")
col = layout.column()
sub = col.column(align=True)
sub.prop(lamp, "shadow_buffer_clip_start", text="Clip Start")
sub.prop(lamp, "shadow_buffer_clip_end", text="End")
col.prop(lamp, "shadow_buffer_soft", text="Softness")
col.separator()
col = split.column(align=True)
col.prop(lamp, "shadow_buffer_bias", text="Bias")
col.prop(lamp, "shadow_buffer_exp", text="Exponent")
col.prop(lamp, "shadow_buffer_bleed_bias", text="Bleed Bias")
col.separator()
if lamp.type == 'SUN':
col = layout.column()
col.active = lamp.use_shadow
col.label("Cascaded Shadow Map:")
col.label("Cascaded Shadow Map")
split = col.split()
col.prop(lamp, "shadow_cascade_count", text="Count")
col.prop(lamp, "shadow_cascade_fade", text="Fade")
sub = split.column()
sub.prop(lamp, "shadow_cascade_count", text="Count")
sub.prop(lamp, "shadow_cascade_fade", text="Fade")
sub = split.column()
sub.prop(lamp, "shadow_cascade_max_distance", text="Max Distance")
sub.prop(lamp, "shadow_cascade_exponent", text="Distribution")
col.prop(lamp, "shadow_cascade_max_distance", text="Max Distance")
col.prop(lamp, "shadow_cascade_exponent", text="Distribution")
layout.separator()
layout.prop(lamp, "use_contact_shadow")
split = layout.split()
split.active = lamp.use_contact_shadow
col = split.column()
col.prop(lamp, "contact_shadow_distance", text="Distance")
col.prop(lamp, "contact_shadow_soft_size", text="Soft")
col = split.column()
col = layout.column()
col.active = lamp.use_contact_shadow
col.prop(lamp, "contact_shadow_distance", text="Distance")
col.prop(lamp, "contact_shadow_soft_size", text="Softness")
col.prop(lamp, "contact_shadow_bias", text="Bias")
col.prop(lamp, "contact_shadow_thickness", text="Thickness")
@ -282,16 +278,15 @@ class DATA_PT_spot(DataButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
lamp = context.lamp
split = layout.split()
col = layout.column()
col.prop(lamp, "spot_size", text="Size")
col.prop(lamp, "spot_blend", text="Blend", slider=True)
col = split.column()
sub = col.column()
sub.prop(lamp, "spot_size", text="Size")
sub.prop(lamp, "spot_blend", text="Blend", slider=True)
col = split.column()
col.prop(lamp, "show_cone")

@ -57,24 +57,31 @@ class DATA_PT_lattice(DataButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
lat = context.lattice
row = layout.row()
row.prop(lat, "points_u")
row.prop(lat, "interpolation_type_u", text="")
col = layout.column()
row = layout.row()
row.prop(lat, "points_v")
row.prop(lat, "interpolation_type_v", text="")
sub = col.column(align=True)
sub.prop(lat, "points_u", text="Resolution U")
sub.prop(lat, "points_v", text="V")
sub.prop(lat, "points_w", text="W")
row = layout.row()
row.prop(lat, "points_w")
row.prop(lat, "interpolation_type_w", text="")
col.separator()
row = layout.row()
row.prop(lat, "use_outside")
row.prop_search(lat, "vertex_group", context.object, "vertex_groups", text="")
sub = col.column(align=True)
sub.prop(lat, "interpolation_type_u", text="Interpolation U")
sub.prop(lat, "interpolation_type_v", text="V")
sub.prop(lat, "interpolation_type_w", text="W")
col.separator()
col.prop(lat, "use_outside")
col.separator()
col.prop_search(lat, "vertex_group", context.object, "vertex_groups")
class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, Panel):

@ -56,34 +56,32 @@ class DATA_PT_lightprobe(DataButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
ob = context.object
probe = context.lightprobe
split = layout.split()
# layout.prop(probe, "type")
if probe.type == 'GRID':
col = split.column(align=True)
col.label("Influence:")
col = layout.column()
col.prop(probe, "influence_distance", "Distance")
col.prop(probe, "falloff")
col.prop(probe, "intensity")
col.separator()
col.label("Resolution:")
col.prop(probe, "grid_resolution_x", text="X")
col.prop(probe, "grid_resolution_x", text="Resolution X")
col.prop(probe, "grid_resolution_y", text="Y")
col.prop(probe, "grid_resolution_z", text="Z")
elif probe.type == 'PLANAR':
col = split.column(align=True)
col.label("Influence:")
col = layout.column()
col.prop(probe, "influence_distance", "Distance")
col.prop(probe, "falloff")
else:
col = split.column(align=True)
col.label("Influence:")
col.prop(probe, "influence_type", text="")
col = layout.column()
col.prop(probe, "influence_type")
if probe.influence_type == 'ELIPSOID':
col.prop(probe, "influence_distance", "Radius")
@ -93,27 +91,24 @@ class DATA_PT_lightprobe(DataButtonsPanel, Panel):
col.prop(probe, "falloff")
col.prop(probe, "intensity")
col = split.column(align=True)
col.label("Clipping:")
col.prop(probe, "clip_start", text="Start")
col = layout.column()
sub = col.column()
sub.prop(probe, "clip_start", text="Clipping Start")
if probe.type != "PLANAR":
col.prop(probe, "clip_end", text="End")
sub.prop(probe, "clip_end", text="End")
if probe.type == 'GRID':
col.separator()
col.label("Visibility:")
col.label("Visibility")
col.prop(probe, "visibility_buffer_bias", "Bias")
col.prop(probe, "visibility_bleed_bias", "Bleed Bias")
col.prop(probe, "visibility_blur", "Blur")
col.separator()
col.label("Visibility Collection:")
row = col.row(align=True)
row.prop(probe, "visibility_collection", text="")
row.prop(probe, "visibility_collection")
row.prop(probe, "invert_visibility_collection", text="", icon='ARROW_LEFTRIGHT')
@ -132,14 +127,14 @@ class DATA_PT_lightprobe_parallax(DataButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
probe = context.lightprobe
col = layout.column()
col.active = probe.use_custom_parallax
row = col.row()
row.prop(probe, "parallax_type", expand=True)
col.prop(probe, "parallax_type")
if probe.parallax_type == 'ELIPSOID':
col.prop(probe, "parallax_distance", "Radius")
@ -153,31 +148,28 @@ class DATA_PT_lightprobe_display(DataButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
ob = context.object
probe = context.lightprobe
row = layout.row()
row.prop(probe, "show_data")
col = layout.column()
if probe.type != "PLANAR":
row.prop(probe, "data_draw_size", text="Size")
col.prop(probe, "data_draw_size", text="Size")
else:
row.prop(ob, "empty_draw_size", text="Arrow Size")
col.prop(ob, "empty_draw_size", text="Arrow Size")
split = layout.split()
col.prop(probe, "show_data")
if probe.type in {'GRID', 'CUBEMAP'}:
col = split.column()
col.prop(probe, "show_influence")
col = split.column()
col.prop(probe, "show_clip")
if probe.type == 'CUBEMAP':
col = split.column()
col.active = probe.use_custom_parallax
col.prop(probe, "show_parallax")
sub = col.column()
sub.active = probe.use_custom_parallax
sub.prop(probe, "show_parallax")
classes = (

@ -158,19 +158,18 @@ class DATA_PT_normals(MeshButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
mesh = context.mesh
split = layout.split()
col = layout.column()
col.prop(mesh, "show_double_sided")
col = split.column()
col.prop(mesh, "use_auto_smooth")
sub = col.column()
sub.active = mesh.use_auto_smooth and not mesh.has_custom_normals
sub.prop(mesh, "auto_smooth_angle", text="Angle")
split.prop(mesh, "show_double_sided")
class DATA_PT_texture_space(MeshButtonsPanel, Panel):
bl_label = "Texture Space"
@ -179,6 +178,7 @@ class DATA_PT_texture_space(MeshButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
mesh = context.mesh
@ -187,9 +187,9 @@ class DATA_PT_texture_space(MeshButtonsPanel, Panel):
layout.separator()
layout.prop(mesh, "use_auto_texspace")
row = layout.row()
row.column().prop(mesh, "texspace_location", text="Location")
row.column().prop(mesh, "texspace_size", text="Size")
layout.prop(mesh, "texspace_location", text="Location")
layout.prop(mesh, "texspace_size", text="Size")
class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
@ -280,6 +280,7 @@ class DATA_PT_face_maps(MeshButtonsPanel, Panel):
sub.operator("object.face_map_select", text="Select")
sub.operator("object.face_map_deselect", text="Deselect")
class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
bl_label = "Shape Keys"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'}

@ -54,23 +54,18 @@ class DATA_PT_metaball(DataButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
mball = context.meta_ball
split = layout.split()
col = split.column()
col = layout.column()
col.label(text="Resolution:")
sub = col.column(align=True)
sub.prop(mball, "resolution", text="View")
sub.prop(mball, "resolution", text="Resolution View")
sub.prop(mball, "render_resolution", text="Render")
col = split.column()
col.label(text="Settings:")
col.prop(mball, "threshold", text="Threshold")
layout.label(text="Update:")
layout.row().prop(mball, "update_method", expand=True)
col.prop(mball, "update_method")
class DATA_PT_mball_texture_space(DataButtonsPanel, Panel):
@ -80,14 +75,15 @@ class DATA_PT_mball_texture_space(DataButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
mball = context.meta_ball
layout.prop(mball, "use_auto_texspace")
row = layout.row()
row.column().prop(mball, "texspace_location", text="Location")
row.column().prop(mball, "texspace_size", text="Size")
col = layout.column()
col.prop(mball, "texspace_location")
col.prop(mball, "texspace_size")
class DATA_PT_metaball_element(DataButtonsPanel, Panel):
@ -99,35 +95,33 @@ class DATA_PT_metaball_element(DataButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
metaelem = context.meta_ball.elements.active
layout.prop(metaelem, "type")
col = layout.column()
split = layout.split()
col.prop(metaelem, "type")
col.separator()
col = split.column(align=True)
col.label(text="Settings:")
col.prop(metaelem, "stiffness", text="Stiffness")
col.prop(metaelem, "use_negative", text="Negative")
col.prop(metaelem, "hide", text="Hide")
col = split.column(align=True)
sub = col.column(align=True)
if metaelem.type in {'CUBE', 'ELLIPSOID'}:
col.label(text="Size:")
col.prop(metaelem, "size_x", text="X")
col.prop(metaelem, "size_y", text="Y")
col.prop(metaelem, "size_z", text="Z")
sub.prop(metaelem, "size_x", text="Size X")
sub.prop(metaelem, "size_y", text="Y")
sub.prop(metaelem, "size_z", text="Z")
elif metaelem.type == 'TUBE':
col.label(text="Size:")
col.prop(metaelem, "size_x", text="X")
sub.prop(metaelem, "size_x", text="Size X")
elif metaelem.type == 'PLANE':
col.label(text="Size:")
col.prop(metaelem, "size_x", text="X")
col.prop(metaelem, "size_y", text="Y")
sub.prop(metaelem, "size_x", text="Size X")
sub.prop(metaelem, "size_y", text="Y")
class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, Panel):

@ -168,7 +168,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
if bpy.app.debug:
layout.prop(md, "debug_options")
def BUILD(self, layout, ob, md):
split = layout.split()
@ -328,8 +327,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
row.prop(md, "delimit")
layout_info = layout
layout_info.label(text=iface_("Face Count: {:,}".format(md.face_count)),
translate=False)
layout_info.label(
text=iface_("Face Count: {:,}".format(md.face_count)),
translate=False,
)
def DISPLACE(self, layout, ob, md):
has_texture = (md.texture is not None)

@ -62,14 +62,16 @@ class DATA_PT_speaker(DataButtonsPanel, Panel):
speaker = context.speaker
split = layout.split(percentage=0.75)
layout.template_ID(speaker, "sound", open="sound.open_mono")
split.template_ID(speaker, "sound", open="sound.open_mono")
split.prop(speaker, "muted")
layout.use_property_split = True
row = layout.row()
row.prop(speaker, "volume")
row.prop(speaker, "pitch")
layout.prop(speaker, "muted")
col = layout.column()
col.active = not speaker.muted
col.prop(speaker, "volume", slider=True)
col.prop(speaker, "pitch")
class DATA_PT_distance(DataButtonsPanel, Panel):
@ -79,20 +81,20 @@ class DATA_PT_distance(DataButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
speaker = context.speaker
layout.active = not speaker.muted
split = layout.split()
col = split.column()
col.label("Volume:")
col.prop(speaker, "volume_min", text="Minimum")
col.prop(speaker, "volume_max", text="Maximum")
col = layout.column()
sub = col.column(align=True)
sub.prop(speaker, "volume_min", slider=True, text="Volume Min")
sub.prop(speaker, "volume_max", slider=True, text="Max")
col.prop(speaker, "attenuation")
col = split.column()
col.label("Distance:")
col.prop(speaker, "distance_max", text="Maximum")
col.prop(speaker, "distance_reference", text="Reference")
col.separator()
col.prop(speaker, "distance_max", text="Max Distance")
col.prop(speaker, "distance_reference", text="Distance Reference")
class DATA_PT_cone(DataButtonsPanel, Panel):
@ -102,18 +104,20 @@ class DATA_PT_cone(DataButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
layout.use_property_split = True
speaker = context.speaker
layout.active = not speaker.muted
split = layout.split()
col = layout.column()
col = split.column()
col.label("Angle:")
col.prop(speaker, "cone_angle_outer", text="Outer")
col.prop(speaker, "cone_angle_inner", text="Inner")
sub = col.column(align=True)
sub.prop(speaker, "cone_angle_outer", text="Angle Outer")
sub.prop(speaker, "cone_angle_inner", text="Inner")
col = split.column()
col.label("Volume:")
col.prop(speaker, "cone_volume_outer", text="Outer")
col.separator()
col.prop(speaker, "cone_volume_outer", slider=True)
class DATA_PT_custom_props_speaker(DataButtonsPanel, PropertyPanel, Panel):

@ -19,8 +19,8 @@
# <pep8 compliant>
import bpy
from bpy.types import (
Panel,
)
Panel,
)
from rna_prop_ui import PropertyPanel
@ -51,7 +51,7 @@ class WORKSPACE_PT_owner_ids(WorkSpaceButtonsPanel, Panel):
import addon_utils
addon_map = {mod.__name__: mod for mod in addon_utils.modules()}
owner_ids = {owner_id.name for owner_id in workspace.owner_ids}
owner_ids = {owner_id.name for owner_id in workspace.owner_ids}
for addon in userpref.addons:
module_name = addon.module
@ -85,7 +85,6 @@ class WORKSPACE_PT_owner_ids(WorkSpaceButtonsPanel, Panel):
row.label(module_name)
class WORKSPACE_PT_custom_props(WorkSpaceButtonsPanel, PropertyPanel, Panel):
_context_path = "workspace"
_property_type = bpy.types.WorkSpace
@ -100,4 +99,3 @@ if __name__ == "__main__": # only for live edit.
from bpy.utils import register_class
for cls in classes:
register_class(cls)

@ -157,6 +157,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel, Panel):
col.prop(scene, "frame_step", text="Step")
col = layout.split(percentage=0.5)
col.alignment = 'RIGHT'
col.label(text="Frame Rate")
self.draw_framerate(col, rd)