Implemented single column UI for textures, curve, mesh and empty.

Reverted 24524 materials change because it it made greying out not work correctly.
This commit is contained in:
William Reynish 2009-11-12 15:41:44 +00:00
parent 17b6dfa499
commit fbb2c38485
5 changed files with 263 additions and 107 deletions

View File

@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
narrowui = 180
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
@ -54,16 +55,20 @@ class DATA_PT_context_curve(DataButtonsPanel):
ob = context.object
curve = context.curve
space = context.space_data
col2 = context.region.width > narrowui
split = layout.split(percentage=0.65)
if ob:
split.template_ID(ob, "data")
split.itemS()
elif curve:
split.template_ID(space, "pin_id")
split.itemS()
if col2:
split = layout.split(percentage=0.65)
if ob:
split.template_ID(ob, "data")
split.itemS()
elif curve:
split.template_ID(space, "pin_id")
split.itemS()
else:
layout.template_ID(ob, "data")
class DATA_PT_shape_curve(DataButtonsPanel):
bl_label = "Shape"
@ -74,6 +79,7 @@ class DATA_PT_shape_curve(DataButtonsPanel):
ob = context.object
curve = context.curve
space = context.space_data
col2 = context.region.width > narrowui
is_surf = (ob.type == 'SURFACE')
if not is_surf:
@ -96,7 +102,8 @@ class DATA_PT_shape_curve(DataButtonsPanel):
# col.itemR(curve, "uv_orco")
col.itemR(curve, "auto_texspace")
col = split.column()
if col2:
col = split.column()
col.itemL(text="Resolution:")
sub = col.column(align=True)
sub.itemR(curve, "resolution_u", text="Preview U")
@ -108,14 +115,14 @@ class DATA_PT_shape_curve(DataButtonsPanel):
sub.itemR(curve, "render_resolution_v", text="Render V")
# XXX - put somewhere nicer.
row = layout.row()
row.itemR(curve, "twist_mode")
row.itemR(curve, "twist_smooth") # XXX - may not be kept
split = layout.split()
# col.itemL(text="Display:")
# col.itemL(text="HANDLES")
# col.itemL(text="NORMALS")
# col.itemR(curve, "vertex_normal_flip")
col = split.column()
col.itemR(curve, "twist_mode", text="Twist")
if col2:
col = split.column()
col.itemR(curve, "twist_smooth") # XXX - may not be kept
class DATA_PT_geometry_curve(DataButtonsPanel):
@ -125,6 +132,7 @@ class DATA_PT_geometry_curve(DataButtonsPanel):
layout = self.layout
curve = context.curve
col2 = context.region.width > narrowui
split = layout.split()
@ -135,7 +143,8 @@ class DATA_PT_geometry_curve(DataButtonsPanel):
col.itemL(text="Taper Object:")
col.itemR(curve, "taper_object", text="")
col = split.column()
if col2:
col = split.column()
col.itemL(text="Bevel:")
col.itemR(curve, "bevel_depth", text="Depth")
col.itemR(curve, "bevel_resolution", text="Resolution")
@ -155,6 +164,7 @@ class DATA_PT_pathanim(DataButtonsPanelCurve):
layout = self.layout
curve = context.curve
col2 = context.region.width > narrowui
layout.active = curve.use_path
@ -164,7 +174,8 @@ class DATA_PT_pathanim(DataButtonsPanelCurve):
col.itemR(curve, "path_length", text="Frames")
col.itemR(curve, "use_path_follow")
col = split.column()
if col2:
col = split.column()
col.itemR(curve, "use_stretch")
col.itemR(curve, "use_radius")
col.itemR(curve, "use_time_offset", text="Offset Children")

View File

@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
narrowui = 180
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
@ -36,8 +37,12 @@ class DATA_PT_empty(DataButtonsPanel):
layout = self.layout
ob = context.object
col2 = context.region.width > narrowui
layout.itemR(ob, "empty_draw_type", text="Display")
if col2:
layout.itemR(ob, "empty_draw_type", text="Display")
else:
layout.itemR(ob, "empty_draw_type", text="")
layout.itemR(ob, "empty_draw_size", text="Size")
bpy.types.register(DATA_PT_empty)

View File

