diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-10-19 19:13:31 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-10-19 19:13:31 +0300 |
commit | 1c75533d9cc0693733bacbadecfaac5c504313fb (patch) | |
tree | 865ca6cfc8f2ea136d7ff2462e435151e612d06d /io_scene_obj | |
parent | 4179941c58871bf85cf275130af0696affa5040f (diff) | |
parent | d7d3233715503ecc15b8dd1973f7e73257e2cbda (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'io_scene_obj')
-rw-r--r-- | io_scene_obj/export_obj.py | 7 | ||||
-rw-r--r-- | io_scene_obj/import_obj.py | 12 |
2 files changed, 9 insertions, 10 deletions
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py index a147a493..22a82234 100644 --- a/io_scene_obj/export_obj.py +++ b/io_scene_obj/export_obj.py @@ -105,8 +105,7 @@ def write_mtl(scene, filepath, path_mode, copy_set, mtl_dict): elif use_transparency: fw('illum 9\n') # 'Glass' transparency and no Ray trace reflection... fuzzy matching, but... else: - fw('illum 2\n') # light normaly - + fw('illum 2\n') # light normally #### And now, the image textures... image_map = { @@ -154,7 +153,7 @@ def write_mtl(scene, filepath, path_mode, copy_set, mtl_dict): fw('Kd 0.8 0.8 0.8\n') fw('Ks 0.8 0.8 0.8\n') fw('d 1\n') # No alpha - fw('illum 2\n') # light normaly + fw('illum 2\n') # light normally def test_nurbs_compat(ob): @@ -272,7 +271,7 @@ def write_file(filepath, objects, depsgraph, scene, def findVertexGroupName(face, vWeightMap): """ Searches the vertexDict to see what groups is assigned to a given face. - We use a frequency system in order to sort out the name because a given vetex can + We use a frequency system in order to sort out the name because a given vertex can belong to two or more groups at the same time. To find the right name for the face we list all the possible vertex group names with their frequency and then sort by frequency in descend order. The top element is the one shared by the highest number diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py index c1b91e31..4f3ee24a 100644 --- a/io_scene_obj/import_obj.py +++ b/io_scene_obj/import_obj.py @@ -45,7 +45,7 @@ from progress_report import ProgressReport, ProgressReportSubstep def line_value(line_split): """ Returns 1 string representing the value for this line - None will be returned if theres only 1 word + None will be returned if there's only 1 word """ length = len(line_split) if length == 1: @@ -237,7 +237,7 @@ def create_materials(filepath, relpath, if "roughness" not in context_material_vars: context_mat_wrap.roughness = 0.0 - + emit_value = sum(emit_colors) / 3.0 if emit_value > 1e-6: print("WARNING, emit value unsupported by Principled BSDF shader, skipped.") @@ -301,7 +301,7 @@ def create_materials(filepath, relpath, context_material_vars.add("specular") elif line_id == b'ke': # We cannot set context_material.emit right now, we need final diffuse color as well for this. - # XXX Unsuported currently + # XXX Unsupported currently emit_colors[:] = [ float_func(line_split[1]), float_func(line_split[2]), float_func(line_split[3])] elif line_id == b'ns': @@ -504,7 +504,7 @@ def create_mesh(new_objects, smooth_group_users = {context_smooth_group: {} for context_smooth_group in unique_smooth_groups.keys()} context_smooth_group_old = -1 - fgon_edges = set() # Used for storing fgon keys when we need to tesselate/untesselate them (ngons with hole). + fgon_edges = set() # Used for storing fgon keys when we need to tessellate/untessellate them (ngons with hole). edges = [] tot_loops = 0 @@ -598,7 +598,7 @@ def create_mesh(new_objects, if unique_smooth_groups: for edge_dict in smooth_group_users.values(): for key, users in edge_dict.items(): - if users == 1: # This edge is on the boundry of a group + if users == 1: # This edge is on the boundary of a group sharp_edges.add(key) # map the material names to an index @@ -1135,7 +1135,7 @@ def load(context, context_nurbs = {} context_parm = b'' - ''' # How to use usemap? depricated? + ''' # How to use usemap? deprecated? elif line_start == b'usema': # usemap or usemat context_image= line_value(line_split) ''' |