Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--add_mesh_BoltFactory/presets/M10.py6
-rw-r--r--add_mesh_BoltFactory/presets/M12.py6
-rw-r--r--add_mesh_BoltFactory/presets/M3.py8
-rw-r--r--add_mesh_BoltFactory/presets/M4.py8
-rw-r--r--add_mesh_BoltFactory/presets/M5.py8
-rw-r--r--add_mesh_BoltFactory/presets/M6.py6
-rw-r--r--add_mesh_BoltFactory/presets/M8.py6
-rw-r--r--io_mesh_ply/import_ply.py2
-rw-r--r--io_scene_map/__init__.py3
-rw-r--r--io_scene_map/export_map.py8
-rw-r--r--io_scene_x3d/export_x3d.py33
-rw-r--r--render_povray/render.py15
-rw-r--r--render_povray/update_files.py1
-rw-r--r--space_view3d_copy_attributes.py4
14 files changed, 55 insertions, 59 deletions
diff --git a/add_mesh_BoltFactory/presets/M10.py b/add_mesh_BoltFactory/presets/M10.py
index f2ea9c8d..03adab07 100644
--- a/add_mesh_BoltFactory/presets/M10.py
+++ b/add_mesh_BoltFactory/presets/M10.py
@@ -1,6 +1,6 @@
props.bf_Shank_Dia = 10.0
-#props.bf_Pitch = 1.5 #Coarse
-props.bf_Pitch = 1.25 #Fine
+#props.bf_Pitch = 1.5 # Coarse
+props.bf_Pitch = 1.25 # Fine
props.bf_Crest_Percent = 10
props.bf_Root_Percent = 10
props.bf_Major_Dia = 10.0
@@ -14,7 +14,7 @@ props.bf_Allen_Bit_Flat_Distance = 8.0
props.bf_Allen_Bit_Depth = 5.0
props.bf_Pan_Head_Dia = 20.0
props.bf_Dome_Head_Dia = 20.0
-props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia*(1.82/5.6)
+props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia * (1.82 / 5.6)
#props.bf_Phillips_Bit_Depth = Get_Phillips_Bit_Height(props.bf_Philips_Bit_Dia)
props.bf_Hex_Nut_Height = 8.0
props.bf_Hex_Nut_Flat_Distance = 17.0
diff --git a/add_mesh_BoltFactory/presets/M12.py b/add_mesh_BoltFactory/presets/M12.py
index 44f3876f..58674852 100644
--- a/add_mesh_BoltFactory/presets/M12.py
+++ b/add_mesh_BoltFactory/presets/M12.py
@@ -1,5 +1,5 @@
-#props.bf_Pitch = 1.75 #Coarse
-props.bf_Pitch = 1.50 #Fine
+#props.bf_Pitch = 1.75 # Coarse
+props.bf_Pitch = 1.50 # Fine
props.bf_Crest_Percent = 10
props.bf_Root_Percent = 10
props.bf_Major_Dia = 12.0
@@ -13,7 +13,7 @@ props.bf_Allen_Bit_Flat_Distance = 10.0
props.bf_Allen_Bit_Depth = 6.0
props.bf_Pan_Head_Dia = 24.0
props.bf_Dome_Head_Dia = 24.0
-props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia*(1.82/5.6)
+props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia * (1.82 / 5.6)
#props.bf_Phillips_Bit_Depth = Get_Phillips_Bit_Height(props.bf_Philips_Bit_Dia)
props.bf_Hex_Nut_Height = 10.0
props.bf_Hex_Nut_Flat_Distance = 19.0
diff --git a/add_mesh_BoltFactory/presets/M3.py b/add_mesh_BoltFactory/presets/M3.py
index 3e970468..584bcd35 100644
--- a/add_mesh_BoltFactory/presets/M3.py
+++ b/add_mesh_BoltFactory/presets/M3.py
@@ -1,8 +1,8 @@
props.bf_Shank_Dia = 3.0
-#props.bf_Pitch = 0.5 #Coarse
-props.bf_Pitch = 0.35 #Fine
+#props.bf_Pitch = 0.5 # Coarse
+props.bf_Pitch = 0.35 # Fine
props.bf_Crest_Percent = 10
-props.bf_Root_Percent = 10
+props.bf_Root_Percent = 10
props.bf_Major_Dia = 3.0
props.bf_Minor_Dia = props.bf_Major_Dia - (1.082532 * props.bf_Pitch)
props.bf_Hex_Head_Flat_Distance = 5.5
@@ -14,7 +14,7 @@ props.bf_Allen_Bit_Flat_Distance = 2.5
props.bf_Allen_Bit_Depth = 1.5
props.bf_Pan_Head_Dia = 5.6
props.bf_Dome_Head_Dia = 5.6
-props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia*(1.82/5.6)
+props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia * (1.82 / 5.6)
#props.bf_Phillips_Bit_Depth = Get_Phillips_Bit_Height(props.bf_Philips_Bit_Dia)
props.bf_Hex_Nut_Height = 2.4
props.bf_Hex_Nut_Flat_Distance = 5.5
diff --git a/add_mesh_BoltFactory/presets/M4.py b/add_mesh_BoltFactory/presets/M4.py
index 5682b442..686fbf56 100644
--- a/add_mesh_BoltFactory/presets/M4.py
+++ b/add_mesh_BoltFactory/presets/M4.py
@@ -1,8 +1,8 @@
props.bf_Shank_Dia = 4.0
-#props.bf_Pitch = 0.7 #Coarse
-props.bf_Pitch = 0.5 #Fine
+#props.bf_Pitch = 0.7 # Coarse
+props.bf_Pitch = 0.5 # Fine
props.bf_Crest_Percent = 10
-props.bf_Root_Percent = 10
+props.bf_Root_Percent = 10
props.bf_Major_Dia = 4.0
props.bf_Minor_Dia = props.bf_Major_Dia - (1.082532 * props.bf_Pitch)
props.bf_Hex_Head_Flat_Distance = 7.0
@@ -14,7 +14,7 @@ props.bf_Allen_Bit_Flat_Distance = 3.0
props.bf_Allen_Bit_Depth = 2.0
props.bf_Pan_Head_Dia = 8.0
props.bf_Dome_Head_Dia = 8.0
-props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia*(1.82/5.6)
+props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia * (1.82 / 5.6)
#props.bf_Phillips_Bit_Depth = Get_Phillips_Bit_Height(props.bf_Philips_Bit_Dia)
props.bf_Hex_Nut_Height = 3.2
props.bf_Hex_Nut_Flat_Distance = 7.0
diff --git a/add_mesh_BoltFactory/presets/M5.py b/add_mesh_BoltFactory/presets/M5.py
index b889f349..6249cf49 100644
--- a/add_mesh_BoltFactory/presets/M5.py
+++ b/add_mesh_BoltFactory/presets/M5.py
@@ -1,8 +1,8 @@
props.bf_Shank_Dia = 5.0
-#props.bf_Pitch = 0.8 #Coarse
-props.bf_Pitch = 0.5 #Fine
+#props.bf_Pitch = 0.8 # Coarse
+props.bf_Pitch = 0.5 # Fine
props.bf_Crest_Percent = 10
-props.bf_Root_Percent = 10
+props.bf_Root_Percent = 10
props.bf_Major_Dia = 5.0
props.bf_Minor_Dia = props.bf_Major_Dia - (1.082532 * props.bf_Pitch)
props.bf_Hex_Head_Flat_Distance = 8.0
@@ -14,7 +14,7 @@ props.bf_Allen_Bit_Flat_Distance = 4.0
props.bf_Allen_Bit_Depth = 2.5
props.bf_Pan_Head_Dia = 9.5
props.bf_Dome_Head_Dia = 9.5
-props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia*(1.82/5.6)
+props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia * (1.82 / 5.6)
#props.bf_Phillips_Bit_Depth = Get_Phillips_Bit_Height(props.bf_Philips_Bit_Dia)
props.bf_Hex_Nut_Height = 4.0
props.bf_Hex_Nut_Flat_Distance = 8.0
diff --git a/add_mesh_BoltFactory/presets/M6.py b/add_mesh_BoltFactory/presets/M6.py
index 2b11a43d..20c09851 100644
--- a/add_mesh_BoltFactory/presets/M6.py
+++ b/add_mesh_BoltFactory/presets/M6.py
@@ -1,6 +1,6 @@
props.bf_Shank_Dia = 6.0
-#bf_Pitch = 1.0 #Coarse
-props.bf_Pitch = 0.75 #Fine
+#bf_Pitch = 1.0 # Coarse
+props.bf_Pitch = 0.75 # Fine
props.bf_Crest_Percent = 10
props.bf_Root_Percent = 10
props.bf_Major_Dia = 6.0
@@ -14,7 +14,7 @@ props.bf_Allen_Bit_Flat_Distance = 5.0
props.bf_Allen_Bit_Depth = 3.0
props.bf_Pan_Head_Dia = 12.0
props.bf_Dome_Head_Dia = 12.0
-props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia*(1.82/5.6)
+props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia * (1.82 / 5.6)
#props.bf_Phillips_Bit_Depth = Get_Phillips_Bit_Height(props.bf_Philips_Bit_Dia)
props.bf_Hex_Nut_Height = 5.0
props.bf_Hex_Nut_Flat_Distance = 10.0
diff --git a/add_mesh_BoltFactory/presets/M8.py b/add_mesh_BoltFactory/presets/M8.py
index 77cbb497..7dcffb62 100644
--- a/add_mesh_BoltFactory/presets/M8.py
+++ b/add_mesh_BoltFactory/presets/M8.py
@@ -1,6 +1,6 @@
props.bf_Shank_Dia = 8.0
-#props.bf_Pitch = 1.25 #Coarse
-props.bf_Pitch = 1.00 #Fine
+#props.bf_Pitch = 1.25 # Coarse
+props.bf_Pitch = 1.00 # Fine
props.bf_Crest_Percent = 10
props.bf_Root_Percent = 10
props.bf_Major_Dia = 8.0
@@ -14,7 +14,7 @@ props.bf_Allen_Bit_Flat_Distance = 6.0
props.bf_Allen_Bit_Depth = 4.0
props.bf_Pan_Head_Dia = 16.0
props.bf_Dome_Head_Dia = 16.0
-props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia*(1.82/5.6)
+props.bf_Philips_Bit_Dia = props.bf_Pan_Head_Dia * (1.82 / 5.6)
#props.bf_Phillips_Bit_Depth = Get_Phillips_Bit_Height(props.bf_Philips_Bit_Dia)
props.bf_Hex_Nut_Height = 6.5
props.bf_Hex_Nut_Flat_Distance = 13.0
diff --git a/io_mesh_ply/import_ply.py b/io_mesh_ply/import_ply.py
index 1ec4c073..3d0f2970 100644
--- a/io_mesh_ply/import_ply.py
+++ b/io_mesh_ply/import_ply.py
@@ -234,7 +234,7 @@ def load_ply(filepath):
colindices = el.index(b'red'), el.index(b'green'), el.index(b'blue')
if -1 in colindices:
colindices = None
- else: # if not a float assume uchar
+ else: # if not a float assume uchar
colmultiply = [1.0 if el.properties[i].numeric_type in ('f', 'd') else (1.0 / 256.0) for i in colindices]
elif el.name == b'face':
diff --git a/io_scene_map/__init__.py b/io_scene_map/__init__.py
index 1d702a79..8db02a7f 100644
--- a/io_scene_map/__init__.py
+++ b/io_scene_map/__init__.py
@@ -67,12 +67,11 @@ class ExportMAP(bpy.types.Operator, ExportHelper):
keywords = self.as_keywords(ignore=("axis_forward", "axis_up", "global_scale", "check_existing", "filter_glob"))
keywords["global_matrix"] = global_matrix
'''
-
+
keywords = self.as_keywords(ignore=("check_existing", "filter_glob"))
from . import export_map
return export_map.save(self, context, **keywords)
-
def menu_func(self, context):
diff --git a/io_scene_map/export_map.py b/io_scene_map/export_map.py
index 1950434f..acfd5fce 100644
--- a/io_scene_map/export_map.py
+++ b/io_scene_map/export_map.py
@@ -63,7 +63,7 @@ def write_cube2brush(file, faces):
for f in faces:
# from 4 verts this gets them in reversed order and only 3 of them
# 0,1,2,3 -> 2,1,0
- me = f.id_data #XXX25
+ me = f.id_data # XXX25
for v in f.vertices[:][2::-1]:
file.write(format_vec % me.vertices[v].co[:])
@@ -115,9 +115,9 @@ def write_face2brush(file, face):
image_text = os.path.splitext(os.path.basename(image.filename))[0]
# reuse face vertices
- _v = face.id_data.vertices #XXX25
+ _v = face.id_data.vertices # XXX25
f_vertices = [_v[vi] for vi in face.vertices]
- del _v #XXX25
+ del _v # XXX25
# original verts as tuples for writing
orig_vco = [v.co[:] for v in f_vertices]
@@ -467,5 +467,5 @@ def save(operator,
):
export_map(context, filepath)
-
+
return {'FINISHED'}
diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py
index a2ba87a4..7a1249a7 100644
--- a/io_scene_x3d/export_x3d.py
+++ b/io_scene_x3d/export_x3d.py
@@ -82,7 +82,7 @@ def prefix_quoted_str(value, prefix):
def build_hierarchy(objects):
- """ returns parent child relationships, skipping
+ """ returns parent child relationships, skipping
"""
objects_set = set(objects)
par_lookup = {}
@@ -101,6 +101,7 @@ def build_hierarchy(objects):
return par_lookup[None]
+
# -----------------------------------------------------------------------------
# H3D Functions
# -----------------------------------------------------------------------------
@@ -110,7 +111,7 @@ def h3d_shader_glsl_frag_patch(filepath):
for l in h3d_file:
l = l.replace("uniform mat4 unfinvviewmat;", "")
l = l.replace("unfinvviewmat", "gl_ModelViewMatrixInverse")
-
+
'''
l = l.replace("varying vec3 varposition;", "")
l = l.replace("varposition", "gl_Vertex") # not needed int H3D
@@ -121,14 +122,12 @@ def h3d_shader_glsl_frag_patch(filepath):
#l = l.replace("varnormal", "normalize(-(gl_ModelViewMatrix * gl_Vertex).xyz)") # view normal
# l = l.replace("varnormal", "gl_NormalMatrix * gl_Normal") # view normal
lines.append(l)
-
-
+
h3d_file.close()
h3d_file = open(filepath, 'w')
h3d_file.writelines(lines)
h3d_file.close()
-
# -----------------------------------------------------------------------------
@@ -155,7 +154,7 @@ def export(file,
from xml.sax.saxutils import quoteattr
uuid_cache_object = {} # object
- uuid_cache_lamp = {} # 'LA_' + object.name
+ uuid_cache_lamp = {} # 'LA_' + object.name
uuid_cache_view = {} # object, different namespace
uuid_cache_mesh = {} # mesh
uuid_cache_material = {} # material
@@ -268,7 +267,7 @@ def export(file,
fw(ident_step + '>\n')
ident += '\t'
return ident
-
+
def writeTransform_end(ident):
ident = ident[:-1]
fw('%s</Transform>\n' % ident)
@@ -796,9 +795,9 @@ def export(file,
ident = ident[:-1]
fw('%s</Shape>\n' % ident)
-
+
# XXX
-
+
#fw('%s<PythonScript DEF="PS" url="object.py" >\n' % ident)
#fw('%s <ShaderProgram USE="MA_Material.005" containerField="references"/>\n' % ident)
#fw('%s</PythonScript>\n' % ident)
@@ -865,7 +864,7 @@ def export(file,
fw('%s<ComposedShader USE=%s />\n' % (ident, material_id))
else:
material.tag = True
-
+
# GPU_material_bind_uniforms
# GPU_begin_object_materials
@@ -1023,7 +1022,7 @@ def export(file,
fw('%s<field name="%s" type="SFNode" accessType="inputOutput">\n' % (ident, uniform['varname']))
ident += '\t'
-
+
ident_step = ident + (' ' * (-len(ident) + \
fw('%s<PixelTexture \n' % ident)))
fw(ident_step + 'repeatS="false"\n')
@@ -1032,21 +1031,17 @@ def export(file,
fw(ident_step + 'image="%s 1 4 %s"\n' % (len(value), " ".join(value)))
fw(ident_step + '/>\n')
-
+
ident = ident[:-1]
fw('%s</field>\n' % ident)
-
+
#for i in range(0, 10, 4)
#value = ' '.join(['%d' % f for f in uniform['texpixels']])
# value = ' '.join(['%.6g' % (f / 256) for f in uniform['texpixels']])
-
#fw('%s<field name="%s" type="SFInt32" accessType="inputOutput" value="%s" />\n' % (ident, uniform['varname'], value))
#print('test', len(uniform['texpixels']))
-
-
-
else:
assert(0)
else:
@@ -1187,12 +1182,12 @@ def export(file,
obj_main_matrix_world_invert = obj_main_matrix_world.inverted()
obj_main_id = unique_name(obj_main, obj_main.name, uuid_cache_object, clean_func=quoteattr)
-
+
ident = writeTransform_begin(ident, obj_main_matrix if obj_main_parent else global_matrix * obj_main_matrix, obj_main_id)
for obj, obj_matrix in derived:
obj_type = obj.type
-
+
if use_hierarchy:
# make transform node relative
obj_matrix = obj_main_matrix_world_invert * obj_matrix
diff --git a/render_povray/render.py b/render_povray/render.py
index f1d81f06..beeb9d67 100644
--- a/render_povray/render.py
+++ b/render_povray/render.py
@@ -1,4 +1,4 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
+# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -169,6 +169,7 @@ def safety(name, Level):
def is_renderable(scene, ob):
return (ob.is_visible(scene) and not ob.hide_render)
+
def renderable_objects(scene):
return [ob for ob in scene.objects if is_renderable(scene, ob)]
@@ -239,10 +240,10 @@ def write_pov(filename, scene=None, info_callback=None):
matrix[3][1], matrix[3][2]))
def MatrixAsPovString(matrix):
- sMatrix=("matrix <%.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, " \
- "%.6f>\n" % (matrix[0][0], matrix[0][1], matrix[0][2], matrix[1][0], matrix[1][1],
- matrix[1][2], matrix[2][0], matrix[2][1], matrix[2][2], matrix[3][0],
- matrix[3][1], matrix[3][2]))
+ sMatrix = ("matrix <%.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, %.6f, " \
+ "%.6f>\n" % (matrix[0][0], matrix[0][1], matrix[0][2], matrix[1][0], matrix[1][1],
+ matrix[1][2], matrix[2][0], matrix[2][1], matrix[2][2], matrix[3][0],
+ matrix[3][1], matrix[3][2]))
return sMatrix
def writeObjectMaterial(material, ob):
@@ -783,6 +784,7 @@ def write_pov(filename, scene=None, info_callback=None):
# * EXACTLY the same materials, in EXACTLY the same sockets.
# … can share a same instance in POV export.
obmats2data = {}
+
def checkObjectMaterials(ob, name, dataname):
if hasattr(ob, 'material_slots'):
has_local_mats = False
@@ -807,6 +809,7 @@ def write_pov(filename, scene=None, info_callback=None):
return None
data_ref = {}
+
def store(scene, ob, name, dataname, matrix):
# The Object needs to be written at least once but if its data is
# already in data_ref this has already been done.
@@ -831,7 +834,6 @@ def write_pov(filename, scene=None, info_callback=None):
data_ref[dataname] = [(name, MatrixAsPovString(matrix))]
return dataname
-
ob_num = 0
for ob in sel:
ob_num += 1
@@ -1533,7 +1535,6 @@ def write_pov(filename, scene=None, info_callback=None):
except IndexError:
print(me)
-
#Importance for radiosity sampling added here:
tabWrite("radiosity { \n")
tabWrite("importance %3g \n" % importance)
diff --git a/render_povray/update_files.py b/render_povray/update_files.py
index 89d1b60d..2d8cf6fb 100644
--- a/render_povray/update_files.py
+++ b/render_povray/update_files.py
@@ -19,7 +19,6 @@
# <pep8 compliant>
-
import bpy
from bpy.props import StringProperty, BoolProperty, IntProperty, FloatProperty, \
FloatVectorProperty, EnumProperty
diff --git a/space_view3d_copy_attributes.py b/space_view3d_copy_attributes.py
index c6685c18..3a35ed1f 100644
--- a/space_view3d_copy_attributes.py
+++ b/space_view3d_copy_attributes.py
@@ -302,6 +302,7 @@ def obRot(ob, active, context):
def obSca(ob, active, context):
ob.scale = active.scale
+
def obVisLoc(ob, active, context):
if ob.parent:
mat = world_to_basis(active, ob, context)
@@ -324,7 +325,8 @@ def obVisSca(ob, active, context):
ob.scale = mat.to_scale()
else:
ob.scale = active.matrix_world.to_scale()
-
+
+
def obDrw(ob, active, context):
ob.draw_type = active.draw_type
ob.show_axis = active.show_axis