diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py index 234d7993789..8f6bada6561 100644 --- a/release/scripts/modules/bpy/__init__.py +++ b/release/scripts/modules/bpy/__init__.py @@ -46,7 +46,7 @@ def _main(): # a bit nasty but this prevents help() and input() from locking blender # Ideally we could have some way for the console to replace sys.stdin but # python would lock blender while waiting for a return value, not easy :| - + if not app.debug: _sys.stdin = None diff --git a/release/scripts/op/image.py b/release/scripts/op/image.py index b2433481b84..0d20a9639b9 100644 --- a/release/scripts/op/image.py +++ b/release/scripts/op/image.py @@ -65,7 +65,7 @@ class ProjectEdit(bpy.types.Operator): bl_idname = "image.project_edit" bl_label = "Project Edit" bl_options = {'REGISTER'} - + _proj_hack = [""] def execute(self, context): @@ -79,17 +79,17 @@ class ProjectEdit(bpy.types.Operator): image.tag = True bpy.ops.paint.image_from_view() - + image_new = None for image in bpy.data.images: if not image.tag: image_new = image break - + if not image_new: self.report({'ERROR'}, "Could not make new image") return {'CANCELLED'} - + filename = os.path.basename(bpy.data.filename) filename = os.path.splitext(filename)[0] # filename = bpy.utils.clean_name(filename) # fixes rubbish, needs checking @@ -98,28 +98,28 @@ class ProjectEdit(bpy.types.Operator): filename = os.path.join(os.path.dirname(bpy.data.filename), filename) else: filename = "//" + filename - + obj = context.object if obj: filename += "_" + bpy.utils.clean_name(obj.name) - + filename_final = filename + "." + EXT i = 0 while os.path.exists(bpy.utils.expandpath(filename_final)): filename_final = filename + ("%.3d.%s" % (i, EXT)) i += 1 - + image_new.name = os.path.basename(filename_final) ProjectEdit._proj_hack[0] = image_new.name - + image_new.filename_raw = filename_final # TODO, filename raw is crummy image_new.file_format = 'PNG' image_new.save() - + subprocess.Popen([image_editor, bpy.utils.expandpath(filename_final)]) - + return {'FINISHED'} diff --git a/release/scripts/op/wm.py b/release/scripts/op/wm.py index 07a7afe026e..0a333db421b 100644 --- a/release/scripts/op/wm.py +++ b/release/scripts/op/wm.py @@ -569,7 +569,7 @@ classes = [ WM_OT_context_cycle_enum, WM_OT_context_cycle_int, WM_OT_context_modal_mouse, - + WM_OT_url_open, WM_OT_doc_view, diff --git a/release/scripts/ui/properties_data_lamp.py b/release/scripts/ui/properties_data_lamp.py index e72cfa80012..ceafb121c09 100644 --- a/release/scripts/ui/properties_data_lamp.py +++ b/release/scripts/ui/properties_data_lamp.py @@ -40,6 +40,7 @@ class DataButtonsPanel(bpy.types.Panel): engine = context.scene.render.engine return context.lamp and (engine in self.COMPAT_ENGINES) + class DATA_PT_preview(DataButtonsPanel): bl_label = "Preview" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} @@ -47,6 +48,7 @@ class DATA_PT_preview(DataButtonsPanel): def draw(self, context): self.layout.template_preview(context.lamp) + class DATA_PT_context_lamp(DataButtonsPanel): bl_label = "" bl_show_header = False diff --git a/release/scripts/ui/properties_physics_softbody.py b/release/scripts/ui/properties_physics_softbody.py index ed4c24b29b3..a582bfa520b 100644 --- a/release/scripts/ui/properties_physics_softbody.py +++ b/release/scripts/ui/properties_physics_softbody.py @@ -39,11 +39,10 @@ class PhysicButtonsPanel(bpy.types.Panel): ob = context.object rd = context.scene.render # return (ob and ob.type == 'MESH') and (not rd.use_game_engine) -# i really hate touching things i do not understand completely .. but i think this should read (bjornmose) +# i really hate touching things i do not understand completely .. but i think this should read (bjornmose) return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (not rd.use_game_engine) - class PHYSICS_PT_softbody(PhysicButtonsPanel): bl_label = "Soft Body" diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py index 4cdd404a405..4616fc5f8ab 100644 --- a/release/scripts/ui/properties_texture.py +++ b/release/scripts/ui/properties_texture.py @@ -598,19 +598,19 @@ class TEXTURE_PT_image(TextureTypePanel): layout.template_image(tex, "image", tex.image_user) -def texture_filter_common(tex, layout): - layout.label(text="Filter:") - layout.prop(tex, "filter", text="") - if tex.mipmap and tex.filter in ('AREA', 'EWA', 'FELINE'): - if tex.filter == 'FELINE': - layout.prop(tex, "filter_probes", text="Probes") - else: - layout.prop(tex, "filter_eccentricity", text="Eccentricity") - - layout.prop(tex, "filter_size") - layout.prop(tex, "filter_size_minimum") - +def texture_filter_common(tex, layout): + layout.label(text="Filter:") + layout.prop(tex, "filter", text="") + if tex.mipmap and tex.filter in ('AREA', 'EWA', 'FELINE'): + if tex.filter == 'FELINE': + layout.prop(tex, "filter_probes", text="Probes") + else: + layout.prop(tex, "filter_eccentricity", text="Eccentricity") + + layout.prop(tex, "filter_size") + layout.prop(tex, "filter_size_minimum") + class TEXTURE_PT_image_sampling(TextureTypePanel): bl_label = "Image Sampling" @@ -650,7 +650,7 @@ class TEXTURE_PT_image_sampling(TextureTypePanel): col.prop(tex, "interpolation") texture_filter_common(tex, col) - + class TEXTURE_PT_image_mapping(TextureTypePanel): bl_label = "Image Mapping" @@ -731,13 +731,13 @@ class TEXTURE_PT_envmap(TextureTypePanel): tex = context.texture env = tex.environment_map - + wide_ui = context.region.width > narrowui - + row = layout.row() row.prop(env, "source", expand=True) row.menu("TEXTURE_MT_envmap_specials", icon='DOWNARROW_HLT', text="") - + if env.source == 'IMAGE_FILE': layout.template_ID(tex, "image", open="image.open") layout.template_image(tex, "image", tex.image_user, compact=True) @@ -746,9 +746,9 @@ class TEXTURE_PT_envmap(TextureTypePanel): if env.mapping == 'PLANE': layout.prop(env, "zoom") layout.prop(env, "viewpoint_object") - + split = layout.split() - + col = split.column() col.prop(env, "ignore_layers") col.prop(env, "resolution") @@ -756,7 +756,7 @@ class TEXTURE_PT_envmap(TextureTypePanel): if wide_ui: col = split.column(align=True) - + col.label(text="Clipping:") col.prop(env, "clip_start", text="Start") col.prop(env, "clip_end", text="End") @@ -771,9 +771,9 @@ class TEXTURE_PT_envmap_sampling(TextureTypePanel): layout = self.layout tex = context.texture - + texture_filter_common(tex, layout) - + class TEXTURE_PT_musgrave(TextureTypePanel): bl_label = "Musgrave" diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index 9dc539aa4c6..64b79614a6f 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -279,9 +279,9 @@ class USERPREF_PT_interface(bpy.types.Panel): col.label(text="Menu Open Delay:") col.prop(view, "open_toplevel_delay", text="Top Level") col.prop(view, "open_sublevel_delay", text="Sub Level") - + col.separator() - + col.prop(view, "show_splash") @@ -1408,7 +1408,7 @@ class USERPREF_PT_addons(bpy.types.Panel): userpref = context.user_preferences used_ext = {ext.module for ext in userpref.addons} - + # collect the categories that can be filtered on addons = [(mod, addon_info_get(mod)) for mod in self._addon_list()] @@ -1417,7 +1417,7 @@ class USERPREF_PT_addons(bpy.types.Panel): cats.remove("") cats = ['All', 'Disabled', 'Enabled'] + sorted(cats) - + bpy.types.Scene.EnumProperty(items=[(cats[i], cats[i], str(i)) for i in range(len(cats))], name="Category", attr="addon_filter", description="Filter add-ons by category") bpy.types.Scene.StringProperty(name="Search", attr="addon_search", @@ -1447,12 +1447,12 @@ class USERPREF_PT_addons(bpy.types.Panel): continue else: continue - + # Addon UI Code box = layout.column().box() column = box.column() row = column.row() - + # Arrow # # If there are Infos or UI is expanded if info["expanded"]: @@ -1499,7 +1499,7 @@ def addon_info_get(mod, info_basis={"name": "", "author": "", "version": "", "bl # avoid re-initializing if "_init" in addon_info: return addon_info - + if not addon_info: mod.bl_addon_info = addon_info diff --git a/release/scripts/ui/space_view3d_toolbar.py b/release/scripts/ui/space_view3d_toolbar.py index d702c801b92..c52c93e2189 100644 --- a/release/scripts/ui/space_view3d_toolbar.py +++ b/release/scripts/ui/space_view3d_toolbar.py @@ -745,7 +745,7 @@ class VIEW3D_PT_tools_brush_curve(PaintPanel): brush = settings.brush layout.template_curve_mapping(brush, "curve", brush=True) - + row = layout.row(align=True) row.operator("brush.curve_preset", text="Sharp").shape = 'SHARP' row.operator("brush.curve_preset", text="Smooth").shape = 'SMOOTH' @@ -910,16 +910,16 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel): sub = col.column() sub.prop(ipaint, "seam_bleed") - + row = col.row(align=True) row.operator("image.project_edit", text="View Edit") row.operator("image.project_apply", text="Apply") col.prop(ipaint, "screen_grab_size", text="") - + sub = col.column() sub.operator("paint.project_image") - + sub.operator("image.save_dirty", text="Save Edited")