style cleanup
This commit is contained in:
@@ -15,4 +15,3 @@ you would pass {'active_object': object}.
|
||||
import bpy
|
||||
override = {'selected_bases': list(bpy.context.scene.object_bases)}
|
||||
bpy.ops.object.delete(override)
|
||||
|
||||
|
||||
@@ -9,10 +9,9 @@ import bpy
|
||||
|
||||
for window in bpy.context.window_manager.windows:
|
||||
screen = window.screen
|
||||
|
||||
|
||||
for area in screen.areas:
|
||||
if area.type == 'VIEW_3D':
|
||||
override = {'window': window, 'screen': screen, 'area': area}
|
||||
bpy.ops.screen.screen_full_area(override)
|
||||
break
|
||||
|
||||
|
||||
@@ -336,7 +336,7 @@ class CyclesCameraSettings(bpy.types.PropertyGroup):
|
||||
cls.fisheye_fov = FloatProperty(
|
||||
name="Field of View",
|
||||
description="Field of view for the fisheye lens",
|
||||
min=0.1745, soft_max=2*math.pi, max=10.0*math.pi,
|
||||
min=0.1745, soft_max=2 * math.pi, max=10.0 * math.pi,
|
||||
subtype='ANGLE',
|
||||
default=math.pi,
|
||||
)
|
||||
|
||||
@@ -85,6 +85,7 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
|
||||
sub.prop(cscene, "ao_samples", text="AO")
|
||||
sub.prop(cscene, "mesh_light_samples", text="Mesh Light")
|
||||
|
||||
|
||||
class CyclesRender_PT_light_paths(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Light Paths"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
@@ -545,6 +546,7 @@ class CyclesLamp_PT_nodes(CyclesButtonsPanel, Panel):
|
||||
if not panel_node_draw(layout, lamp, 'OUTPUT_LAMP', 'Surface'):
|
||||
layout.prop(lamp, "color")
|
||||
|
||||
|
||||
class CyclesLamp_PT_spot(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Spot Shape"
|
||||
bl_context = "data"
|
||||
@@ -569,6 +571,7 @@ class CyclesLamp_PT_spot(CyclesButtonsPanel, Panel):
|
||||
col = split.column()
|
||||
col.prop(lamp, "show_cone")
|
||||
|
||||
|
||||
class CyclesWorld_PT_surface(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Surface"
|
||||
bl_context = "world"
|
||||
|
||||
@@ -61,9 +61,9 @@ fpout.write("const char * clkernelstoh_%s = " % filename)
|
||||
|
||||
lines = fpin.readlines()
|
||||
for line in lines:
|
||||
fpout.write("\"")
|
||||
fpout.write(line.rstrip())
|
||||
fpout.write("\\n\" \\\n")
|
||||
fpout.write("\"")
|
||||
fpout.write(line.rstrip())
|
||||
fpout.write("\\n\" \\\n")
|
||||
fpout.write("\"\\0\";\n")
|
||||
|
||||
fpin.close()
|
||||
|
||||
@@ -183,8 +183,8 @@ def modules(module_cache):
|
||||
del modules_stale
|
||||
|
||||
mod_list = list(module_cache.values())
|
||||
mod_list.sort(key=lambda mod: (mod.bl_info['category'],
|
||||
mod.bl_info['name'],
|
||||
mod_list.sort(key=lambda mod: (mod.bl_info["category"],
|
||||
mod.bl_info["name"],
|
||||
))
|
||||
return mod_list
|
||||
|
||||
|
||||
@@ -887,9 +887,9 @@ if __name__ == "__main__":
|
||||
# Example, should be called externally
|
||||
# (class, from, to)
|
||||
replace_ls = [
|
||||
('AnimVizMotionPaths', 'frame_after', 'frame_after'),
|
||||
('AnimVizMotionPaths', 'frame_before', 'frame_before'),
|
||||
('AnimVizOnionSkinning', 'frame_after', 'frame_after'),
|
||||
("AnimVizMotionPaths", "frame_after", "frame_after"),
|
||||
("AnimVizMotionPaths", "frame_before", "frame_before"),
|
||||
("AnimVizOnionSkinning", "frame_after", "frame_after"),
|
||||
]
|
||||
|
||||
update_data_paths(replace_ls)
|
||||
|
||||
@@ -36,14 +36,14 @@ def read_blend_rend_chunk(path):
|
||||
|
||||
import struct
|
||||
|
||||
blendfile = open(path, 'rb')
|
||||
blendfile = open(path, "rb")
|
||||
|
||||
head = blendfile.read(7)
|
||||
|
||||
if head[0:2] == b'\x1f\x8b': # gzip magic
|
||||
import gzip
|
||||
blendfile.close()
|
||||
blendfile = gzip.open(path, 'rb')
|
||||
blendfile = gzip.open(path, "rb")
|
||||
head = blendfile.read(7)
|
||||
|
||||
if head != b'BLENDER':
|
||||
@@ -80,7 +80,7 @@ def read_blend_rend_chunk(path):
|
||||
scene_name = scene_name[:scene_name.index(b'\0')]
|
||||
|
||||
try:
|
||||
scene_name = str(scene_name, 'utf8')
|
||||
scene_name = str(scene_name, "utf8")
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
|
||||
@@ -63,11 +63,11 @@ def main():
|
||||
#~ if "-d" in sys.argv: # Enable this to measure start up speed
|
||||
if 0:
|
||||
import cProfile
|
||||
cProfile.run('import bpy; bpy.utils.load_scripts()', 'blender.prof')
|
||||
cProfile.run("import bpy; bpy.utils.load_scripts()", "blender.prof")
|
||||
|
||||
import pstats
|
||||
p = pstats.Stats('blender.prof')
|
||||
p.sort_stats('cumulative').print_stats(100)
|
||||
p = pstats.Stats("blender.prof")
|
||||
p.sort_stats("cumulative").print_stats(100)
|
||||
|
||||
else:
|
||||
utils.load_scripts()
|
||||
|
||||
@@ -74,7 +74,7 @@ class BPyOpsSubMod(object):
|
||||
|
||||
eg. bpy.ops.object
|
||||
'''
|
||||
__keys__ = ('module',)
|
||||
__keys__ = ("module",)
|
||||
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
@@ -111,7 +111,7 @@ class BPyOpsSubModOp(object):
|
||||
eg. bpy.ops.object.somefunc
|
||||
'''
|
||||
|
||||
__keys__ = ('module', 'func')
|
||||
__keys__ = ("module", "func")
|
||||
|
||||
def _get_doc(self):
|
||||
return op_as_string(self.idname())
|
||||
|
||||
@@ -489,7 +489,7 @@ def keyconfig_set(filepath):
|
||||
|
||||
try:
|
||||
keyfile = open(filepath)
|
||||
exec(compile(keyfile.read(), filepath, 'exec'), {"__file__": filepath})
|
||||
exec(compile(keyfile.read(), filepath, "exec"), {"__file__": filepath})
|
||||
keyfile.close()
|
||||
except:
|
||||
import traceback
|
||||
|
||||
@@ -71,7 +71,7 @@ def load_image(imagepath,
|
||||
def _image_load_placeholder(path):
|
||||
name = bpy.path.basename(path)
|
||||
if type(name) == bytes:
|
||||
name = name.decode('utf-8', "replace")
|
||||
name = name.decode("utf-8", "replace")
|
||||
image = bpy.data.images.new(name, 128, 128)
|
||||
# allow the path to be resolved later
|
||||
image.filepath = path
|
||||
|
||||
@@ -171,7 +171,7 @@ def keyconfig_export(wm, kc, filepath):
|
||||
# First add all user_modified keymaps (found in keyconfigs.user.keymaps list),
|
||||
# then add all remaining keymaps from the currently active custom keyconfig.
|
||||
#
|
||||
# This will create a final list of keymaps that can be used as a 'diff' against
|
||||
# This will create a final list of keymaps that can be used as a "diff" against
|
||||
# the default blender keyconfig, recreating the current setup from a fresh blender
|
||||
# without needing to export keymaps which haven't been edited.
|
||||
|
||||
|
||||
@@ -414,7 +414,7 @@ def ngon_tessellate(from_data, indices, fix_loops=True):
|
||||
|
||||
fill = tessellate_polygon([[v[0] for v in loop] for loop in loop_list])
|
||||
#draw_loops(loop_list)
|
||||
#raise 'done loop'
|
||||
#raise Exception("done loop")
|
||||
# map to original indices
|
||||
fill = [[vert_map[i] for i in reversed(f)] for f in fill]
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ def _call_recursive(context, base, py_node):
|
||||
value = eval(value, {"context": _bpy.context})
|
||||
setattr(base, py_node[TAG], value)
|
||||
else:
|
||||
value = py_node[ARGS]['value'] # have to have this
|
||||
value = py_node[ARGS]["value"] # have to have this
|
||||
setattr(base, py_node[TAG], value)
|
||||
else:
|
||||
args = _parse_rna_args(base, py_node)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
import os
|
||||
import bpy
|
||||
|
||||
language_id = 'shell'
|
||||
language_id = "shell"
|
||||
|
||||
|
||||
def add_scrollback(text, text_type):
|
||||
|
||||
@@ -172,7 +172,7 @@ def graph_armature(obj, filepath, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=Tr
|
||||
fileobject.close()
|
||||
|
||||
'''
|
||||
print(".", end='')
|
||||
print(".", end="")
|
||||
import sys
|
||||
sys.stdout.flush()
|
||||
'''
|
||||
|
||||
@@ -66,9 +66,9 @@ def rna_id_ignore(rna_id):
|
||||
|
||||
def range_str(val):
|
||||
if val < -10000000:
|
||||
return '-inf'
|
||||
return "-inf"
|
||||
elif val > 10000000:
|
||||
return 'inf'
|
||||
return "inf"
|
||||
elif type(val) == float:
|
||||
return '%g' % val
|
||||
else:
|
||||
@@ -305,8 +305,8 @@ class InfoPropertyRNA:
|
||||
return type_str
|
||||
|
||||
def __str__(self):
|
||||
txt = ''
|
||||
txt += ' * ' + self.identifier + ': ' + self.description
|
||||
txt = ""
|
||||
txt += " * " + self.identifier + ": " + self.description
|
||||
|
||||
return txt
|
||||
|
||||
@@ -398,7 +398,7 @@ class InfoOperatorRNA:
|
||||
return None, None
|
||||
|
||||
|
||||
def _GetInfoRNA(bl_rna, cls, parent_id=''):
|
||||
def _GetInfoRNA(bl_rna, cls, parent_id=""):
|
||||
|
||||
if bl_rna is None:
|
||||
return None
|
||||
@@ -641,7 +641,7 @@ if __name__ == "__main__":
|
||||
|
||||
props = [(prop.identifier, prop) for prop in v.properties]
|
||||
for prop_id, prop in sorted(props):
|
||||
# if prop.type == 'boolean':
|
||||
# if prop.type == "boolean":
|
||||
# continue
|
||||
prop_type = prop.type
|
||||
if prop.array_length > 0:
|
||||
|
||||
@@ -352,7 +352,7 @@ def xml_file_run(context, filepath, rna_map):
|
||||
|
||||
def xml_file_write(context, filepath, rna_map):
|
||||
|
||||
file = open(filepath, 'w', encoding='utf-8')
|
||||
file = open(filepath, "w", encoding="utf-8")
|
||||
fw = file.write
|
||||
|
||||
fw("<bpy>\n")
|
||||
|
||||
@@ -27,7 +27,7 @@ import sys
|
||||
|
||||
|
||||
def cutPoint(text, length):
|
||||
"Returns position of the last space found before 'length' chars"
|
||||
"""Returns position of the last space found before 'length' chars"""
|
||||
l = length
|
||||
c = text[l]
|
||||
while c != ' ':
|
||||
@@ -98,7 +98,7 @@ def write_sysinfo(op):
|
||||
output.write(lilies)
|
||||
ffmpeg = bpy.app.ffmpeg
|
||||
if ffmpeg.supported:
|
||||
for lib in ['avcodec', 'avdevice', 'avformat', 'avutil', 'swscale']:
|
||||
for lib in ("avcodec", "avdevice", "avformat", "avutil", "swscale"):
|
||||
output.write("%r:%r%r\n" % (lib, " " * (10 - len(lib)),
|
||||
getattr(ffmpeg, lib + "_version_string")))
|
||||
else:
|
||||
|
||||
@@ -227,7 +227,7 @@ class BakeAction(Operator):
|
||||
self.frame_start = scene.frame_start
|
||||
self.frame_end = scene.frame_end
|
||||
self.bake_types = {'POSE'} if context.mode == 'POSE' else {'OBJECT'}
|
||||
|
||||
|
||||
wm = context.window_manager
|
||||
return wm.invoke_props_dialog(self)
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ class ConsoleBanner(Operator):
|
||||
|
||||
# default to python
|
||||
if not sc.language:
|
||||
sc.language = 'python'
|
||||
sc.language = "python"
|
||||
|
||||
module = _lang_module_get(sc)
|
||||
banner = getattr(module, "banner", None)
|
||||
|
||||
@@ -34,7 +34,8 @@ class SelectPattern(Operator):
|
||||
|
||||
pattern = StringProperty(
|
||||
name="Pattern",
|
||||
description="Name filter using '*', '?' and '[abc]' unix style wildcards",
|
||||
description="Name filter using '*', '?' and "
|
||||
"'[abc]' unix style wildcards",
|
||||
maxlen=64,
|
||||
default="*",
|
||||
)
|
||||
@@ -130,8 +131,8 @@ class SelectCamera(Operator):
|
||||
|
||||
|
||||
class SelectHierarchy(Operator):
|
||||
'''Select object relative to the active object's position ''' \
|
||||
'''in the hierarchy'''
|
||||
"""Select object relative to the active object's position """
|
||||
"""in the hierarchy"""
|
||||
bl_idname = "object.select_hierarchy"
|
||||
bl_label = "Select Hierarchy"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
@@ -277,8 +278,8 @@ class SubdivisionSet(Operator):
|
||||
|
||||
|
||||
class ShapeTransfer(Operator):
|
||||
'''Copy another selected objects active shape to this one by ''' \
|
||||
'''applying the relative offsets'''
|
||||
"""Copy another selected objects active shape to this one by """
|
||||
"""applying the relative offsets"""
|
||||
|
||||
bl_idname = "object.shape_key_transfer"
|
||||
bl_label = "Transfer Shape Key"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8-80 compliant>
|
||||
# <pep8 compliant>
|
||||
|
||||
import bpy
|
||||
from bpy.types import Menu, Operator
|
||||
|
||||
@@ -107,7 +107,6 @@ def boundsEdgeLoop(edges):
|
||||
# print len(faces), minx, maxx, miny , maxy
|
||||
for ed in edges:
|
||||
for pt in ed:
|
||||
print 'ass'
|
||||
x= pt[0]
|
||||
y= pt[1]
|
||||
if x<minx: x= minx
|
||||
@@ -502,7 +501,6 @@ def mergeUvIslands(islandList):
|
||||
|
||||
It gives about 10% speedup with minimal errors.
|
||||
'''
|
||||
#print 'ass'
|
||||
# Move the test along its width + SMALL_NUM
|
||||
#boxLeft += sourceIsland[4] + SMALL_NUM
|
||||
boxLeft += sourceIsland[4]
|
||||
@@ -832,7 +830,7 @@ def main(context,
|
||||
USER_ONLY_SELECTED_FACES = False
|
||||
|
||||
if not obList:
|
||||
raise('error, no selected mesh objects')
|
||||
raise Exception("error, no selected mesh objects")
|
||||
|
||||
# Reuse variable
|
||||
if len(obList) == 1:
|
||||
|
||||
@@ -138,7 +138,7 @@ def execute_context_assign(self, context):
|
||||
|
||||
|
||||
class BRUSH_OT_active_index_set(Operator):
|
||||
'''Set active sculpt/paint brush from it's number'''
|
||||
"""Set active sculpt/paint brush from it's number"""
|
||||
bl_idname = "brush.active_index_set"
|
||||
bl_label = "Set Brush Number"
|
||||
|
||||
@@ -371,8 +371,8 @@ class WM_OT_context_toggle_enum(Operator):
|
||||
|
||||
|
||||
class WM_OT_context_cycle_int(Operator):
|
||||
'''Set a context value. Useful for cycling active material, '''
|
||||
'''vertex keys, groups' etc'''
|
||||
"""Set a context value. Useful for cycling active material, """
|
||||
"""vertex keys, groups' etc"""
|
||||
bl_idname = "wm.context_cycle_int"
|
||||
bl_label = "Context Int Cycle"
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
@@ -799,7 +799,6 @@ class WM_OT_path_open(Operator):
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
||||
def _wm_doc_get_id(doc_id, do_url=True, url_prefix=""):
|
||||
id_split = doc_id.split(".")
|
||||
url = rna = None
|
||||
@@ -832,7 +831,7 @@ def _wm_doc_get_id(doc_id, do_url=True, url_prefix=""):
|
||||
url = ("%s/bpy.types.%s.html#bpy.types.%s.%s" % (url_prefix, class_name, class_name, class_prop))
|
||||
else:
|
||||
rna = ("bpy.types.%s.%s" % (class_name, class_prop))
|
||||
|
||||
|
||||
return url if do_url else rna
|
||||
|
||||
|
||||
@@ -1061,7 +1060,7 @@ class WM_OT_properties_edit(Operator):
|
||||
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
|
||||
prop_ui["description"] = self.description
|
||||
|
||||
# otherwise existing buttons which reference freed
|
||||
# memory may crash blender [#26510]
|
||||
@@ -1597,10 +1596,11 @@ class WM_OT_addon_disable(Operator):
|
||||
addon_utils.disable(self.module)
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
class WM_OT_theme_install(Operator):
|
||||
"Install a theme"
|
||||
bl_idname = "wm.theme_install"
|
||||
bl_label = "Install Theme..."
|
||||
bl_label = "Install Theme..."
|
||||
|
||||
overwrite = BoolProperty(
|
||||
name="Overwrite",
|
||||
@@ -1624,10 +1624,10 @@ class WM_OT_theme_install(Operator):
|
||||
import os
|
||||
import shutil
|
||||
import traceback
|
||||
|
||||
|
||||
xmlfile = self.filepath
|
||||
|
||||
path_themes = bpy.utils.user_resource('SCRIPTS','presets/interface_theme',create=True)
|
||||
path_themes = bpy.utils.user_resource('SCRIPTS', "presets/interface_theme", create=True)
|
||||
|
||||
if not path_themes:
|
||||
self.report({'ERROR'}, "Failed to get themes path")
|
||||
@@ -1642,7 +1642,7 @@ class WM_OT_theme_install(Operator):
|
||||
|
||||
try:
|
||||
shutil.copyfile(xmlfile, path_dest)
|
||||
bpy.ops.script.execute_preset(filepath=path_dest,menu_idname="USERPREF_MT_interface_theme_presets")
|
||||
bpy.ops.script.execute_preset(filepath=path_dest, menu_idname="USERPREF_MT_interface_theme_presets")
|
||||
|
||||
except:
|
||||
traceback.print_exc()
|
||||
@@ -1650,7 +1650,6 @@ class WM_OT_theme_install(Operator):
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
def invoke(self, context, event):
|
||||
wm = context.window_manager
|
||||
wm.fileselect_add(self)
|
||||
|
||||
@@ -120,13 +120,13 @@ class BONE_PT_transform_locks(BoneButtonsPanel, Panel):
|
||||
pchan = ob.pose.bones[bone.name]
|
||||
|
||||
split = layout.split(percentage=0.1)
|
||||
|
||||
|
||||
col = split.column(align=True)
|
||||
col.label(text="")
|
||||
col.label(text="X:")
|
||||
col.label(text="Y:")
|
||||
col.label(text="Z:")
|
||||
|
||||
|
||||
col = split.row()
|
||||
sub = col.row()
|
||||
sub.active = not (bone.parent and bone.use_connect)
|
||||
@@ -137,7 +137,7 @@ class BONE_PT_transform_locks(BoneButtonsPanel, Panel):
|
||||
if pchan.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
|
||||
row = layout.row()
|
||||
row.prop(pchan, "lock_rotations_4d", text="Lock Rotation")
|
||||
|
||||
|
||||
sub = row.row()
|
||||
sub.active = pchan.lock_rotations_4d
|
||||
sub.prop(pchan, "lock_rotation_w", text="W")
|
||||
|
||||
@@ -406,7 +406,7 @@ class DATA_PT_text_boxes(CurveButtonsPanel, Panel):
|
||||
col.prop(box, "x", text="X")
|
||||
col.prop(box, "y", text="Y")
|
||||
|
||||
row.operator("font.textbox_remove", text='', icon='X', emboss=False).index = i
|
||||
row.operator("font.textbox_remove", text="", icon='X', emboss=False).index = i
|
||||
|
||||
|
||||
class DATA_PT_custom_props_curve(CurveButtonsPanel, PropertyPanel, Panel):
|
||||
|
||||
@@ -969,7 +969,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
|
||||
|
||||
layout.label(text="Selected Vertices:")
|
||||
split = layout.split()
|
||||
|
||||
|
||||
col = split.column(align=True)
|
||||
col.operator("object.skin_loose_mark_clear", text="Mark Loose").action = "MARK"
|
||||
col.operator("object.skin_loose_mark_clear", text="Clear Loose").action = "CLEAR"
|
||||
@@ -983,6 +983,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
|
||||
col.prop(md, "use_x_symmetry")
|
||||
col.prop(md, "use_y_symmetry")
|
||||
col.prop(md, "use_z_symmetry")
|
||||
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
bpy.utils.register_module(__name__)
|
||||
|
||||
@@ -105,13 +105,13 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel, Panel):
|
||||
ob = context.object
|
||||
|
||||
split = layout.split(percentage=0.1)
|
||||
|
||||
|
||||
col = split.column(align=True)
|
||||
col.label(text="")
|
||||
col.label(text="X:")
|
||||
col.label(text="Y:")
|
||||
col.label(text="Z:")
|
||||
|
||||
|
||||
col = split.row()
|
||||
col.column().prop(ob, "lock_location", text="Location")
|
||||
col.column().prop(ob, "lock_rotation", text="Rotation")
|
||||
@@ -120,7 +120,7 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel, Panel):
|
||||
if ob.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
|
||||
row = layout.row()
|
||||
row.prop(ob, "lock_rotations_4d", text="Lock Rotation")
|
||||
|
||||
|
||||
sub = row.row()
|
||||
sub.active = ob.lock_rotations_4d
|
||||
sub.prop(ob, "lock_rotation_w", text="W")
|
||||
|
||||
@@ -526,7 +526,7 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel):
|
||||
if ffmpeg.format in {'AVI', 'QUICKTIME', 'MKV', 'OGG'}:
|
||||
split.prop(ffmpeg, "codec")
|
||||
elif rd.ffmpeg.format == 'H264':
|
||||
split.prop(ffmpeg, 'use_lossless_output')
|
||||
split.prop(ffmpeg, "use_lossless_output")
|
||||
else:
|
||||
split.label()
|
||||
|
||||
@@ -575,7 +575,7 @@ class RENDER_PT_bake(RenderButtonsPanel, Panel):
|
||||
|
||||
multires_bake = False
|
||||
if rd.bake_type in ['NORMALS', 'DISPLACEMENT']:
|
||||
layout.prop(rd, 'use_bake_multires')
|
||||
layout.prop(rd, "use_bake_multires")
|
||||
multires_bake = rd.use_bake_multires
|
||||
|
||||
if not multires_bake:
|
||||
|
||||
@@ -165,7 +165,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, Panel):
|
||||
row.label(text="Array Target:")
|
||||
row.prop(ksp, "use_entire_array", text="All Items")
|
||||
if ksp.use_entire_array:
|
||||
row.label(text=" ") # padding
|
||||
row.label(text=" ") # padding
|
||||
else:
|
||||
row.prop(ksp, "array_index", text="Index")
|
||||
|
||||
@@ -177,7 +177,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, Panel):
|
||||
col.prop(ksp, "group_method", text="")
|
||||
if ksp.group_method == 'NAMED':
|
||||
col.prop(ksp, "group")
|
||||
|
||||
|
||||
col = row.column(align=True)
|
||||
col.label(text="Keyframing Settings:")
|
||||
col.prop(ksp, "bl_options")
|
||||
|
||||
@@ -48,7 +48,7 @@ class CLIP_HT_header(Header):
|
||||
sub.menu("CLIP_MT_clip")
|
||||
|
||||
row = layout.row()
|
||||
row.template_ID(sc, "clip", open='clip.open')
|
||||
row.template_ID(sc, "clip", open="clip.open")
|
||||
|
||||
if clip:
|
||||
tracking = clip.tracking
|
||||
@@ -95,7 +95,8 @@ class CLIP_HT_header(Header):
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(dopesheet, "sort_method", text="")
|
||||
row.prop(dopesheet, "use_invert_sort", text="Invert", toggle=True)
|
||||
row.prop(dopesheet, "use_invert_sort",
|
||||
text="Invert", toggle=True)
|
||||
else:
|
||||
layout.prop(sc, "view", text="", expand=True)
|
||||
|
||||
@@ -121,7 +122,7 @@ class CLIP_HT_header(Header):
|
||||
sub.menu("CLIP_MT_clip")
|
||||
|
||||
row = layout.row()
|
||||
row.template_ID(sc, "clip", open='clip.open')
|
||||
row.template_ID(sc, "clip", open="clip.open")
|
||||
|
||||
layout.prop(sc, "mode", text="")
|
||||
|
||||
@@ -255,7 +256,7 @@ class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
|
||||
col.prop(settings, "default_pattern_match", text="")
|
||||
|
||||
col.separator()
|
||||
col.operator('clip.track_settings_as_default',
|
||||
col.operator("clip.track_settings_as_default",
|
||||
text="Copy From Active Track")
|
||||
|
||||
|
||||
@@ -340,9 +341,9 @@ class CLIP_PT_tools_cleanup(CLIP_PT_tracking_panel, Panel):
|
||||
|
||||
layout.operator("clip.clean_tracks")
|
||||
|
||||
layout.prop(settings, 'clean_frames', text="Frames")
|
||||
layout.prop(settings, 'clean_error', text="Error")
|
||||
layout.prop(settings, 'clean_action', text="")
|
||||
layout.prop(settings, "clean_frames", text="Frames")
|
||||
layout.prop(settings, "clean_error", text="Error")
|
||||
layout.prop(settings, "clean_action", text="")
|
||||
|
||||
|
||||
class CLIP_PT_tools_geometry(CLIP_PT_reconstruction_panel, Panel):
|
||||
@@ -553,7 +554,8 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
|
||||
|
||||
row.separator()
|
||||
sub = row.row()
|
||||
sub.prop(act_track, "use_alpha_preview", text="", toggle=True, icon='IMAGE_ALPHA')
|
||||
sub.prop(act_track, "use_alpha_preview",
|
||||
text="", toggle=True, icon='IMAGE_ALPHA')
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -735,7 +737,9 @@ class CLIP_PT_active_mask_point(Panel):
|
||||
mask = sc.mask
|
||||
|
||||
if mask and sc.mode == 'MASKEDIT':
|
||||
return mask.layers.active and mask.layers.active.splines.active_point
|
||||
mask_layer_active = mask.layers.active
|
||||
return (mask_layer_active and
|
||||
mask_layer_active.splines.active_point)
|
||||
|
||||
return False
|
||||
|
||||
@@ -979,7 +983,7 @@ class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel):
|
||||
|
||||
layout.prop(clip.proxy, "quality")
|
||||
|
||||
layout.prop(clip, 'use_proxy_custom_directory')
|
||||
layout.prop(clip, "use_proxy_custom_directory")
|
||||
if clip.use_proxy_custom_directory:
|
||||
layout.prop(clip.proxy, "directory")
|
||||
|
||||
@@ -1053,7 +1057,8 @@ class CLIP_MT_view(Menu):
|
||||
|
||||
for a, b in ratios:
|
||||
text = "Zoom %d:%d" % (a, b)
|
||||
layout.operator("clip.view_zoom_ratio", text=text).ratio = a / b
|
||||
layout.operator("clip.view_zoom_ratio",
|
||||
text=text).ratio = a / b
|
||||
else:
|
||||
layout.prop(sc, "show_seconds")
|
||||
layout.separator()
|
||||
@@ -1203,16 +1208,20 @@ class CLIP_MT_select(Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("mask.select_all").action = 'TOGGLE'
|
||||
layout.operator("mask.select_all", text="Inverse").action = 'INVERT'
|
||||
layout.operator("mask.select_all"
|
||||
).action = 'TOGGLE'
|
||||
layout.operator("mask.select_all",
|
||||
text="Inverse").action = 'INVERT'
|
||||
else:
|
||||
layout.operator("clip.select_border")
|
||||
layout.operator("clip.select_circle")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("clip.select_all").action = 'TOGGLE'
|
||||
layout.operator("clip.select_all", text="Inverse").action = 'INVERT'
|
||||
layout.operator("clip.select_all"
|
||||
).action = 'TOGGLE'
|
||||
layout.operator("clip.select_all",
|
||||
text="Inverse").action = 'INVERT'
|
||||
|
||||
layout.menu("CLIP_MT_select_grouped")
|
||||
|
||||
@@ -1349,7 +1358,7 @@ class CLIP_MT_track_color_specials(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator('clip.track_copy_color', icon='COPY_ID')
|
||||
layout.operator("clip.track_copy_color", icon='COPY_ID')
|
||||
|
||||
|
||||
class CLIP_MT_stabilize_2d_specials(Menu):
|
||||
@@ -1358,7 +1367,7 @@ class CLIP_MT_stabilize_2d_specials(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator('clip.stabilize_2d_select')
|
||||
layout.operator("clip.stabilize_2d_select")
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
bpy.utils.register_module(__name__)
|
||||
|
||||
@@ -371,16 +371,16 @@ class INFO_MT_help(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:2.6/Manual'
|
||||
layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-263/'
|
||||
layout.operator("wm.url_open", text="Manual", icon='HELP').url = "http://wiki.blender.org/index.php/Doc:2.6/Manual"
|
||||
layout.operator("wm.url_open", text="Release Log", icon='URL').url = "http://www.blender.org/development/release-logs/blender-263"
|
||||
layout.separator()
|
||||
|
||||
layout.operator("wm.url_open", text="Blender Website", icon='URL').url = 'http://www.blender.org/'
|
||||
layout.operator("wm.url_open", text="Blender e-Shop", icon='URL').url = 'http://www.blender.org/e-shop'
|
||||
layout.operator("wm.url_open", text="Developer Community", icon='URL').url = 'http://www.blender.org/community/get-involved/'
|
||||
layout.operator("wm.url_open", text="User Community", icon='URL').url = 'http://www.blender.org/community/user-community/'
|
||||
layout.operator("wm.url_open", text="Blender Website", icon='URL').url = "http://www.blender.org"
|
||||
layout.operator("wm.url_open", text="Blender e-Shop", icon='URL').url = "http://www.blender.org/e-shop"
|
||||
layout.operator("wm.url_open", text="Developer Community", icon='URL').url = "http://www.blender.org/community/get-involved"
|
||||
layout.operator("wm.url_open", text="User Community", icon='URL').url = "http://www.blender.org/community/user-community"
|
||||
layout.separator()
|
||||
layout.operator("wm.url_open", text="Report a Bug", icon='URL').url = 'http://projects.blender.org/tracker/?atid=498&group_id=9&func=browse'
|
||||
layout.operator("wm.url_open", text="Report a Bug", icon='URL').url = "http://projects.blender.org/tracker/?atid=498&group_id=9&func=browse"
|
||||
layout.separator()
|
||||
|
||||
layout.operator("wm.url_open", text="Python API Reference", icon='URL').url = bpy.types.WM_OT_doc_view._prefix
|
||||
|
||||
@@ -205,6 +205,7 @@ class NODE_PT_properties(Panel):
|
||||
col.prop(snode, "backdrop_y", text="Y")
|
||||
col.operator("node.backimage_move", text="Move")
|
||||
|
||||
|
||||
class NODE_PT_quality(bpy.types.Panel):
|
||||
bl_space_type = 'NODE_EDITOR'
|
||||
bl_region_type = 'UI'
|
||||
@@ -225,7 +226,7 @@ class NODE_PT_quality(bpy.types.Panel):
|
||||
layout.prop(tree, "chunk_size")
|
||||
layout.prop(tree, "use_opencl")
|
||||
|
||||
|
||||
|
||||
class NODE_MT_node_color_presets(Menu):
|
||||
"""Predefined node color"""
|
||||
bl_label = "Color Presets"
|
||||
@@ -240,8 +241,8 @@ class NODE_MT_node_color_specials(Menu):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator('node.node_copy_color', icon='COPY_ID')
|
||||
layout.operator("node.node_copy_color", icon='COPY_ID')
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
bpy.utils.register_module(__name__)
|
||||
|
||||
@@ -352,7 +352,7 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
|
||||
scene = context.scene
|
||||
frame_current = scene.frame_current
|
||||
strip = act_strip(context)
|
||||
@@ -474,7 +474,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
|
||||
elif strip.type == 'TRANSFORM':
|
||||
layout = self.layout
|
||||
col = layout.column()
|
||||
|
||||
|
||||
col.prop(strip, "interpolation")
|
||||
col.prop(strip, "translation_unit")
|
||||
col = layout.column(align=True)
|
||||
@@ -483,7 +483,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
|
||||
col.prop(strip, "translate_start_y", text="Y")
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.prop(strip, "use_uniform_scale")
|
||||
if (strip.use_uniform_scale):
|
||||
@@ -568,10 +568,10 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
|
||||
split = layout.split(percentage=0.2)
|
||||
split.label(text="Path:")
|
||||
split.prop(strip, "filepath", text="")
|
||||
|
||||
|
||||
layout.prop(strip, "mpeg_preseek")
|
||||
layout.prop(strip, "stream_index")
|
||||
|
||||
|
||||
layout.prop(strip, "use_translation", text="Image Offset")
|
||||
if strip.use_translation:
|
||||
col = layout.column(align=True)
|
||||
@@ -740,13 +740,13 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
|
||||
col = layout.column()
|
||||
col.label(text="Distortion:")
|
||||
col.prop(strip, "undistort")
|
||||
|
||||
|
||||
split = layout.split(percentage=0.65)
|
||||
|
||||
col = split.column()
|
||||
col.prop(strip, "use_reverse_frames", text="Backwards")
|
||||
col.prop(strip, "use_deinterlace")
|
||||
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Flip:")
|
||||
col.prop(strip, "use_flip_x", text="X")
|
||||
|
||||
@@ -245,7 +245,7 @@ class USERPREF_PT_interface(Panel):
|
||||
|
||||
col.prop(view, "show_splash")
|
||||
|
||||
if os.name == 'nt':
|
||||
if os.name == "nt":
|
||||
col.prop(view, "quit_dialog")
|
||||
|
||||
|
||||
@@ -419,7 +419,7 @@ class USERPREF_PT_system(Panel):
|
||||
col.separator()
|
||||
col.separator()
|
||||
|
||||
if hasattr(system, 'compute_device'):
|
||||
if hasattr(system, "compute_device"):
|
||||
col.label(text="Compute Device:")
|
||||
col.row().prop(system, "compute_device_type", expand=True)
|
||||
sub = col.row()
|
||||
@@ -1094,7 +1094,7 @@ class USERPREF_PT_addons(Panel):
|
||||
|
||||
rowsub = row.row()
|
||||
rowsub.active = is_enabled
|
||||
rowsub.label(text='%s: %s' % (info['category'], info["name"]))
|
||||
rowsub.label(text='%s: %s' % (info["category"], info["name"]))
|
||||
if info["warning"]:
|
||||
rowsub.label(icon='ERROR')
|
||||
|
||||
|
||||
@@ -2391,7 +2391,7 @@ class VIEW3D_PT_view3d_display(Panel):
|
||||
col.prop(gs, "material_mode", text="")
|
||||
col.prop(view, "show_textured_solid")
|
||||
|
||||
col.prop(view, "show_backface_culling")
|
||||
col.prop(view, "show_backface_culling")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -2556,7 +2556,7 @@ class VIEW3D_PT_background_image(Panel):
|
||||
has_bg = True
|
||||
|
||||
elif bg.source == 'MOVIE_CLIP':
|
||||
box.prop(bg, 'use_camera_clip')
|
||||
box.prop(bg, "use_camera_clip")
|
||||
|
||||
column = box.column()
|
||||
column.active = not bg.use_camera_clip
|
||||
|
||||
@@ -987,7 +987,7 @@ class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel):
|
||||
col.prop(mesh, "use_mirror_topology")
|
||||
|
||||
col.prop(wpaint, "input_samples")
|
||||
|
||||
|
||||
self.unified_paint_settings(col, context)
|
||||
|
||||
# Commented out because the Apply button isn't an operator yet, making these settings useless
|
||||
@@ -1138,7 +1138,7 @@ class VIEW3D_MT_tools_projectpaint_stencil(Menu):
|
||||
|
||||
|
||||
class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):
|
||||
'''default tools for particle mode'''
|
||||
"""default tools for particle mode"""
|
||||
bl_context = "particlemode"
|
||||
bl_label = "Options"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user