Cleanup: autopep8
This commit is contained in:
@@ -20,7 +20,7 @@ from freestyle.types import IntegrationType, Operators, Stroke
|
||||
|
||||
Operators.select(QuantitativeInvisibilityUP1D(0))
|
||||
Operators.bidirectional_chain(ChainSilhouetteIterator())
|
||||
#Operators.sequential_split(pyVertexNatureUP0D(Nature.VIEW_VERTEX), 2)
|
||||
# Operators.sequential_split(pyVertexNatureUP0D(Nature.VIEW_VERTEX), 2)
|
||||
Operators.sort(pyZBP1D())
|
||||
shaders_list = [
|
||||
ConstantThicknessShader(3),
|
||||
|
||||
@@ -76,7 +76,7 @@ class DataPathBuilder:
|
||||
break
|
||||
if type_ok:
|
||||
try:
|
||||
#print("base." + item_new)
|
||||
# print("base." + item_new)
|
||||
base_new = eval("base." + item_new)
|
||||
break # found, don't keep looking
|
||||
except:
|
||||
|
||||
@@ -92,7 +92,7 @@ def module_list(path):
|
||||
folder_list = []
|
||||
else:
|
||||
folder_list = []
|
||||
#folder_list = glob.glob(os.path.join(path,'*'))
|
||||
# folder_list = glob.glob(os.path.join(path,'*'))
|
||||
folder_list = [
|
||||
p for p in folder_list
|
||||
if (os.path.exists(os.path.join(path, p, '__init__.py')) or
|
||||
|
||||
@@ -559,7 +559,7 @@ def dump_py_messages_from_files(msgs, reports, files, settings):
|
||||
# foobar(text="Foo", text_ctxt=i18n_ctxt.id_object)
|
||||
if type(node) == ast.Attribute:
|
||||
if node.attr in i18n_ctxt_ids:
|
||||
#print(node, node.attr, getattr(i18n_contexts, node.attr))
|
||||
# print(node, node.attr, getattr(i18n_contexts, node.attr))
|
||||
return getattr(i18n_contexts, node.attr)
|
||||
return i18n_contexts.default
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import os
|
||||
import re
|
||||
import struct
|
||||
import tempfile
|
||||
#import time
|
||||
# import time
|
||||
|
||||
from bl_i18n_utils import (
|
||||
settings,
|
||||
@@ -173,7 +173,7 @@ def list_po_dir(root_path, settings):
|
||||
isocodes = dict(e for e in isocodes if os.path.isfile(e[1]))
|
||||
for num_id, name, uid in settings.LANGUAGES[2:]: # Skip "default" and "en" languages!
|
||||
best_po = find_best_isocode_matches(uid, isocodes)
|
||||
#print(uid, "->", best_po)
|
||||
# print(uid, "->", best_po)
|
||||
if best_po:
|
||||
isocode = best_po[0]
|
||||
yield (True, uid, num_id, name, isocode, isocodes[isocode])
|
||||
@@ -438,7 +438,7 @@ class I18nMessages:
|
||||
# Avoid parsing again!
|
||||
# Keys should be (pseudo) file-names, values are tuples (hash, I18nMessages)
|
||||
# Note: only used by po parser currently!
|
||||
#_parser_cache = {}
|
||||
# _parser_cache = {}
|
||||
|
||||
def __init__(self, uid=None, kind=None, key=None, src=None, settings=settings):
|
||||
self.settings = settings
|
||||
@@ -791,7 +791,7 @@ class I18nMessages:
|
||||
k &= src_to_msg[src_enum]
|
||||
msgmap["enum_label"]["key"] = k
|
||||
rlbl = getattr(msgs, msgmap["rna_label"]["msgstr"])
|
||||
#print("rna label: " + rlbl, rlbl in msgid_to_msg, rlbl in msgstr_to_msg)
|
||||
# print("rna label: " + rlbl, rlbl in msgid_to_msg, rlbl in msgstr_to_msg)
|
||||
if rlbl:
|
||||
k = ctxt_to_msg[rna_ctxt].copy()
|
||||
if k and rlbl in msgid_to_msg:
|
||||
@@ -831,7 +831,7 @@ class I18nMessages:
|
||||
|
||||
# Tips (they never have a specific context).
|
||||
etip = getattr(msgs, msgmap["enum_tip"]["msgstr"])
|
||||
#print("enum tip: " + etip)
|
||||
# print("enum tip: " + etip)
|
||||
if etip:
|
||||
k = ctxt_to_msg[self.settings.DEFAULT_CONTEXT].copy()
|
||||
if etip in msgid_to_msg:
|
||||
@@ -845,7 +845,7 @@ class I18nMessages:
|
||||
k &= src_to_msg[src_enum]
|
||||
msgmap["enum_tip"]["key"] = k
|
||||
rtip = getattr(msgs, msgmap["rna_tip"]["msgstr"])
|
||||
#print("rna tip: " + rtip)
|
||||
# print("rna tip: " + rtip)
|
||||
if rtip:
|
||||
k = ctxt_to_msg[self.settings.DEFAULT_CONTEXT].copy()
|
||||
if k and rtip in msgid_to_msg:
|
||||
@@ -860,7 +860,7 @@ class I18nMessages:
|
||||
msgmap["rna_tip"]["key"] = k
|
||||
# print(k)
|
||||
btip = getattr(msgs, msgmap["but_tip"]["msgstr"])
|
||||
#print("button tip: " + btip)
|
||||
# print("button tip: " + btip)
|
||||
if btip and btip not in {rtip, etip}:
|
||||
k = ctxt_to_msg[self.settings.DEFAULT_CONTEXT].copy()
|
||||
if btip in msgid_to_msg:
|
||||
@@ -1038,7 +1038,7 @@ class I18nMessages:
|
||||
msgstr_lines.append(line)
|
||||
else:
|
||||
self.parsing_errors.append((line_nr, "regular string outside msgctxt, msgid or msgstr scope"))
|
||||
#self.parsing_errors += (str(comment_lines), str(msgctxt_lines), str(msgid_lines), str(msgstr_lines))
|
||||
# self.parsing_errors += (str(comment_lines), str(msgctxt_lines), str(msgid_lines), str(msgstr_lines))
|
||||
|
||||
# If no final empty line, last message is not finalized!
|
||||
if reading_msgstr:
|
||||
|
||||
@@ -69,7 +69,7 @@ def language_menu(args, settings):
|
||||
continue
|
||||
for po_path in os.listdir(po_dir):
|
||||
uid = po_to_uid.get(po_path, None)
|
||||
#print("Checking %s, found uid %s" % (po_path, uid))
|
||||
# print("Checking %s, found uid %s" % (po_path, uid))
|
||||
po_path = os.path.join(settings.TRUNK_PO_DIR, po_path)
|
||||
if uid is not None:
|
||||
po = utils_i18n.I18nMessages(uid=uid, kind='PO', src=po_path, settings=settings)
|
||||
|
||||
@@ -392,7 +392,7 @@ def ngon_tessellate(from_data, indices, fix_loops=True, debug_print=True):
|
||||
|
||||
fill = tessellate_polygon([[v[0] for v in loop] for loop in loop_list])
|
||||
# draw_loops(loop_list)
|
||||
#raise Exception("done loop")
|
||||
# raise Exception("done loop")
|
||||
# map to original indices
|
||||
fill = [[vert_map[i] for i in f] for f in fill]
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ def compat_str(text, line_length=0):
|
||||
text_ls.append(text)
|
||||
text = '\n '.join(text_ls)
|
||||
|
||||
#text = text.replace('.', '.\n')
|
||||
#text = text.replace(']', ']\n')
|
||||
# text = text.replace('.', '.\n')
|
||||
# text = text.replace(']', ']\n')
|
||||
text = text.replace("\n", "\\n")
|
||||
text = text.replace('"', '\\"')
|
||||
return text
|
||||
@@ -135,7 +135,7 @@ def graph_armature(obj, filepath, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=Tr
|
||||
if not rna_path.startswith("pose.bones["):
|
||||
return None
|
||||
|
||||
#rna_path_bone = rna_path[:rna_path.index("]") + 1]
|
||||
# rna_path_bone = rna_path[:rna_path.index("]") + 1]
|
||||
# return obj.path_resolve(rna_path_bone)
|
||||
bone_name = rna_path.split("[")[1].split("]")[0]
|
||||
return obj.pose.bones[bone_name[1:-1]]
|
||||
|
||||
@@ -629,7 +629,7 @@ def BuildRNAInfo():
|
||||
except:
|
||||
return "" # invalid id
|
||||
|
||||
#structs = [(base_id(rna_struct), rna_struct.identifier, rna_struct) for rna_struct in bpy.doc.structs.values()]
|
||||
# structs = [(base_id(rna_struct), rna_struct.identifier, rna_struct) for rna_struct in bpy.doc.structs.values()]
|
||||
'''
|
||||
structs = []
|
||||
for rna_struct in bpy.doc.structs.values():
|
||||
@@ -703,7 +703,7 @@ def BuildRNAInfo():
|
||||
|
||||
# Store a list of functions, remove inherited later
|
||||
# NOT USED YET
|
||||
## rna_functions_dict[identifier] = get_direct_functions(rna_struct)
|
||||
# rna_functions_dict[identifier] = get_direct_functions(rna_struct)
|
||||
|
||||
# fill in these later
|
||||
rna_children_dict[identifier] = []
|
||||
@@ -786,7 +786,7 @@ def BuildRNAInfo():
|
||||
# if rna_struct.nested:
|
||||
# continue
|
||||
|
||||
#write_struct(rna_struct, '')
|
||||
# write_struct(rna_struct, '')
|
||||
info_struct = GetInfoStructRNA(rna_struct)
|
||||
if rna_base:
|
||||
info_struct.base = GetInfoStructRNA(rna_struct_dict[rna_base])
|
||||
|
||||
@@ -164,7 +164,7 @@ class RandomizeLocRotSize(Operator):
|
||||
scale = None if not self.use_scale else self.scale
|
||||
|
||||
scale_even = self.scale_even
|
||||
#scale_min = self.scale_min
|
||||
# scale_min = self.scale_min
|
||||
scale_min = 0
|
||||
|
||||
randomize_selected(context, seed, delta,
|
||||
|
||||
@@ -165,9 +165,9 @@ class prettyface:
|
||||
def set_uv(f, p1, p2, p3):
|
||||
|
||||
# cos =
|
||||
#v1 = cos[0]-cos[1]
|
||||
#v2 = cos[1]-cos[2]
|
||||
#v3 = cos[2]-cos[0]
|
||||
# v1 = cos[0]-cos[1]
|
||||
# v2 = cos[1]-cos[2]
|
||||
# v3 = cos[2]-cos[0]
|
||||
|
||||
# angles_co = get_tri_angles(*[v.co for v in f])
|
||||
angles_co = get_tri_angles(*[f.id_data.vertices[v].co for v in f.vertices]) # XXX25
|
||||
|
||||
@@ -132,7 +132,6 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel):
|
||||
rows=rows,
|
||||
)
|
||||
|
||||
|
||||
col = row.column(align=True)
|
||||
col.operator("pose.group_add", icon='ADD', text="")
|
||||
col.operator("pose.group_remove", icon='REMOVE', text="")
|
||||
@@ -218,7 +217,7 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
|
||||
|
||||
|
||||
class DATA_PT_motion_paths(MotionPathButtonsPanel, Panel):
|
||||
#bl_label = "Bones Motion Paths"
|
||||
# bl_label = "Bones Motion Paths"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
bl_context = "data"
|
||||
|
||||
@@ -240,7 +239,7 @@ class DATA_PT_motion_paths(MotionPathButtonsPanel, Panel):
|
||||
|
||||
|
||||
class DATA_PT_motion_paths_display(MotionPathButtonsPanel_display, Panel):
|
||||
#bl_label = "Bones Motion Paths"
|
||||
# bl_label = "Bones Motion Paths"
|
||||
bl_context = "data"
|
||||
bl_parent_id = "DATA_PT_motion_paths"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@@ -190,7 +190,7 @@ class MASK_PT_point:
|
||||
col = layout.column()
|
||||
# Currently only parenting the movie-clip is allowed,
|
||||
# so do not over-complicate things for now by using single template_ID
|
||||
#col.template_any_ID(parent, "id", "id_type", text="")
|
||||
# col.template_any_ID(parent, "id", "id_type", text="")
|
||||
|
||||
col.label(text="Parent:")
|
||||
col.prop(parent, "id", text="")
|
||||
|
||||
@@ -325,7 +325,7 @@ class OBJECT_PT_lineart(ObjectButtonsPanel, Panel):
|
||||
|
||||
|
||||
class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
|
||||
#bl_label = "Object Motion Paths"
|
||||
# bl_label = "Object Motion Paths"
|
||||
bl_context = "object"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@@ -344,7 +344,7 @@ class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
|
||||
|
||||
|
||||
class OBJECT_PT_motion_paths_display(MotionPathButtonsPanel_display, Panel):
|
||||
#bl_label = "Object Motion Paths"
|
||||
# bl_label = "Object Motion Paths"
|
||||
bl_context = "object"
|
||||
bl_parent_id = "OBJECT_PT_motion_paths"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@@ -879,7 +879,7 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel):
|
||||
col.prop(domain, "mesh_concave_lower", text="Lower")
|
||||
|
||||
# TODO (sebbas): for now just interpolate any upres grids, ie not sampling highres grids
|
||||
#col.prop(domain, "highres_sampling", text="Flow Sampling:")
|
||||
# col.prop(domain, "highres_sampling", text="Flow Sampling:")
|
||||
|
||||
if domain.cache_type == 'MODULAR':
|
||||
col.separator()
|
||||
|
||||
Reference in New Issue
Block a user