diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-23 12:41:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-23 12:41:53 +0400 |
commit | 4ced91da47ec1e95d71beef07b218fd0290ff68a (patch) | |
tree | 5f96c6268e194dd4cabcbe33efdc2fd226652cab /release/scripts/startup | |
parent | 87a34772003413bd402ea380ce5d8d7c3f3a6337 (diff) | |
parent | ac498a6b64ea2f034aa0177894fb25d0401e327b (diff) |
svn merge ^/trunk/blender -r42778:42839
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_operators/clip.py | 19 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/sequencer.py | 8 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/uvcalc_smart_project.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 35 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 3 |
5 files changed, 35 insertions, 32 deletions
diff --git a/release/scripts/startup/bl_operators/clip.py b/release/scripts/startup/bl_operators/clip.py index 061c66dc1fa..cb21f17cff5 100644 --- a/release/scripts/startup/bl_operators/clip.py +++ b/release/scripts/startup/bl_operators/clip.py @@ -188,7 +188,7 @@ class CLIP_OT_delete_proxy(Operator): proxydir = clip.proxy.directory else: clipdir = os.path.dirname(clip.filepath) - proxydir = os.path.join(clipdir, 'BL_proxy') + proxydir = os.path.join(clipdir, "BL_proxy") clipfile = os.path.basename(clip.filepath) proxy = os.path.join(proxydir, clipfile) @@ -196,15 +196,15 @@ class CLIP_OT_delete_proxy(Operator): # proxy_<quality>[_undostorted] for x in (25, 50, 75, 100): - d = os.path.join(absproxy, 'proxy_' + str(x)) + d = os.path.join(absproxy, "proxy_%d" % x) self._rmproxy(d) - self._rmproxy(d + '_undistorted') - self._rmproxy(os.path.join(absproxy, 'proxy_' + str(x) + '.avi')) + self._rmproxy(d + "_undistorted") + self._rmproxy(os.path.join(absproxy, "proxy_%d.avi" % x)) - tc = ('free_run.blen_tc', - 'interp_free_run.blen_tc', - 'record_run.blen_tc') + tc = ("free_run.blen_tc", + "interp_free_run.blen_tc", + "record_run.blen_tc") for x in tc: self._rmproxy(os.path.join(absproxy, x)) @@ -269,7 +269,7 @@ object's movement caused by this constraint""" # TODO: several camera solvers and track followers would fail, # but can't think about eal workflow where it'll be useful for x in ob.constraints: - if x.type in ('CAMERA_SOLVER', 'FOLLOW_TRACK'): + if x.type in {'CAMERA_SOLVER', 'FOLLOW_TRACK'}: con = x if not con: @@ -340,7 +340,8 @@ object's movement caused by this constraint""" def execute(self, context): scene = context.scene - + # XXX, should probably use context.selected_editable_objects + # since selected objects can be from a lib or in hidden layer! for ob in scene.objects: if ob.select: self._bake_object(scene, ob) diff --git a/release/scripts/startup/bl_operators/sequencer.py b/release/scripts/startup/bl_operators/sequencer.py index 67b9be59f2a..39c73f20664 100644 --- a/release/scripts/startup/bl_operators/sequencer.py +++ b/release/scripts/startup/bl_operators/sequencer.py @@ -60,14 +60,14 @@ class SequencerCrossfadeSounds(Operator): if seq1.frame_final_end > seq2.frame_final_start: tempcfra = context.scene.frame_current context.scene.frame_current = seq2.frame_final_start - seq1.keyframe_insert('volume') + seq1.keyframe_insert("volume") context.scene.frame_current = seq1.frame_final_end seq1.volume = 0 - seq1.keyframe_insert('volume') - seq2.keyframe_insert('volume') + seq1.keyframe_insert("volume") + seq2.keyframe_insert("volume") context.scene.frame_current = seq2.frame_final_start seq2.volume = 0 - seq2.keyframe_insert('volume') + seq2.keyframe_insert("volume") context.scene.frame_current = tempcfra return {'FINISHED'} else: diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py index 4a78d8fc9be..8fee21cdad5 100644 --- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py +++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py @@ -756,7 +756,7 @@ def VectoQuat(vec): class thickface(object): - __slots__= ('v', 'uv', 'no', 'area', 'edge_keys') + __slost__= "v", "uv", "no", "area", "edge_keys" def __init__(self, face, uv_layer, mesh_verts): self.v = [mesh_verts[i] for i in face.vertices] self.uv = [uv_layer[i].uv for i in face.loops] diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 58941e00914..4f498e72f4b 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -766,12 +766,12 @@ class WM_OT_path_open(Operator): return {'CANCELLED'} if sys.platform[:3] == "win": - subprocess.Popen(['start', filepath], shell=True) - elif sys.platform == 'darwin': - subprocess.Popen(['open', filepath]) + subprocess.Popen(["start", filepath], shell=True) + elif sys.platform == "darwin": + subprocess.Popen(["open", filepath]) else: try: - subprocess.Popen(['xdg-open', filepath]) + subprocess.Popen(["xdg-open", filepath]) except OSError: # xdg-open *should* be supported by recent Gnome, KDE, Xfce pass @@ -847,8 +847,8 @@ class WM_OT_doc_edit(Operator): print("sending data:", data_dict) import xmlrpc.client - user = 'blenderuser' - pwd = 'blender>user' + user = "blenderuser" + pwd = "blender>user" docblog = xmlrpc.client.ServerProxy(self._url) docblog.metaWeblog.newPost(1, user, pwd, data_dict, 1) @@ -986,9 +986,8 @@ class WM_OT_properties_edit(Operator): prop_ui = rna_idprop_ui_prop_get(item, prop) if prop_type in {float, int}: - - prop_ui['soft_min'] = prop_ui['min'] = prop_type(self.min) - prop_ui['soft_max'] = prop_ui['max'] = prop_type(self.max) + prop_ui["soft_min"] = prop_ui["min"] = prop_type(self.min) + prop_ui["soft_max"] = prop_ui["max"] = prop_type(self.max) prop_ui['description'] = self.description @@ -1035,7 +1034,7 @@ class WM_OT_properties_add(Operator): item = eval("context.%s" % data_path) def unique_name(names): - prop = 'prop' + prop = "prop" prop_new = prop i = 1 while prop_new in names: @@ -1163,10 +1162,10 @@ class WM_OT_copy_prev_settings(Operator): # in 2.57 and earlier windows installers, system scripts were copied # into the configuration directory, don't want to copy those - system_script = os.path.join(path_dst, 'scripts/modules/bpy_types.py') + system_script = os.path.join(path_dst, "scripts/modules/bpy_types.py") if os.path.isfile(system_script): - shutil.rmtree(os.path.join(path_dst, 'scripts')) - shutil.rmtree(os.path.join(path_dst, 'plugins')) + shutil.rmtree(os.path.join(path_dst, "scripts")) + shutil.rmtree(os.path.join(path_dst, "plugins")) # don't loose users work if they open the splash later. if bpy.data.is_saved is bpy.data.is_dirty is False: @@ -1178,20 +1177,20 @@ class WM_OT_copy_prev_settings(Operator): return {'CANCELLED'} class WM_OT_blenderplayer_start(bpy.types.Operator): - '''Launches the Blenderplayer with the current blendfile''' + '''Launch the Blenderplayer with the current blendfile''' bl_idname = "wm.blenderplayer_start" bl_label = "Start" blender_bin_path = bpy.app.binary_path blender_bin_dir = os.path.dirname(blender_bin_path) ext = os.path.splitext(blender_bin_path)[-1] - player_path = os.path.join(blender_bin_dir, 'blenderplayer' + ext) + player_path = os.path.join(blender_bin_dir, "blenderplayer" + ext) def execute(self, context): import sys - if sys.platform == 'darwin': - self.player_path = os.path.join(self.blender_bin_dir, '../../../blenderplayer.app/Contents/MacOS/blenderplayer') + if sys.platform == "darwin": + self.player_path = os.path.join(self.blender_bin_dir, "../../../blenderplayer.app/Contents/MacOS/blenderplayer") filepath = bpy.app.tempdir + "game.blend" bpy.ops.wm.save_as_mainfile(filepath=filepath, check_existing=False, copy=True) @@ -1451,7 +1450,7 @@ class WM_OT_operator_cheat_sheet(Operator): for op_submodule_name in dir(op_module): op = getattr(op_module, op_submodule_name) text = repr(op) - if text.split("\n")[-1].startswith('bpy.ops.'): + if text.split("\n")[-1].startswith("bpy.ops."): op_strings.append(text) tot += 1 diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 85c4f222fe5..6801c2100ed 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -992,6 +992,7 @@ class VIEW3D_MT_object_game(Menu): layout = self.layout layout.operator("object.logic_bricks_copy", text="Copy Logic Bricks") + layout.operator("object.game_physics_copy", text="Copy Physics Properties") layout.separator() @@ -2247,6 +2248,8 @@ class VIEW3D_PT_view3d_meshdisplay(Panel): col.prop(mesh, "show_extra_edge_length") col.prop(mesh, "show_extra_face_angle") col.prop(mesh, "show_extra_face_area") + if bpy.app.debug: + col.prop(mesh, "show_extra_indices") class VIEW3D_PT_view3d_curvedisplay(Panel): |