2.5 UI Scripts:
* More code cleanup. When removing the narrow_ui feature, a lot of split functions were kept. Changed them to rows, which are more easily readable. Check out properties_data_lattice.py for a good example.
This commit is contained in:
@@ -297,12 +297,8 @@ class DATA_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
|
||||
layout.separator()
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.operator("pose.paths_calculate", text="Calculate Paths")
|
||||
|
||||
col = split.column()
|
||||
col.operator("pose.paths_clear", text="Clear Paths")
|
||||
split.operator("pose.paths_calculate", text="Calculate Paths")
|
||||
split.operator("pose.paths_clear", text="Clear Paths")
|
||||
|
||||
|
||||
class DATA_PT_onion_skinning(OnionSkinButtonsPanel): # , bpy.types.Panel): # inherit from panel when ready
|
||||
|
||||
@@ -312,12 +312,9 @@ class DATA_PT_font(CurveButtonsPanel, bpy.types.Panel):
|
||||
col.prop(char, "use_italic")
|
||||
col.prop(char, "use_underline")
|
||||
|
||||
split = layout.split()
|
||||
col = split.column()
|
||||
col.prop(text, "small_caps_scale", text="Small Caps")
|
||||
|
||||
col = split.column()
|
||||
col.prop(char, "use_small_caps")
|
||||
row = layout.row()
|
||||
row.prop(text, "small_caps_scale", text="Small Caps")
|
||||
row.prop(char, "use_small_caps")
|
||||
|
||||
|
||||
class DATA_PT_paragraph(CurveButtonsPanel, bpy.types.Panel):
|
||||
|
||||
@@ -39,7 +39,6 @@ class DATA_PT_empty(DataButtonsPanel, bpy.types.Panel):
|
||||
ob = context.object
|
||||
|
||||
layout.prop(ob, "empty_draw_type", text="Display")
|
||||
|
||||
layout.prop(ob, "empty_draw_size", text="Size")
|
||||
|
||||
|
||||
|
||||
@@ -251,19 +251,14 @@ class DATA_PT_shadow(DataButtonsPanel, bpy.types.Panel):
|
||||
|
||||
col.row().prop(lamp, "shadow_ray_sample_method", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
col = split.column()
|
||||
|
||||
if lamp.shadow_ray_sample_method == 'ADAPTIVE_QMC':
|
||||
col.prop(lamp, "shadow_adaptive_threshold", text="Threshold")
|
||||
col = split.column()
|
||||
layout.prop(lamp, "shadow_adaptive_threshold", text="Threshold")
|
||||
|
||||
if lamp.type == 'AREA' and lamp.shadow_ray_sample_method == 'CONSTANT_JITTERED':
|
||||
col = split.column()
|
||||
col = split.column()
|
||||
col.prop(lamp, "use_umbra")
|
||||
col.prop(lamp, "use_dither")
|
||||
col.prop(lamp, "use_jitter")
|
||||
row = layout.row()
|
||||
row.prop(lamp, "use_umbra")
|
||||
row.prop(lamp, "use_dither")
|
||||
row.prop(lamp, "use_jitter")
|
||||
|
||||
elif lamp.shadow_method == 'BUFFER_SHADOW':
|
||||
col = layout.column()
|
||||
@@ -318,13 +313,11 @@ class DATA_PT_area(DataButtonsPanel, bpy.types.Panel):
|
||||
return (lamp and lamp.type == 'AREA') and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
lamp = context.lamp
|
||||
|
||||
layout = self.layout
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
|
||||
col = layout.column()
|
||||
col.row().prop(lamp, "shape", expand=True)
|
||||
sub = col.row(align=True)
|
||||
|
||||
|
||||
@@ -59,23 +59,17 @@ class DATA_PT_lattice(DataButtonsPanel, bpy.types.Panel):
|
||||
|
||||
lat = context.lattice
|
||||
|
||||
split = layout.split()
|
||||
col = split.column()
|
||||
col.prop(lat, "points_u")
|
||||
col = split.column()
|
||||
col.prop(lat, "interpolation_type_u", text="")
|
||||
row = layout.row()
|
||||
row.prop(lat, "points_u")
|
||||
row.prop(lat, "interpolation_type_u", text="")
|
||||
|
||||
split = layout.split()
|
||||
col = split.column()
|
||||
col.prop(lat, "points_v")
|
||||
col = split.column()
|
||||
col.prop(lat, "interpolation_type_v", text="")
|
||||
row = layout.row()
|
||||
row.prop(lat, "points_v")
|
||||
row.prop(lat, "interpolation_type_v", text="")
|
||||
|
||||
split = layout.split()
|
||||
col = split.column()
|
||||
col.prop(lat, "points_w")
|
||||
col = split.column()
|
||||
col.prop(lat, "interpolation_type_w", text="")
|
||||
row = layout.row()
|
||||
row.prop(lat, "points_w")
|
||||
row.prop(lat, "interpolation_type_w", text="")
|
||||
|
||||
row = layout.row()
|
||||
row.prop(lat, "use_outside")
|
||||
|
||||
@@ -94,9 +94,7 @@ class DATA_PT_normals(MeshButtonsPanel, bpy.types.Panel):
|
||||
sub.active = mesh.use_auto_smooth
|
||||
sub.prop(mesh, "auto_smooth_angle", text="Angle")
|
||||
|
||||
col = split.column()
|
||||
|
||||
col.prop(mesh, "show_double_sided")
|
||||
split.prop(mesh, "show_double_sided")
|
||||
|
||||
|
||||
class DATA_PT_settings(MeshButtonsPanel, bpy.types.Panel):
|
||||
|
||||
@@ -59,16 +59,15 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
|
||||
col.prop(md, "use_vertex_groups", text="Vertex Groups")
|
||||
col.prop(md, "use_bone_envelopes", text="Bone Envelopes")
|
||||
|
||||
split = layout.split()
|
||||
layout.separator()
|
||||
|
||||
col = split.split()
|
||||
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
||||
sub = col.column()
|
||||
row = layout.row()
|
||||
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
||||
sub = row.row()
|
||||
sub.active = bool(md.vertex_group)
|
||||
sub.prop(md, "invert_vertex_group")
|
||||
|
||||
col = layout.column()
|
||||
col.prop(md, "use_multi_modifier")
|
||||
layout.prop(md, "use_multi_modifier")
|
||||
|
||||
def ARRAY(self, layout, ob, md):
|
||||
layout.prop(md, "fit_type")
|
||||
@@ -113,9 +112,8 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
|
||||
|
||||
layout.separator()
|
||||
|
||||
col = layout.column()
|
||||
col.prop(md, "start_cap")
|
||||
col.prop(md, "end_cap")
|
||||
layout.prop(md, "start_cap")
|
||||
layout.prop(md, "end_cap")
|
||||
|
||||
def BEVEL(self, layout, ob, md):
|
||||
split = layout.split()
|
||||
@@ -230,13 +228,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
|
||||
|
||||
layout.separator()
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(md, "mid_level")
|
||||
|
||||
col = split.column()
|
||||
col.prop(md, "strength")
|
||||
row = layout.row()
|
||||
row.prop(md, "mid_level")
|
||||
row.prop(md, "strength")
|
||||
|
||||
def EDGE_SPLIT(self, layout, ob, md):
|
||||
split = layout.split()
|
||||
@@ -247,8 +241,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
|
||||
sub.active = md.use_edge_angle
|
||||
sub.prop(md, "split_angle")
|
||||
|
||||
col = split.column()
|
||||
col.prop(md, "use_edge_sharp", text="Sharp Edges")
|
||||
split.prop(md, "use_edge_sharp", text="Sharp Edges")
|
||||
|
||||
def EXPLODE(self, layout, ob, md):
|
||||
split = layout.split()
|
||||
@@ -336,6 +329,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
|
||||
|
||||
def MESH_DEFORM(self, layout, ob, md):
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
sub = col.column()
|
||||
sub.label(text="Object:")
|
||||
@@ -356,13 +350,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
|
||||
else:
|
||||
layout.operator("object.meshdeform_bind", text="Bind")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(md, "precision")
|
||||
|
||||
col = split.column()
|
||||
col.prop(md, "use_dynamic_bind")
|
||||
row = layout.row()
|
||||
row.prop(md, "precision")
|
||||
row.prop(md, "use_dynamic_bind")
|
||||
|
||||
def MIRROR(self, layout, ob, md):
|
||||
split = layout.split(percentage=0.25)
|
||||
|
||||
@@ -190,13 +190,9 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, bpy.types.Panel):
|
||||
layout.active = game.use_collision_bounds
|
||||
layout.prop(game, "collision_bounds_type", text="Bounds")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(game, "collision_margin", text="Margin", slider=True)
|
||||
|
||||
col = split.column()
|
||||
col.prop(game, "use_collision_compound", text="Compound")
|
||||
row = layout.row()
|
||||
row.prop(game, "collision_margin", text="Margin", slider=True)
|
||||
row.prop(game, "use_collision_compound", text="Compound")
|
||||
|
||||
|
||||
class RenderButtonsPanel():
|
||||
@@ -422,13 +418,9 @@ class WORLD_PT_game_world(WorldButtonsPanel, bpy.types.Panel):
|
||||
|
||||
world = context.world
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(world, "horizon_color")
|
||||
|
||||
col = split.column()
|
||||
col.prop(world, "ambient_color")
|
||||
row = layout.row()
|
||||
row.column().prop(world, "horizon_color")
|
||||
row.column().prop(world, "ambient_color")
|
||||
|
||||
|
||||
class WORLD_PT_game_mist(WorldButtonsPanel, bpy.types.Panel):
|
||||
@@ -451,13 +443,10 @@ class WORLD_PT_game_mist(WorldButtonsPanel, bpy.types.Panel):
|
||||
world = context.world
|
||||
|
||||
layout.active = world.mist_settings.use_mist
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(world.mist_settings, "start")
|
||||
|
||||
col = split.column()
|
||||
col.prop(world.mist_settings, "depth")
|
||||
row = layout.row()
|
||||
row.prop(world.mist_settings, "start")
|
||||
row.prop(world.mist_settings, "depth")
|
||||
|
||||
|
||||
class WORLD_PT_game_physics(WorldButtonsPanel, bpy.types.Panel):
|
||||
|
||||
@@ -249,15 +249,11 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel, bpy.types.Panel):
|
||||
layout.template_color_ramp(mat, "diffuse_ramp", expand=True)
|
||||
layout.separator()
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "diffuse_ramp_input", text="Input")
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "diffuse_ramp_blend", text="Blend")
|
||||
row = layout.row()
|
||||
row.prop(mat, "diffuse_ramp_factor", text="Factor")
|
||||
row.prop(mat, "diffuse_ramp_input", text="Input")
|
||||
row.prop(mat, "diffuse_ramp_blend", text="Blend")
|
||||
|
||||
layout.prop(mat, "diffuse_ramp_factor", text="Factor")
|
||||
|
||||
|
||||
class MATERIAL_PT_specular(MaterialButtonsPanel, bpy.types.Panel):
|
||||
@@ -305,16 +301,12 @@ class MATERIAL_PT_specular(MaterialButtonsPanel, bpy.types.Panel):
|
||||
layout.separator()
|
||||
layout.template_color_ramp(mat, "specular_ramp", expand=True)
|
||||
layout.separator()
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "specular_ramp_input", text="Input")
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "specular_ramp_blend", text="Blend")
|
||||
|
||||
row = layout.row()
|
||||
row.prop(mat, "specular_ramp_factor", text="Factor")
|
||||
row.prop(mat, "specular_ramp_input", text="Input")
|
||||
row.prop(mat, "specular_ramp_blend", text="Blend")
|
||||
|
||||
layout.prop(mat, "specular_ramp_factor", text="Factor")
|
||||
|
||||
|
||||
class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel):
|
||||
@@ -826,12 +818,9 @@ class MATERIAL_PT_volume_density(VolumeButtonsPanel, bpy.types.Panel):
|
||||
|
||||
vol = context.material.volume # dont use node material
|
||||
|
||||
split = layout.split()
|
||||
col = split.column()
|
||||
col.prop(vol, "density")
|
||||
|
||||
col = split.column()
|
||||
col.prop(vol, "density_scale")
|
||||
row = layout.row()
|
||||
row.prop(vol, "density")
|
||||
row.prop(vol, "density_scale")
|
||||
|
||||
|
||||
class MATERIAL_PT_volume_shading(VolumeButtonsPanel, bpy.types.Panel):
|
||||
|
||||
@@ -249,13 +249,10 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, bpy.types.Panel):
|
||||
layout.prop(ob, "use_dupli_vertices_rotation", text="Rotation")
|
||||
|
||||
elif ob.dupli_type == 'FACES':
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(ob, "use_dupli_faces_scale", text="Scale")
|
||||
|
||||
col = split.column()
|
||||
col.prop(ob, "dupli_faces_scale", text="Inherit Scale")
|
||||
row = layout.row()
|
||||
row.prop(ob, "use_dupli_faces_scale", text="Scale")
|
||||
row.prop(ob, "dupli_faces_scale", text="Inherit Scale")
|
||||
|
||||
elif ob.dupli_type == 'GROUP':
|
||||
layout.prop(ob, "dupli_group", text="Group")
|
||||
@@ -311,13 +308,9 @@ class OBJECT_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
|
||||
|
||||
layout.separator()
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.operator("object.paths_calculate", text="Calculate Paths")
|
||||
|
||||
col = split.column()
|
||||
col.operator("object.paths_clear", text="Clear Paths")
|
||||
row = layout.row()
|
||||
row.operator("object.paths_calculate", text="Calculate Paths")
|
||||
row.operator("object.paths_clear", text="Clear Paths")
|
||||
|
||||
|
||||
class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel): # , bpy.types.Panel): # inherit from panel when ready
|
||||
|
||||
@@ -112,13 +112,9 @@ class ConstraintButtonsPanel():
|
||||
col.prop(con, "use_scale_y", text="Y")
|
||||
col.prop(con, "use_scale_z", text="Z")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.operator("constraint.childof_set_inverse")
|
||||
|
||||
col = split.column()
|
||||
col.operator("constraint.childof_clear_inverse")
|
||||
row = layout.row()
|
||||
row.operator("constraint.childof_set_inverse")
|
||||
row.operator("constraint.childof_clear_inverse")
|
||||
|
||||
def TRACK_TO(self, context, layout, con):
|
||||
self.target_template(layout, con)
|
||||
@@ -127,13 +123,9 @@ class ConstraintButtonsPanel():
|
||||
row.label(text="To:")
|
||||
row.prop(con, "track_axis", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(con, "up_axis", text="Up")
|
||||
|
||||
col = split.column()
|
||||
col.prop(con, "use_target_z")
|
||||
row = layout.row()
|
||||
row.prop(con, "up_axis", text="Up")
|
||||
row.prop(con, "use_target_z")
|
||||
|
||||
self.space_template(layout, con)
|
||||
|
||||
@@ -212,6 +204,7 @@ class ConstraintButtonsPanel():
|
||||
self.ik_template(layout, con)
|
||||
|
||||
layout.prop(con, "limit_mode")
|
||||
|
||||
row = layout.row()
|
||||
row.prop(con, "weight", text="Weight", slider=True)
|
||||
row.prop(con, "distance", text="Distance", slider=True)
|
||||
@@ -486,16 +479,11 @@ class ConstraintButtonsPanel():
|
||||
def STRETCH_TO(self, context, layout, con):
|
||||
self.target_template(layout, con)
|
||||
|
||||
split = layout.split()
|
||||
row = layout.row()
|
||||
row.prop(con, "rest_length", text="Rest Length")
|
||||
row.operator("constraint.stretchto_reset", text="Reset")
|
||||
|
||||
col = split.column()
|
||||
col.prop(con, "rest_length", text="Rest Length")
|
||||
|
||||
col = split.column()
|
||||
col.operator("constraint.stretchto_reset", text="Reset")
|
||||
|
||||
col = layout.column()
|
||||
col.prop(con, "bulge", text="Volume Variation")
|
||||
layout.prop(con, "bulge", text="Volume Variation")
|
||||
|
||||
row = layout.row()
|
||||
row.label(text="Volume:")
|
||||
@@ -507,19 +495,15 @@ class ConstraintButtonsPanel():
|
||||
def FLOOR(self, context, layout, con):
|
||||
self.target_template(layout, con)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(con, "use_sticky")
|
||||
|
||||
col = split.column()
|
||||
col.prop(con, "use_rotation")
|
||||
row = layout.row()
|
||||
row.prop(con, "use_sticky")
|
||||
row.prop(con, "use_rotation")
|
||||
|
||||
layout.prop(con, "offset")
|
||||
|
||||
row = layout.row()
|
||||
row.label(text="Min/Max:")
|
||||
row.prop(con, "floor_location", expand=True)
|
||||
#row.label(text="Min/Max:")
|
||||
row.prop(con, "floor_location", expand=True, text="Min/Max:")
|
||||
|
||||
self.space_template(layout, con)
|
||||
|
||||
@@ -529,13 +513,9 @@ class ConstraintButtonsPanel():
|
||||
layout.prop(con, "pivot_type")
|
||||
layout.prop(con, "child")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(con, "use_linked_collision", text="Linked Collision")
|
||||
|
||||
col = split.column()
|
||||
col.prop(con, "show_pivot", text="Display Pivot")
|
||||
row = layout.row()
|
||||
row.prop(con, "use_linked_collision", text="Linked Collision")
|
||||
row.prop(con, "show_pivot", text="Display Pivot")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
|
||||
@@ -255,8 +255,6 @@ def basic_force_field_settings_ui(self, context, field):
|
||||
def basic_force_field_falloff_ui(self, context, field):
|
||||
layout = self.layout
|
||||
|
||||
# XXX: This doesn't update for some reason.
|
||||
#split = layout.split()
|
||||
split = layout.split(percentage=0.35)
|
||||
|
||||
if not field or field.type == 'NONE':
|
||||
|
||||
@@ -100,9 +100,6 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, bpy.types.Panel):
|
||||
sub.prop(flow, "density")
|
||||
sub.prop(flow, "temperature")
|
||||
|
||||
#elif md.smoke_type == 'COLLISION':
|
||||
# layout.separator()
|
||||
|
||||
|
||||
class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Smoke Groups"
|
||||
|
||||
@@ -55,14 +55,10 @@ class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel):
|
||||
col.row().prop(unit, "system", expand=True)
|
||||
col.row().prop(unit, "system_rotation", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
split.active = (unit.system != 'NONE')
|
||||
|
||||
col = split.column()
|
||||
col.prop(unit, "scale_length", text="Scale")
|
||||
|
||||
col = split.column()
|
||||
col.prop(unit, "use_separate")
|
||||
row = layout.row()
|
||||
row.active = (unit.system != 'NONE')
|
||||
row.prop(unit, "scale_length", text="Scale")
|
||||
row.prop(unit, "use_separate")
|
||||
|
||||
|
||||
class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel):
|
||||
|
||||
@@ -244,8 +244,7 @@ class TEXTURE_PT_clouds(TextureTypePanel, bpy.types.Panel):
|
||||
col.prop(tex, "noise_scale", text="Size")
|
||||
col.prop(tex, "noise_depth", text="Depth")
|
||||
|
||||
col = split.column()
|
||||
col.prop(tex, "nabla", text="Nabla")
|
||||
split.prop(tex, "nabla", text="Nabla")
|
||||
|
||||
|
||||
class TEXTURE_PT_wood(TextureTypePanel, bpy.types.Panel):
|
||||
@@ -274,8 +273,7 @@ class TEXTURE_PT_wood(TextureTypePanel, bpy.types.Panel):
|
||||
col.prop(tex, "noise_scale", text="Size")
|
||||
col.prop(tex, "turbulence")
|
||||
|
||||
col = split.column()
|
||||
col.prop(tex, "nabla")
|
||||
split.prop(tex, "nabla")
|
||||
|
||||
|
||||
class TEXTURE_PT_marble(TextureTypePanel, bpy.types.Panel):
|
||||
@@ -315,13 +313,9 @@ class TEXTURE_PT_magic(TextureTypePanel, bpy.types.Panel):
|
||||
|
||||
tex = context.texture
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(tex, "noise_depth", text="Depth")
|
||||
|
||||
col = split.column()
|
||||
col.prop(tex, "turbulence")
|
||||
row = layout.row()
|
||||
row.prop(tex, "noise_depth", text="Depth")
|
||||
row.prop(tex, "turbulence")
|
||||
|
||||
|
||||
class TEXTURE_PT_blend(TextureTypePanel, bpy.types.Panel):
|
||||
@@ -357,13 +351,9 @@ class TEXTURE_PT_stucci(TextureTypePanel, bpy.types.Panel):
|
||||
layout.prop(tex, "noise_type", text="Type", expand=True)
|
||||
layout.prop(tex, "noise_basis", text="Basis")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(tex, "noise_scale", text="Size")
|
||||
|
||||
col = split.column()
|
||||
col.prop(tex, "turbulence")
|
||||
row = layout.row()
|
||||
row.prop(tex, "noise_scale", text="Size")
|
||||
row.prop(tex, "turbulence")
|
||||
|
||||
|
||||
class TEXTURE_PT_image(TextureTypePanel, bpy.types.Panel):
|
||||
@@ -573,13 +563,9 @@ class TEXTURE_PT_musgrave(TextureTypePanel, bpy.types.Panel):
|
||||
|
||||
layout.prop(tex, "noise_basis", text="Basis")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(tex, "noise_scale", text="Size")
|
||||
|
||||
col = split.column()
|
||||
col.prop(tex, "nabla")
|
||||
row = layout.row()
|
||||
row.prop(tex, "noise_scale", text="Size")
|
||||
row.prop(tex, "nabla")
|
||||
|
||||
|
||||
class TEXTURE_PT_voronoi(TextureTypePanel, bpy.types.Panel):
|
||||
@@ -613,14 +599,9 @@ class TEXTURE_PT_voronoi(TextureTypePanel, bpy.types.Panel):
|
||||
sub.prop(tex, "weight_4", text="4", slider=True)
|
||||
|
||||
layout.label(text="Noise:")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(tex, "noise_scale", text="Size")
|
||||
|
||||
col = split.column()
|
||||
col.prop(tex, "nabla")
|
||||
row = layout.row()
|
||||
row.prop(tex, "noise_scale", text="Size")
|
||||
row.prop(tex, "nabla")
|
||||
|
||||
|
||||
class TEXTURE_PT_distortednoise(TextureTypePanel, bpy.types.Panel):
|
||||
@@ -642,8 +623,7 @@ class TEXTURE_PT_distortednoise(TextureTypePanel, bpy.types.Panel):
|
||||
col.prop(tex, "distortion", text="Distortion")
|
||||
col.prop(tex, "noise_scale", text="Size")
|
||||
|
||||
col = split.column()
|
||||
col.prop(tex, "nabla")
|
||||
split.prop(tex, "nabla")
|
||||
|
||||
|
||||
class TEXTURE_PT_voxeldata(TextureButtonsPanel, bpy.types.Panel):
|
||||
@@ -753,12 +733,9 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, bpy.types.Panel):
|
||||
return tex and (tex.type == 'POINT_DENSITY' and (engine in cls.COMPAT_ENGINES))
|
||||
|
||||
def draw_header(self, context):
|
||||
layout = self.layout
|
||||
|
||||
tex = context.texture
|
||||
pd = tex.point_density
|
||||
|
||||
layout.prop(pd, "use_turbulence", text="")
|
||||
self.layout.prop(pd, "use_turbulence", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
@@ -865,14 +842,9 @@ class TEXTURE_PT_mapping(TextureSlotPanel, bpy.types.Panel):
|
||||
row.prop(tex, "mapping_y", text="")
|
||||
row.prop(tex, "mapping_z", text="")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(tex, "offset")
|
||||
|
||||
col = split.column()
|
||||
|
||||
col.prop(tex, "scale")
|
||||
row = layout.row()
|
||||
row.column().prop(tex, "offset")
|
||||
row.column().prop(tex, "scale")
|
||||
|
||||
|
||||
class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel):
|
||||
@@ -1038,19 +1010,18 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel):
|
||||
col.prop(tex, "default_value", text="DVar", slider=True)
|
||||
|
||||
if isinstance(idblock, bpy.types.Material):
|
||||
row = layout.row()
|
||||
row.label(text="Bump Mapping:")
|
||||
layout.label(text="Bump Mapping:")
|
||||
|
||||
|
||||
row = layout.row()
|
||||
# only show bump settings if activated but not for normalmap images
|
||||
row = layout.row()
|
||||
row.active = tex.use_map_normal and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map)
|
||||
|
||||
col = row.column()
|
||||
col.prop(tex, "bump_method", text="Method")
|
||||
row.prop(tex, "bump_method", text="Method")
|
||||
|
||||
col = row.column()
|
||||
col.prop(tex, "bump_objectspace", text="Space")
|
||||
col.active = tex.bump_method in ('BUMP_DEFAULT', 'BUMP_BEST_QUALITY')
|
||||
sub = row.row()
|
||||
sub.active = tex.bump_method in ('BUMP_DEFAULT', 'BUMP_BEST_QUALITY')
|
||||
sub.prop(tex, "bump_objectspace", text="Space")
|
||||
|
||||
|
||||
class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
|
||||
Reference in New Issue
Block a user