Skip to content

Commit

Permalink
style cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ideasman42 committed Jul 29, 2012
1 parent 2c092f4 commit afdec49
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 19 deletions.
1 change: 1 addition & 0 deletions io_mesh_ply/import_ply.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def add_face(vertices, indices, uvindices, colindices):

return mesh


def load_ply(filepath):
import time

Expand Down
2 changes: 1 addition & 1 deletion io_scene_3ds/export_3ds.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#------ sub defines of OBJECTINFO
MATERIAL = 45055 # 0xAFFF // This stored the texture info
OBJECT = 16384 # 0x4000 // This stores the faces, vertices, etc...
OBJECT = 16384 # 0x4000 // This stores the faces, vertices, etc...

#>------ sub defines of MATERIAL
MATNAME = 0xA000 # This holds the material name
Expand Down
2 changes: 1 addition & 1 deletion io_scene_obj/import_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ def edges_match(e1, e2):
bm.from_mesh(me)
# to avoid slow iterator lookups later / indexing verts is slow in bmesh
bm_verts = bm.verts[:]

for sharp_edge in sharp_edges.keys():
vert1 = bm_verts[sharp_edge[0]]
vert2 = bm_verts[sharp_edge[1]]
Expand Down
2 changes: 1 addition & 1 deletion mocap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def draw(self, context):
headerRow.operator("mocap.removeconstraint", text="", icon='X', emboss=False).constraint = i
if m_constraint.show_expanded:
box.separator()
box.prop_search(m_constraint, 'constrained_bone', enduser_obj.pose, "bones", icon='BONE_DATA',text="")
box.prop_search(m_constraint, 'constrained_bone', enduser_obj.pose, "bones", icon='BONE_DATA', text="")
if m_constraint.type == "distance" or m_constraint.type == "point":
box.prop_search(m_constraint, 'constrained_boneB', enduser_obj.pose, "bones", icon='CONSTRAINT_BONE')
frameRow = box.row()
Expand Down
2 changes: 1 addition & 1 deletion space_view3d_copy_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
'category': '3D View'}

import bpy
from mathutils import Matrix, Vector
from mathutils import Matrix


def build_exec(loopfunc, func):
Expand Down
7 changes: 4 additions & 3 deletions space_view3d_screencast_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,14 @@ def draw(self, context):

row = layout.row(align=True)
row.enabled = sc.screencast_keys_timer_show
row.prop(sc,"screencast_keys_timer_size")
row.prop(sc, "screencast_keys_timer_size")
row = layout.row(align=True)
row.enabled = sc.screencast_keys_timer_show
row.operator("view3d.screencast_keys_timer_reset", text="Reset")

classes = [ScreencastKeysStatus, ScreencastKeysTimerReset,
OBJECT_PT_keys_status]
classes = (ScreencastKeysStatus,
ScreencastKeysTimerReset,
OBJECT_PT_keys_status)


def register():
Expand Down
2 changes: 1 addition & 1 deletion system_demo_mode/demo_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def demo_mode_auto_select():

def demo_mode_next_file(step=1):

# support for temp
# support for temp
if global_config_files[global_state["demo_index"]].get("is_tmp"):
del global_config_files[global_state["demo_index"]]
global_state["demo_index"] -= 1
Expand Down
8 changes: 4 additions & 4 deletions ui_translate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class UI_OT_edittranslation_update_mo(bpy.types.Operator):
clean_mo = BoolProperty(description="Clean up (remove) all local "
"translation files, to be able to use "
"all system's ones again",
default = False, options={'SKIP_SAVE'})
default=False, options={'SKIP_SAVE'})

def execute(self, context):
if self.clean_mo:
Expand Down Expand Up @@ -140,12 +140,12 @@ class UI_OT_edittranslation(bpy.types.Operator):
enum_tip_flags = EnumProperty(items=flag_items, description="Flags about the RNA enum item tip of the button", options={'SKIP_SAVE', 'ENUM_FLAG'})