@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
narrowui = 180
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
@ -57,6 +58,7 @@ class DATA_PT_normals(DataButtonsPanel):
layout = self.layout
mesh = context.mesh
col2 = context.region.width > narrowui
split = layout.split()
@ -66,7 +68,10 @@ class DATA_PT_normals(DataButtonsPanel):
sub.active = mesh.autosmooth
sub.itemR(mesh, "autosmooth_angle", text="Angle")
col = split.column()
if col2:
col = split.column()
else:
col.itemS()
col.itemR(mesh, "vertex_normal_flip")
col.itemR(mesh, "double_sided")
@ -142,6 +147,7 @@ class DATA_PT_shape_keys(DataButtonsPanel):
ob = context.object
key = ob.data.shape_keys
kb = ob.active_shape_key
col2 = context.region.width > narrowui
enable_edit = ob.mode != 'EDIT'
enable_edit_value = False
@ -173,11 +179,17 @@ class DATA_PT_shape_keys(DataButtonsPanel):
split = layout.split(percentage=0.4)
row = split.row()
row.enabled = enable_edit
row.itemR(key, "relative")
if col2:
row.itemR(key, "relative")
row = split.row()
row.alignment = 'RIGHT'
if not col2:
layout.itemR(key, "relative")
row = layout.row()
sub = row.row(align=True)
subsub = sub.row(align=True)
subsub.active = enable_edit_value
@ -213,7 +225,8 @@ class DATA_PT_shape_keys(DataButtonsPanel):
col.itemR(kb, "slider_min", text="Min")
col.itemR(kb, "slider_max", text="Max")
col = split.column(align=True)
if col2:
col = split.column(align=True)
col.active = enable_edit_value
col.itemL(text="Blend:")
col.item_pointerR(kb, "vertex_group", ob, "vertex_groups", text="")

View File

@ -137,7 +137,8 @@ class MATERIAL_PT_shading(MaterialButtonsPanel):
sub.active = not mat.shadeless
sub.itemR(mat, "emit")
sub.itemR(mat, "ambient")
col.itemR(mat, "translucency")
sub = col.column()
sub.itemR(mat, "translucency")
if col2:
col = split.column()

View File

