[Bf-extensions-cvs] [1c75533d] blender2.8: Merge branch 'master' into blender2.8
Brecht Van Lommel
noreply at git.blender.org
Fri Oct 19 18:14:19 CEST 2018
Commit: 1c75533d9cc0693733bacbadecfaac5c504313fb
Author: Brecht Van Lommel
Date: Fri Oct 19 18:13:31 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBA1c75533d9cc0693733bacbadecfaac5c504313fb
Merge branch 'master' into blender2.8
===================================================================
===================================================================
diff --cc camera_dolly_crane_rigs.py
index 0eceebf3,c55b19e8..bd4b88bc
--- a/camera_dolly_crane_rigs.py
+++ b/camera_dolly_crane_rigs.py
@@@ -533,9 -533,9 +533,9 @@@ def build_dolly_rig(context)
cam.data.name = "Dolly_Camera.000"
cam_data_name = bpy.context.object.data.name
- bpy.data.cameras[cam_data_name].draw_size = 1.0
+ bpy.data.cameras[cam_data_name].display_size = 1.0
cam.rotation_euler[0] = 1.5708 # rotate the camera 90 degrees in x
- cam.location = (0.0, -2.0, 0.0) # move the camera to the correct postion
+ cam.location = (0.0, -2.0, 0.0) # move the camera to the correct position
cam.parent = rig
cam.parent_type = "BONE"
cam.parent_bone = "CTRL"
@@@ -718,9 -718,9 +718,9 @@@ def build_crane_rig(context)
cam.data.name = "Crane_Camera.000"
cam_data_name = bpy.context.object.data.name
- bpy.data.cameras[cam_data_name].draw_size = 1.0
+ bpy.data.cameras[cam_data_name].display_size = 1.0
cam.rotation_euler[0] = 1.5708 # rotate the camera 90 degrees in x
- cam.location = (0.0, -2.0, 0.0) # move the camera to the correct postion
+ cam.location = (0.0, -2.0, 0.0) # move the camera to the correct position
cam.parent = rig
cam.parent_type = "BONE"
cam.parent_bone = "CTRL"
diff --cc io_import_images_as_planes.py
index 4ff123df,1f32bc5f..e0c71426
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@@ -325,7 -327,7 +325,7 @@@ def clean_node_tree(node_tree)
def get_shadeless_node(dest_node_tree):
- """Return a "shadless" cycles/eevee node, creating a node group if nonexistant"""
- """Return a "shadless" cycles node, creating a node group if nonexistent"""
++ """Return a "shadless" cycles/eevee node, creating a node group if nonexistent"""
try:
node_tree = bpy.data.node_groups['IAP_SHADELESS']
diff --cc io_mesh_ply/__init__.py
index a3baa6d3,6764dcb4..30051796
--- a/io_mesh_ply/__init__.py
+++ b/io_mesh_ply/__init__.py
@@@ -22,9 -22,9 +22,9 @@@ bl_info =
"name": "Stanford PLY format",
"author": "Bruce Merry, Campbell Barton",
"version": (1, 0, 0),
- "blender": (2, 74, 0),
+ "blender": (2, 80, 0),
"location": "File > Import-Export",
- "description": "Import-Export PLY mesh data withs UV's and vertex colors",
+ "description": "Import-Export PLY mesh data with UV's and vertex colors",
"warning": "",
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Import-Export/Stanford_PLY",
diff --cc io_scene_obj/export_obj.py
index a147a493,acdcbc6c..22a82234
--- a/io_scene_obj/export_obj.py
+++ b/io_scene_obj/export_obj.py
@@@ -95,67 -101,98 +95,66 @@@ def write_mtl(scene, filepath, path_mod
# See http://en.wikipedia.org/wiki/Wavefront_.obj_file for whole list of values...
# Note that mapping is rather fuzzy sometimes, trying to do our best here.
- if mat.use_shadeless:
- fw('illum 0\n') # ignore lighting
- elif mat.specular_intensity == 0:
+ if mat_wrap.specular == 0:
fw('illum 1\n') # no specular.
elif use_mirror:
- if mat.use_transparency and mat.transparency_method == 'RAYTRACE':
- if mat.raytrace_mirror.fresnel != 0.0:
- fw('illum 7\n') # Reflection, Transparency, Ray trace and Fresnel
- else:
- fw('illum 6\n') # Reflection, Transparency, Ray trace
- elif mat.raytrace_mirror.fresnel != 0.0:
- fw('illum 5\n') # Reflection, Ray trace and Fresnel
+ if use_transparency:
+ fw('illum 6\n') # Reflection, Transparency, Ray trace
else:
fw('illum 3\n') # Reflection and Ray trace
- elif mat.use_transparency and mat.transparency_method == 'RAYTRACE':
+ 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
- else:
- # Write a dummy material here?
- fw('Ns 0\n')
- fw('Ka %.6f %.6f %.6f\n' % world_amb[:]) # Ambient, uses mirror color,
- 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 normally
-
- # Write images!
- if face_img: # We have an image on the face!
- filepath = face_img.filepath
- if filepath: # may be '' for generated images
- # write relative image path
- filepath = bpy_extras.io_utils.path_reference(filepath, source_dir, dest_dir,
- path_mode, "", copy_set, face_img.library)
- fw('map_Kd %s\n' % filepath) # Diffuse mapping image
- del filepath
- else:
- # so we write the materials image.
- face_img = None
-
- if mat: # No face image. if we havea material search for MTex image.
- image_map = {}
- # backwards so topmost are highest priority
- for mtex in reversed(mat.texture_slots):
- if mtex and mtex.texture and mtex.texture.type == 'IMAGE':
- image = mtex.texture.image
- if image:
- # texface overrides others
- if (mtex.use_map_color_diffuse and (face_img is None) and
- (mtex.use_map_warp is False) and (mtex.texture_coords != 'REFLECTION')):
- image_map["map_Kd"] = (mtex, image)
- if mtex.use_map_ambient:
- image_map["map_Ka"] = (mtex, image)
- # this is the Spec intensity channel but Ks stands for specular Color
- '''
- if mtex.use_map_specular:
- image_map["map_Ks"] = (mtex, image)
- '''
- if mtex.use_map_color_spec: # specular color
- image_map["map_Ks"] = (mtex, image)
- if mtex.use_map_hardness: # specular hardness/glossiness
- image_map["map_Ns"] = (mtex, image)
- if mtex.use_map_alpha:
- image_map["map_d"] = (mtex, image)
- if mtex.use_map_translucency:
- image_map["map_Tr"] = (mtex, image)
- if mtex.use_map_normal:
- image_map["map_Bump"] = (mtex, image)
- if mtex.use_map_displacement:
- image_map["disp"] = (mtex, image)
- if mtex.use_map_color_diffuse and (mtex.texture_coords == 'REFLECTION'):
- image_map["refl"] = (mtex, image)
- if mtex.use_map_emit:
- image_map["map_Ke"] = (mtex, image)
-
- for key, (mtex, image) in sorted(image_map.items()):
- filepath = bpy_extras.io_utils.path_reference(image.filepath, source_dir, dest_dir,
- path_mode, "", copy_set, image.library)
+ #### And now, the image textures...
+ image_map = {
+ "map_Kd": "base_color_texture",
+ "map_Ka": None, # ambient...
+ "map_Ks": "specular_texture",
+ "map_Ns": "roughness_texture",
+ "map_d": "transmission_texture",
+ "map_Tr": None, # transmission roughness?
+ "map_Bump": "normalmap_texture",
+ "disp": None, # displacement...
+ "refl": "metallic_texture",
+ "map_Ke": None # emission...
+ }
+
+ for key, mat_wrap_key in sorted(image_map.items()):
+ if mat_wrap_key is None:
+ continue
+ tex_wrap = getattr(mat_wrap, mat_wrap_key, None)
+ if tex_wrap is None:
+ continue
+ image = tex_wrap.image
+ if image is None:
+ continue
+
+ filepath = io_utils.path_reference(image.filepath, source_dir, dest_dir,
+ path_mode, "", copy_set, image.library)
options = []
if key == "map_Bump":
- if mtex.normal_factor != 1.0:
- options.append('-bm %.6f' % mtex.normal_factor)
- if mtex.offset != Vector((0.0, 0.0, 0.0)):
- options.append('-o %.6f %.6f %.6f' % mtex.offset[:])
- if mtex.scale != Vector((1.0, 1.0, 1.0)):
- options.append('-s %.6f %.6f %.6f' % mtex.scale[:])
+ if mat_wrap.normalmap_strengh != 1.0:
+ options.append('-bm %.6f' % mat_wrap.normalmap_strengh)
+ if tex_wrap.translation != Vector((0.0, 0.0, 0.0)):
+ options.append('-o %.6f %.6f %.6f' % tex_wrap.translation[:])
+ if tex_wrap.scale != Vector((1.0, 1.0, 1.0)):
+ options.append('-s %
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list