stats_str = StringProperty(description="Stats from opened po", options={'SKIP_SAVE'})
update_po = BoolProperty(description="Update po file, try to rebuild mo file, and refresh Blender UI", default = False, options={'SKIP_SAVE'})
update_mo = BoolProperty(description="Try to rebuild mo file, and refresh Blender UI (WARNING: you should use a local Blender installation, as you probably have no right to write in the system Blender installation...)", default = False, options={'SKIP_SAVE'})
update_po = BoolProperty(description="Update po file, try to rebuild mo file, and refresh Blender UI", default=False, options={'SKIP_SAVE'})
update_mo = BoolProperty(description="Try to rebuild mo file, and refresh Blender UI (WARNING: you should use a local Blender installation, as you probably have no right to write in the system Blender installation...)", default=False, options={'SKIP_SAVE'})
clean_mo = BoolProperty(description="Clean up (remove) all local "
"translation files, to be able to use "
"all system's ones again",
default = False, options={'SKIP_SAVE'})
default=False, options={'SKIP_SAVE'})

def execute(self, context):
if not hasattr(self, "msgmap"):
Expand Down
13 changes: 6 additions & 7 deletions ui_translate/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
NUM_BUTTON_SUFFIX = ": "



# Mo root datapath.
MO_PATH_ROOT = "locale"

Expand Down Expand Up @@ -94,7 +93,7 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, rna_ctxt, rstruc

# Labels.
elbl = getattr(obj, msgmap["enum_label"]["msgstr"])
print("enum label: '"+elbl+"'")
print("enum label: %r" % elbl)
if elbl:
# Enum items' labels have no i18n context...
k = ctxt_to_msg[BLF_I18NCONTEXT_DEFAULT].copy()
Expand All @@ -109,7 +108,7 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, rna_ctxt, rstruc
k &= src_to_msg[src_enum]
msgmap["enum_label"]["key"] = k
rlbl = getattr(obj, msgmap["rna_label"]["msgstr"])
print("rna label: '"+rlbl+"'", rlbl in msgid_to_msg, rlbl in msgstr_to_msg)
print("rna label: %r" % 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:
Expand All @@ -127,7 +126,7 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, rna_ctxt, rstruc
if blbl.endswith(NUM_BUTTON_SUFFIX):
# Num buttons report their label with a trailing ': '...
blbls.append(blbl[:-len(NUM_BUTTON_SUFFIX)])
print("button label: '"+blbl+"'")
print("button label: %r" % blbl)
if blbl and elbl not in blbls and (rlbl not in blbls or rna_ctxt != BLF_I18NCONTEXT_DEFAULT):
# Always Default context for button label :/
k = ctxt_to_msg[BLF_I18NCONTEXT_DEFAULT].copy()
Expand All @@ -149,7 +148,7 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, rna_ctxt, rstruc

# Tips (they never have a specific context).
etip = getattr(obj, msgmap["enum_tip"]["msgstr"])
print("enum tip: '"+etip+"'")
print("enum tip: %r" % etip)
if etip:
k = ctxt_to_msg[BLF_I18NCONTEXT_DEFAULT].copy()
if etip in msgid_to_msg:
Expand All @@ -163,7 +162,7 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, rna_ctxt, rstruc
k &= src_to_msg[src_enum]
msgmap["enum_tip"]["key"] = k
rtip = getattr(obj, msgmap["rna_tip"]["msgstr"])
print("rna tip: '"+rtip+"'")
print("rna tip: %r" % rtip )
if rtip:
k = ctxt_to_msg[BLF_I18NCONTEXT_DEFAULT].copy()
if k and rtip in msgid_to_msg:
Expand All @@ -178,7 +177,7 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, rna_ctxt, rstruc
msgmap["rna_tip"]["key"] = k
print(k)
btip = getattr(obj, msgmap["but_tip"]["msgstr"])
print("button tip: '"+btip+"'")
print("button tip: %r" % btip)
if btip and btip not in {rtip, etip}:
k = ctxt_to_msg[BLF_I18NCONTEXT_DEFAULT].copy()
if btip in msgid_to_msg:
Expand Down

0 comments on commit afdec49

Please sign in to comment.