Skip to content

Commit d9b5fe6

Browse files
feliwirTarcontar
authored andcommitted
autopep8 action fixes
1 parent 3bac661 commit d9b5fe6

File tree

3 files changed

+28
-7
lines changed

3 files changed

+28
-7
lines changed

io_mesh_w3d/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ class TOOLS_PANEL_PT_w3d(bpy.types.Panel):
426426
bl_label = 'W3D Tools'
427427
bl_space_type = 'VIEW_3D'
428428
bl_region_type = 'UI'
429-
429+
430430
def draw(self, context):
431431
self.layout.operator('scene.export_geometry_data', icon='CUBE', text='Export Geometry Data')
432432

io_mesh_w3d/common/utils/box_export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def retrieve_boxes(container_name):
1717
name_=name,
1818
center=mesh_object.location)
1919
box_mesh = mesh_object.to_mesh(preserve_all_data_layers=False, depsgraph=None)
20-
# TODO: use mesh_object.bound_box ?
20+
# TODO: use mesh_object.bound_box ?
2121
box.extend = Vector(
2222
(box_mesh.vertices[0].co.x * 2,
2323
box_mesh.vertices[0].co.y * 2,

io_mesh_w3d/geometry_export.py

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from io_mesh_w3d.w3x.io_xml import *
77
from io_mesh_w3d.common.utils.helpers import get_objects
88

9+
910
def format_str(value):
1011
return '{:.3f}'.format(value)
1112

@@ -16,7 +17,7 @@ class ExportGeometryData(bpy.types.Operator, ExportHelper):
1617
bl_options = {'REGISTER', 'UNDO'}
1718

1819
filename_ext = '.xml'
19-
20+
2021
def execute(self, context):
2122
export_geometry_data(self, self.filepath)
2223
return {'FINISHED'}
@@ -30,7 +31,7 @@ def export_geometry_data(context, filepath):
3031
file = open(inifilepath, 'w')
3132

3233
root = create_named_root('Geometry')
33-
root.set('isSmall', str(False));
34+
root.set('isSmall', str(False))
3435

3536
index = 0
3637

@@ -68,7 +69,17 @@ def export_geometry_data(context, filepath):
6869

6970
create_vector(location, shape_node, 'Offset')
7071
if (location.length > 0.01):
71-
file.write('\tGeometryOffset\t\t\t= X:' + format_str(location.x) + ' Y:' + format_str(location.y) + ' Z:' + format_str(location.z) + '\n')
72+
file.write(
73+
'\tGeometryOffset\t\t\t= X:' +
74+
format_str(
75+
location.x) +
76+
' Y:' +
77+
format_str(
78+
location.y) +
79+
' Z:' +
80+
format_str(
81+
location.z) +
82+
'\n')
7283

7384
file.write('\n')
7485
index += 1
@@ -77,9 +88,19 @@ def export_geometry_data(context, filepath):
7788
contact_point_node = create_node(root, 'ContactPoint')
7889
location, _, _ = empty.matrix_world.decompose()
7990
create_vector(location, contact_point_node, 'Pos')
80-
file.write('\tGeometryContactPoint\t= X:' + format_str(location.x) + ' Y:' + format_str(location.y) + ' Z:' + format_str(location.z) + '\n')
91+
file.write(
92+
'\tGeometryContactPoint\t= X:' +
93+
format_str(
94+
location.x) +
95+
' Y:' +
96+
format_str(
97+
location.y) +
98+
' Z:' +
99+
format_str(
100+
location.z) +
101+
'\n')
81102

82103
write(root, filepath)
83104
file.close()
84105
context.report({'INFO'}, 'exporting geometry data finished')
85-
print('exporting geometry data finished')
106+
print('exporting geometry data finished')

0 commit comments

Comments
 (0)