forked from bartvdbraak/blender
pep8 edits and remove commented code from last commit.
This commit is contained in:
parent
f2b1645a75
commit
82783cd0cd
@ -78,7 +78,7 @@ def is_svn_file(filename):
|
||||
|
||||
|
||||
def is_project_file(filename):
|
||||
return (is_c_any(filename) or is_cmake(filename)) # and is_svn_file(filename)
|
||||
return (is_c_any(filename) or is_cmake(filename)) # and is_svn_file(filename)
|
||||
|
||||
|
||||
def cmake_advanced_info():
|
||||
@ -185,7 +185,6 @@ def main():
|
||||
includes = list(set(includes) | set(dirname(f) for f in files_rel if is_c_header(f)))
|
||||
includes.sort()
|
||||
|
||||
|
||||
PROJECT_NAME = "Blender"
|
||||
f = open(join(base, "%s.files" % PROJECT_NAME), 'w')
|
||||
f.write("\n".join(files_rel))
|
||||
|
@ -28,6 +28,7 @@ StructMetaPropGroup = _bpy.StructMetaPropGroup
|
||||
|
||||
bpy_types.BlendDataLibraries.load = _bpy._library_load
|
||||
|
||||
|
||||
class Context(StructRNA):
|
||||
__slots__ = ()
|
||||
|
||||
|
@ -25,7 +25,7 @@ from bpy.props import StringProperty, BoolProperty
|
||||
class ExportHelper:
|
||||
filepath = StringProperty(name="File Path", description="Filepath used for exporting the file", maxlen=1024, default="", subtype='FILE_PATH')
|
||||
check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'})
|
||||
|
||||
|
||||
# subclasses can override with decorator
|
||||
# True == use ext, False == no ext, None == do nothing.
|
||||
check_extension = True
|
||||
@ -46,7 +46,7 @@ class ExportHelper:
|
||||
|
||||
def check(self, context):
|
||||
check_extension = self.check_extension
|
||||
|
||||
|
||||
if check_extension is None:
|
||||
return False
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
||||
# but results are far more accurate
|
||||
#
|
||||
|
||||
|
||||
def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean, dirt_only):
|
||||
from mathutils import Vector
|
||||
from math import acos
|
||||
|
@ -624,7 +624,6 @@ class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
|
||||
row.prop(phys, "friction")
|
||||
row.prop(phys, "elasticity", slider=True)
|
||||
|
||||
|
||||
row = layout.row()
|
||||
row.label(text="Force Field:")
|
||||
|
||||
@ -775,7 +774,6 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel, bpy.types.Panel):
|
||||
col.prop(mat, "use_cast_approximate")
|
||||
|
||||
|
||||
|
||||
class MATERIAL_PT_transp_game(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Transparency"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
@ -556,44 +556,44 @@ class ConstraintButtonsPanel():
|
||||
elif con.pivot_type == 'GENERIC_6_DOF':
|
||||
layout.label(text="Limits:")
|
||||
split = layout.split()
|
||||
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(con, "use_limit_x", text="X")
|
||||
sub = col.column()
|
||||
sub.active = con.use_limit_x
|
||||
sub.prop(con, "limit_min_x", text="Min")
|
||||
sub.prop(con, "limit_max_x", text="Max")
|
||||
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(con, "use_limit_y", text="Y")
|
||||
sub = col.column()
|
||||
sub.active = con.use_limit_y
|
||||
sub.prop(con, "limit_min_y", text="Min")
|
||||
sub.prop(con, "limit_max_y", text="Max")
|
||||
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(con, "use_limit_z", text="Z")
|
||||
sub = col.column()
|
||||
sub.active = con.use_limit_z
|
||||
sub.prop(con, "limit_min_z", text="Min")
|
||||
sub.prop(con, "limit_max_z", text="Max")
|
||||
|
||||
|
||||
split = layout.split()
|
||||
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(con, "use_angular_limit_x", text="Angle X")
|
||||
sub = col.column()
|
||||
sub.active = con.use_angular_limit_x
|
||||
sub.prop(con, "limit_angle_min_x", text="Min")
|
||||
sub.prop(con, "limit_angle_max_x", text="Max")
|
||||
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(con, "use_angular_limit_y", text="Angle Y")
|
||||
sub = col.column()
|
||||
sub.active = con.use_angular_limit_y
|
||||
sub.prop(con, "limit_angle_min_y", text="Min")
|
||||
sub.prop(con, "limit_angle_max_y", text="Max")
|
||||
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(con, "use_angular_limit_z", text="Angle Z")
|
||||
sub = col.column()
|
||||
@ -790,4 +790,3 @@ def unregister():
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
||||
|
||||
|
@ -407,7 +407,7 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel, bpy.types.Panel):
|
||||
row = layout.row()
|
||||
row.label(text="Initial Rotation:")
|
||||
row.prop(part, "use_dynamic_rotation")
|
||||
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column(align=True)
|
||||
@ -417,7 +417,7 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel, bpy.types.Panel):
|
||||
col = split.column(align=True)
|
||||
col.prop(part, "phase_factor", slider=True)
|
||||
col.prop(part, "phase_factor_random", text="Random", slider=True)
|
||||
|
||||
|
||||
col = layout.column()
|
||||
col.label(text="Angular Velocity:")
|
||||
col.row().prop(part, "angular_velocity_mode", expand=True)
|
||||
@ -464,53 +464,53 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
|
||||
|
||||
if part.physics_type in ('NEWTON', 'FLUID'):
|
||||
split = layout.split()
|
||||
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Forces:")
|
||||
col.prop(part, "brownian_factor")
|
||||
col.prop(part, "drag_factor", slider=True)
|
||||
col.prop(part, "damping", slider=True)
|
||||
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Integration:")
|
||||
col.prop(part, "integrator", text="")
|
||||
col.prop(part, "time_tweak")
|
||||
col.prop(part, "subframes")
|
||||
|
||||
|
||||
row = layout.row()
|
||||
row.prop(part, "use_size_deflect")
|
||||
row.prop(part, "use_die_on_collision")
|
||||
|
||||
|
||||
if part.physics_type == 'FLUID':
|
||||
fluid = part.fluid
|
||||
|
||||
|
||||
split = layout.split()
|
||||
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Fluid properties:")
|
||||
col.prop(fluid, "stiffness", text="Stiffness")
|
||||
col.prop(fluid, "linear_viscosity", text="Viscosity")
|
||||
col.prop(fluid, "buoyancy", text="Buoancy", slider=True)
|
||||
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Advanced:")
|
||||
|
||||
sub = col.row()
|
||||
sub.prop(fluid, "repulsion", slider=fluid.factor_repulsion)
|
||||
sub.prop(fluid, "factor_repulsion", text="")
|
||||
|
||||
|
||||
sub = col.row()
|
||||
sub.prop(fluid, "stiff_viscosity", slider=fluid.factor_stiff_viscosity)
|
||||
sub.prop(fluid, "factor_stiff_viscosity", text="")
|
||||
|
||||
|
||||
sub = col.row()
|
||||
sub.prop(fluid, "fluid_radius", slider=fluid.factor_radius)
|
||||
sub.prop(fluid, "factor_radius", text="")
|
||||
|
||||
|
||||
sub = col.row()
|
||||
sub.prop(fluid, "rest_density", slider=fluid.factor_density)
|
||||
sub.prop(fluid, "factor_density", text="")
|
||||
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
@ -521,7 +521,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
|
||||
sub.active = fluid.use_viscoelastic_springs
|
||||
sub.prop(fluid, "yield_ratio", slider=True)
|
||||
sub.prop(fluid, "plasticity", slider=True)
|
||||
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Advanced:")
|
||||
sub = col.row()
|
||||
@ -532,7 +532,6 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
|
||||
sub.active = fluid.use_viscoelastic_springs
|
||||
sub.prop(fluid, "use_initial_rest_length")
|
||||
sub.prop(fluid, "spring_frames", text="Frames")
|
||||
|
||||
|
||||
elif part.physics_type == 'KEYED':
|
||||
split = layout.split()
|
||||
@ -772,7 +771,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
|
||||
col = split.column()
|
||||
col.prop(part, "use_render_emitter")
|
||||
col.prop(part, "use_parent_particles")
|
||||
|
||||
|
||||
col = split.column()
|
||||
col.prop(part, "show_unborn")
|
||||
col.prop(part, "use_dead")
|
||||
@ -786,7 +785,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
|
||||
if part.render_type == 'LINE':
|
||||
col.prop(part, "line_length_tail")
|
||||
col.prop(part, "line_length_head")
|
||||
|
||||
|
||||
split.prop(part, "use_velocity_length")
|
||||
elif part.render_type == 'PATH':
|
||||
col.prop(part, "use_strand_primitive")
|
||||
@ -831,7 +830,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
|
||||
elif part.render_type == 'GROUP':
|
||||
col.prop(part, "dupli_group")
|
||||
split = layout.split()
|
||||
|
||||
|
||||
col = split.column()
|
||||
col.prop(part, "use_whole_group")
|
||||
sub = col.column()
|
||||
@ -915,6 +914,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
|
||||
row.prop(part, "particle_size")
|
||||
row.prop(part, "size_random", slider=True)
|
||||
|
||||
|
||||
class PARTICLE_PT_draw(ParticleButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Display"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
@ -853,8 +853,6 @@ class USERPREF_PT_addons(bpy.types.Panel):
|
||||
bl_region_type = 'WINDOW'
|
||||
bl_options = {'HIDE_HEADER'}
|
||||
|
||||
# _addons_cats = None
|
||||
# _addons_sups = None
|
||||
_addons_fake_modules = {}
|
||||
|
||||
@classmethod
|
||||
@ -875,27 +873,6 @@ class USERPREF_PT_addons(bpy.types.Panel):
|
||||
# collect the categories that can be filtered on
|
||||
addons = [(mod, addon_utils.module_bl_info(mod)) for mod in addon_utils.modules(USERPREF_PT_addons._addons_fake_modules)]
|
||||
|
||||
# XXX. we need dynamic enums to properly support this.
|
||||
"""
|
||||
cats = {info["category"] for mod, info in addons}
|
||||
cats.discard("")
|
||||
|
||||
if USERPREF_PT_addons._addons_cats != cats:
|
||||
bpy.types.WindowManager.addon_filter = EnumProperty(items=[(cat, cat, "") for cat in ["All", "Enabled", "Disabled"] + sorted(cats)], name="Category", description="Filter add-ons by category")
|
||||
bpy.types.WindowManager.addon_search = StringProperty(name="Search", description="Search within the selected filter")
|
||||
USERPREF_PT_addons._addons_cats = cats
|
||||
|
||||
[('All', 'All', ''), ('Enabled', 'Enabled', ''), ('Disabled', 'Disabled', ''), ('3D View', '3D View', ''), ('Add Curve', 'Add Curve', ''), ('Add Mesh', 'Add Mesh', ''), ('Animation', 'Animation', ''), ('Development', 'Development', ''), ('Game Engine', 'Game Engine', ''), ('Import-Export', 'Import-Export', ''), ('Mesh', 'Mesh', ''), ('Object', 'Object', ''), ('Render', 'Render', ''), ('Rigging', 'Rigging', ''), ('System', 'System', '')]
|
||||
|
||||
sups_default = {'OFFICIAL', 'COMMUNITY'}
|
||||
sups = sups_default | {info["support"] for mod, info in addons}
|
||||
sups.discard("")
|
||||
|
||||
if USERPREF_PT_addons._addons_sups != sups:
|
||||
bpy.types.WindowManager.addon_support = EnumProperty(items=[(sup, sup.title(), "") for sup in reversed(sorted(sups))], name="Support", description="Display support level", default=sups_default, options={'ENUM_FLAG'})
|
||||
USERPREF_PT_addons._addons_sups = sups
|
||||
"""
|
||||
|
||||
split = layout.split(percentage=0.2)
|
||||
col = split.column()
|
||||
col.prop(context.window_manager, "addon_search", text="", icon='VIEWZOOM')
|
||||
@ -1216,8 +1193,8 @@ def register():
|
||||
('Object', "Object", ""),
|
||||
('Render', "Render", ""),
|
||||
('Rigging', "Rigging", ""),
|
||||
('System', "System", "")
|
||||
],
|
||||
('System', "System", "")
|
||||
],
|
||||
name="Category",
|
||||
description="Filter add-ons by category",
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user