picky edits - use "" for non enum strings.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -756,7 +756,7 @@ def VectoQuat(vec):
|
||||
|
||||
|
||||
class thickface(object):
|
||||
__slost__= 'v', 'uv', 'no', 'area', 'edge_keys'
|
||||
__slost__= "v", "uv", "no", "area", "edge_keys"
|
||||
def __init__(self, face, uvface, mesh_verts):
|
||||
self.v = [mesh_verts[i] for i in face.vertices]
|
||||
if len(self.v)==4:
|
||||
|
||||
@@ -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:
|
||||
@@ -1185,13 +1184,13 @@ class WM_OT_blenderplayer_start(bpy.types.Operator):
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user