@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
narrowui = 180
def active_node_mat(mat):
if mat:
@ -87,7 +88,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel):
layout = self.layout
tex = context.texture
col2 = context.region.width > narrowui
idblock = context_tex_datablock(context)
space = context.space_data
@ -102,12 +103,16 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel):
col.item_enumO("texture.slot_move", "type", 'DOWN', text="", icon='ICON_TRIA_DOWN')
split = layout.split(percentage=0.65)
if idblock:
split.template_ID(idblock, "active_texture", new="texture.new")
elif tex:
split.template_ID(space, "pin_id")
if col2:
split = layout.split(percentage=0.65)
if idblock:
split.template_ID(idblock, "active_texture", new="texture.new")
elif tex:
split.template_ID(space, "pin_id")
else:
layout.template_ID(idblock, "active_texture", new="texture.new")
if (not space.pin_id) and (
context.sculpt_object or
@ -130,8 +135,11 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel):
split.itemR(slot, "output_node", text="")
else:
split.itemL(text="Type:")
split.itemR(tex, "type", text="")
if col2:
split.itemL(text="Type:")
split.itemR(tex, "type", text="")
else:
layout.itemR(tex, "type", text="")
class TEXTURE_PT_colors(TextureButtonsPanel):
@ -142,6 +150,7 @@ class TEXTURE_PT_colors(TextureButtonsPanel):
layout = self.layout
tex = context.texture
col2 = context.region.width > narrowui
layout.itemR(tex, "use_color_ramp", text="Ramp")
if tex.use_color_ramp:
@ -156,7 +165,8 @@ class TEXTURE_PT_colors(TextureButtonsPanel):
sub.itemR(tex, "factor_green", text="G")
sub.itemR(tex, "factor_blue", text="B")
col = split.column()
if col2:
col = split.column()
col.itemL(text="Adjust:")
col.itemR(tex, "brightness")
col.itemR(tex, "contrast")
@ -181,6 +191,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel):
tex = context.texture_slot
textype = context.texture
col2 = context.region.width > narrowui
if type(idblock) != bpy.types.Brush:
split = layout.split(percentage=0.3)
@ -234,19 +245,25 @@ class TEXTURE_PT_mapping(TextureSlotPanel):
col.itemR(tex, "from_dupli")
elif tex.texture_coordinates == 'OBJECT':
col.itemR(tex, "from_original")
else:
elif col2:
col.itemL()
col = split.column()
if col2:
col = split.column()
row = col.row()
row.itemR(tex, "x_mapping", text="")
row.itemR(tex, "y_mapping", text="")
row.itemR(tex, "z_mapping", text="")
# any non brush
row = layout.row()
row.column().itemR(tex, "offset")
row.column().itemR(tex, "size")
split = layout.split()
col = split.column()
col.itemR(tex, "offset")
if col2:
col = split.column()
col.itemR(tex, "size")
class TEXTURE_PT_influence(TextureSlotPanel):
@ -263,6 +280,7 @@ class TEXTURE_PT_influence(TextureSlotPanel):
textype = context.texture
tex = context.texture_slot
col2 = context.region.width > narrowui
def factor_but(layout, active, toggle, factor, name):
row = layout.row(align=True)
@ -287,7 +305,8 @@ class TEXTURE_PT_influence(TextureSlotPanel):
factor_but(col, tex.map_colorspec, "map_colorspec", "colorspec_factor", "Color")
factor_but(col, tex.map_hardness, "map_hardness", "hardness_factor", "Hardness")
col = split.column()
if col2:
col = split.column()
col.itemL(text="Shading:")
factor_but(col, tex.map_ambient, "map_ambient", "ambient_factor", "Ambient")
factor_but(col, tex.map_emit, "map_emit", "emit_factor", "Emit")
@ -311,16 +330,22 @@ class TEXTURE_PT_influence(TextureSlotPanel):
factor_but(col, tex.map_scattering, "map_scattering", "scattering_factor", "Scattering")
factor_but(col, tex.map_reflection, "map_reflection", "reflection_factor", "Reflection")
col = split.column()
col.itemL(text=" ")
if col2:
col = split.column()
col.itemL(text=" ")
factor_but(col, tex.map_alpha, "map_coloremission", "coloremission_factor", "Emission Color")
factor_but(col, tex.map_colortransmission, "map_colortransmission", "colortransmission_factor", "Transmission Color")
factor_but(col, tex.map_colorreflection, "map_colorreflection", "colorreflection_factor", "Reflection Color")
elif type(idblock) == bpy.types.Lamp:
row = layout.row()
factor_but(row, tex.map_color, "map_color", "color_factor", "Color")
factor_but(row, tex.map_shadow, "map_shadow", "shadow_factor", "Shadow")
split = layout.split()
col = split.column()
factor_but(col, tex.map_color, "map_color", "color_factor", "Color")
if col2:
col = split.column()
factor_but(col, tex.map_shadow, "map_shadow", "shadow_factor", "Shadow")
elif type(idblock) == bpy.types.World:
split = layout.split()
@ -329,7 +354,8 @@ class TEXTURE_PT_influence(TextureSlotPanel):
factor_but(col, tex.map_blend, "map_blend", "blend_factor", "Blend")
factor_but(col, tex.map_horizon, "map_horizon", "horizon_factor", "Horizon")
col = split.column()
if col2:
col = split.column()
factor_but(col, tex.map_zenith_up, "map_zenith_up", "zenith_up_factor", "Zenith Up")
factor_but(col, tex.map_zenith_down, "map_zenith_down", "zenith_down_factor", "Zenith Down")
@ -344,7 +370,8 @@ class TEXTURE_PT_influence(TextureSlotPanel):
sub.active = tex.rgb_to_intensity
sub.itemR(tex, "color", text="")
col = split.column()
if col2:
col = split.column()
col.itemR(tex, "negate", text="Negative")
col.itemR(tex, "stencil")
@ -369,16 +396,25 @@ class TEXTURE_PT_clouds(TextureTypePanel):
layout = self.layout
tex = context.texture
col2 = context.region.width > narrowui
layout.itemR(tex, "stype", expand=True)
layout.itemL(text="Noise:")
layout.itemR(tex, "noise_type", text="Type", expand=True)
layout.itemR(tex, "noise_basis", text="Basis")
if col2:
layout.itemR(tex, "noise_basis", text="Basis")
else:
layout.itemR(tex, "noise_basis", text="")
flow = layout.column_flow()
flow.itemR(tex, "noise_size", text="Size")
flow.itemR(tex, "noise_depth", text="Depth")
flow.itemR(tex, "nabla", text="Nabla")
split = layout.split()
col = split.column()
col.itemR(tex, "noise_size", text="Size")
col.itemR(tex, "noise_depth", text="Depth")
if col2:
col = split.column()
col.itemR(tex, "nabla", text="Nabla")
class TEXTURE_PT_wood(TextureTypePanel):
@ -389,21 +425,32 @@ class TEXTURE_PT_wood(TextureTypePanel):
layout = self.layout
tex = context.texture
col2 = context.region.width > narrowui
layout.itemR(tex, "noisebasis2", expand=True)
layout.itemR(tex, "stype", expand=True)
if col2:
layout.itemR(tex, "stype", expand=True)
else:
layout.itemR(tex, "stype", text="")
col = layout.column()
col.active = tex.stype in ('RINGNOISE', 'BANDNOISE')
col.itemL(text="Noise:")
col.row().itemR(tex, "noise_type", text="Type", expand=True)
col.itemR(tex, "noise_basis", text="Basis")
if col2:
layout.itemR(tex, "noise_basis", text="Basis")
else:
layout.itemR(tex, "noise_basis", text="")
flow = layout.column_flow()
flow.active = tex.stype in ('RINGNOISE', 'BANDNOISE')
flow.itemR(tex, "noise_size", text="Size")
flow.itemR(tex, "turbulence")
flow.itemR(tex, "nabla")
split = layout.split()
split.active = tex.stype in ('RINGNOISE', 'BANDNOISE')
col = split.column()
col.itemR(tex, "noise_size", text="Size")
col.itemR(tex, "turbulence")
col = split.column()
col.itemR(tex, "nabla")
class TEXTURE_PT_marble(TextureTypePanel):
@ -414,18 +461,27 @@ class TEXTURE_PT_marble(TextureTypePanel):
layout = self.layout
tex = context.texture
col2 = context.region.width > narrowui
layout.itemR(tex, "stype", expand=True)
layout.itemR(tex, "noisebasis2", expand=True)
layout.itemL(text="Noise:")
layout.itemR(tex, "noise_type", text="Type", expand=True)
layout.itemR(tex, "noise_basis", text="Basis")
if col2:
layout.itemR(tex, "noise_basis", text="Basis")
else:
layout.itemR(tex, "noise_basis", text="")
flow = layout.column_flow()
flow.itemR(tex, "noise_size", text="Size")
flow.itemR(tex, "noise_depth", text="Depth")
flow.itemR(tex, "turbulence")
flow.itemR(tex, "nabla")
split = layout.split()
col = split.column()
col.itemR(tex, "noise_size", text="Size")
col.itemR(tex, "noise_depth", text="Depth")
if col2:
col = split.column()
col.itemR(tex, "turbulence")
col.itemR(tex, "nabla")
class TEXTURE_PT_magic(TextureTypePanel):
@ -436,10 +492,16 @@ class TEXTURE_PT_magic(TextureTypePanel):
layout = self.layout
tex = context.texture
col2 = context.region.width > narrowui
row = layout.row()
row.itemR(tex, "noise_depth", text="Depth")
row.itemR(tex, "turbulence")
split = layout.split()
col = split.column()
col.itemR(tex, "noise_depth", text="Depth")
if col2:
col = split.column()
col.itemR(tex, "turbulence")
class TEXTURE_PT_blend(TextureTypePanel):
@ -450,8 +512,13 @@ class TEXTURE_PT_blend(TextureTypePanel):
layout = self.layout
tex = context.texture
col2 = context.region.width > narrowui
layout.itemR(tex, "progression")
if col2:
layout.itemR(tex, "progression")
else:
layout.itemR(tex, "progression", text="")
sub = layout.row()
sub.active = (tex.progression in ('LINEAR', 'QUADRATIC', 'EASING', 'RADIAL'))
@ -466,15 +533,24 @@ class TEXTURE_PT_stucci(TextureTypePanel):
layout = self.layout
tex = context.texture
col2 = context.region.width > narrowui
layout.itemR(tex, "stype", expand=True)
layout.itemL(text="Noise:")
layout.itemR(tex, "noise_type", text="Type", expand=True)
layout.itemR(tex, "noise_basis", text="Basis")
if col2:
layout.itemR(tex, "noise_basis", text="Basis")
else:
layout.itemR(tex, "noise_basis", text="")
row = layout.row()
row.itemR(tex, "noise_size", text="Size")
row.itemR(tex, "turbulence")
split = layout.split()
col = split.column()
col.itemR(tex, "noise_size", text="Size")
if col2:
col = split.column()
col.itemR(tex, "turbulence")
class TEXTURE_PT_image(TextureTypePanel):
@ -499,6 +575,7 @@ class TEXTURE_PT_image_sampling(TextureTypePanel):
tex = context.texture
slot = context.texture_slot
col2 = context.region.width > narrowui
split = layout.split()
@ -507,11 +584,13 @@ class TEXTURE_PT_image_sampling(TextureTypePanel):
col.itemR(tex, "use_alpha", text="Use")
col.itemR(tex, "calculate_alpha", text="Calculate")
col.itemR(tex, "invert_alpha", text="Invert")
col.itemS()
col.itemR(tex, "flip_axis", text="Flip X/Y Axis")
col.itemL(text="Flip:")
col.itemR(tex, "flip_axis", text="X/Y Axis")
col = split.column()
if col2:
col = split.column()
else:
col.itemS()
col.itemR(tex, "normal_map")
row = col.row()
row.active = tex.normal_map
@ -544,8 +623,12 @@ class TEXTURE_PT_image_mapping(TextureTypePanel):
layout = self.layout
tex = context.texture
col2 = context.region.width > narrowui
layout.itemR(tex, "extension")
if col2:
layout.itemR(tex, "extension")
else:
layout.itemR(tex, "extension", text="")
split = layout.split()
@ -555,7 +638,8 @@ class TEXTURE_PT_image_mapping(TextureTypePanel):
col.itemR(tex, "repeat_x", text="X")
col.itemR(tex, "repeat_y", text="Y")
col = split.column(align=True)
if col2:
col = split.column(align=True)
col.itemL(text="Mirror:")
col.itemR(tex, "mirror_x", text="X")
col.itemR(tex, "mirror_y", text="Y")
@ -566,8 +650,11 @@ class TEXTURE_PT_image_mapping(TextureTypePanel):
row = col.row()
row.itemR(tex, "checker_even", text="Even")
row.itemR(tex, "checker_odd", text="Odd")
split.itemR(tex, "checker_distance", text="Distance")
if col2:
col = split.column()
col.itemR(tex, "checker_distance", text="Distance")
layout.itemS()
split = layout.split()
@ -578,7 +665,8 @@ class TEXTURE_PT_image_mapping(TextureTypePanel):
col.itemR(tex, "crop_min_x", text="X")
col.itemR(tex, "crop_min_y", text="Y")
col = split.column(align=True)
if col2:
col = split.column(align=True)
col.itemL(text="Crop Maximum:")
col.itemR(tex, "crop_max_x", text="X")
col.itemR(tex, "crop_max_y", text="Y")
@ -616,8 +704,12 @@ class TEXTURE_PT_musgrave(TextureTypePanel):
layout = self.layout
tex = context.texture
col2 = context.region.width > narrowui
layout.itemR(tex, "musgrave_type")
if col2:
layout.itemR(tex, "musgrave_type")
else:
layout.itemR(tex, "musgrave_type", text="")
split = layout.split()
@ -626,7 +718,8 @@ class TEXTURE_PT_musgrave(TextureTypePanel):
col.itemR(tex, "lacunarity")
col.itemR(tex, "octaves")
col = split.column()
if col2:
col = split.column()
if (tex.musgrave_type in ('HETERO_TERRAIN', 'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL')):
col.itemR(tex, "offset")
if (tex.musgrave_type in ('RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL')):
@ -635,11 +728,19 @@ class TEXTURE_PT_musgrave(TextureTypePanel):
layout.itemL(text="Noise:")
layout.itemR(tex, "noise_basis", text="Basis")
if col2:
layout.itemR(tex, "noise_basis", text="Basis")
else:
layout.itemR(tex, "noise_basis", text="")
row = layout.row()
row.itemR(tex, "noise_size", text="Size")
row.itemR(tex, "nabla")
split = layout.split()
col = split.column()
col.itemR(tex, "noise_size", text="Size")
if col2:
col = split.column()
col.itemR(tex, "nabla")
class TEXTURE_PT_voronoi(TextureTypePanel):
@ -650,6 +751,7 @@ class TEXTURE_PT_voronoi(TextureTypePanel):
layout = self.layout
tex = context.texture
col2 = context.region.width > narrowui
split = layout.split()
@ -663,18 +765,25 @@ class TEXTURE_PT_voronoi(TextureTypePanel):
col.itemR(tex, "coloring", text="")
col.itemR(tex, "noise_intensity", text="Intensity")
col = split.column(align=True)
col.itemL(text="Feature Weights:")
col.itemR(tex, "weight_1", text="1", slider=True)
col.itemR(tex, "weight_2", text="2", slider=True)
col.itemR(tex, "weight_3", text="3", slider=True)
col.itemR(tex, "weight_4", text="4", slider=True)
if col2:
col = split.column()
sub = col.column(align=True)
sub.itemL(text="Feature Weights:")
sub.itemR(tex, "weight_1", text="1", slider=True)
sub.itemR(tex, "weight_2", text="2", slider=True)
sub.itemR(tex, "weight_3", text="3", slider=True)
sub.itemR(tex, "weight_4", text="4", slider=True)
layout.itemL(text="Noise:")
row = layout.row()
row.itemR(tex, "noise_size", text="Size")
row.itemR(tex, "nabla")
split = layout.split()
col = split.column()
col.itemR(tex, "noise_size", text="Size")
if col2:
col = split.column()
col.itemR(tex, "nabla")
class TEXTURE_PT_distortednoise(TextureTypePanel):
@ -685,14 +794,24 @@ class TEXTURE_PT_distortednoise(TextureTypePanel):
layout = self.layout
tex = context.texture
col2 = context.region.width > narrowui
layout.itemR(tex, "noise_distortion")
layout.itemR(tex, "noise_basis", text="Basis")
if col2:
layout.itemR(tex, "noise_distortion")
layout.itemR(tex, "noise_basis", text="Basis")
else:
layout.itemR(tex, "noise_distortion", text="")
layout.itemR(tex, "noise_basis", text="")
flow = layout.column_flow()
flow.itemR(tex, "distortion", text="Distortion")
flow.itemR(tex, "noise_size", text="Size")
flow.itemR(tex, "nabla")
split = layout.split()
col = split.column()
col.itemR(tex, "distortion", text="Distortion")
col.itemR(tex, "noise_size", text="Size")
if col2:
col = split.column()
col.itemR(tex, "nabla")
class TEXTURE_PT_voxeldata(TextureButtonsPanel):
@ -738,8 +857,12 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel):
tex = context.texture
pd = tex.pointdensity
col2 = context.region.width > narrowui
layout.itemR(pd, "point_source", expand=True)
if col2:
layout.itemR(pd, "point_source", expand=True)
else:
layout.itemR(pd, "point_source", text="")
split = layout.split()
@ -770,7 +893,8 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel):
if pd.color_source in ('PARTICLE_SPEED', 'PARTICLE_AGE'):
layout.template_color_ramp(pd, "color_ramp", expand=True)
col = split.column()
if col2:
col = split.column()
col.itemL()
col.itemR(pd, "radius")
col.itemL(text="Falloff:")
@ -791,7 +915,7 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel):
tex = context.texture
pd = tex.pointdensity
layout.itemR(pd, "turbulence", text="")
def draw(self, context):
@ -800,6 +924,7 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel):
tex = context.texture
pd = tex.pointdensity
layout.active = pd.turbulence
col2 = context.region.width > narrowui
split = layout.split()
@ -809,8 +934,9 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel):
col.itemL(text="Noise Basis:")
col.itemR(pd, "noise_basis", text="")
col = split.column()
col.itemL()
if col2:
col = split.column()
col.itemL()
col.itemR(pd, "turbulence_size")
col.itemR(pd, "turbulence_depth")
col.itemR(pd, "turbulence_strength")