[Bf-extensions-cvs] [31a9b87f] master: last commit break other things. Need to revert back to older commit for now.

Kalle-Samuli Riihikoski noreply at git.blender.org
Wed Mar 27 18:37:10 CET 2019


Commit: 31a9b87fc844cc4ba561a8724c3cb51de916e0b9
Author: Kalle-Samuli Riihikoski
Date:   Wed Mar 27 19:35:52 2019 +0200
Branches: master
https://developer.blender.org/rBA31a9b87fc844cc4ba561a8724c3cb51de916e0b9

last commit break other things. Need to revert back to older commit for now.

===================================================================

M	io_coat3D/__init__.py

===================================================================

diff --git a/io_coat3D/__init__.py b/io_coat3D/__init__.py
index a55758f4..7f36a92c 100644
--- a/io_coat3D/__init__.py
+++ b/io_coat3D/__init__.py
@@ -638,13 +638,13 @@ class SCENE_OT_export(bpy.types.Operator):
             objekti.coat3D.applink_name = objekti.data.name
         mod_mat_list = {}
 
-
-        bake_location = folder_objects + os.sep + 'Bake'
-        if (os.path.isdir(bake_location)):
-            shutil.rmtree(bake_location)
-            os.makedirs(bake_location)
-        else:
-            os.makedirs(bake_location)
+        if (coat3D.bake_textures):
+            bake_location = folder_objects + os.sep + 'Bake'
+            if (os.path.isdir(bake_location)):
+                shutil.rmtree(bake_location)
+                os.makedirs(bake_location)
+            else:
+                os.makedirs(bake_location)
 
         temp_string = ''
         for objekti in bpy.context.selected_objects:
@@ -681,9 +681,9 @@ class SCENE_OT_export(bpy.types.Operator):
                 if (coat3D.bake_normal):
                     bake_list.append(['NORMAL', '$LOADLOPOLYTANG'])
                 if (coat3D.bake_roughness):
-                    bake_list.append(['ROUGHNESS', '$LOADROUGHNESS'])
-                if (coat3D.bake_subsurface):
-                    bake_list.append(['SUBSURFACE', '$LOADMETAL'])
+                    bake_list.append(['SPECULAR', '$LOADROUGHNESS'])
+                if (coat3D.bake_metalness):
+                    bake_list.append(['REFLECTION', '$LOADMETAL'])
 
                 if(coat3D.bake_resolution == 'res_64'):
                     res_size = 64
@@ -1284,7 +1284,7 @@ class SCENE_PT_Material_Import(MaterialButtonsPanel, bpy.types.Panel):
 
         col = flow.column()
         col.prop(coat3D, "coat3D_diffuse", text="Diffuse")
-        col.prop(coat3D, "coat3D_subsurface", text="Subsurface")
+        col.prop(coat3D, "coat3D_metalness", text="Metalness")
         col.prop(coat3D, "coat3D_roughness", text="Roughness")
         col.prop(coat3D, "coat3D_ao", text="AO")
         col = flow.column()
@@ -1338,7 +1338,7 @@ class SCENE_PT_Bake_Settings(ObjectButtonsPanel, bpy.types.Panel):
         col = flow.column()
         col.prop(coat3D, "bake_ao", text="AO")
         col = flow.column()
-        col.prop(coat3D, "bake_subsurface", text="Subsurface")
+        col.prop(coat3D, "bake_metalness", text="Metalness")
         col = flow.column()
         col.prop(coat3D, "bake_roughness", text="Roughness")
 
@@ -1693,7 +1693,7 @@ class SceneCoat3D(PropertyGroup):
         description="Add Modifiers and export",
         default=False
     )
-    bake_subsurface: BoolProperty(
+    bake_metalness: BoolProperty(
         name="Bake metalness texture",
         description="Add Modifiers and export",
         default=False
@@ -1797,7 +1797,7 @@ def register():
         description="Import diffuse texture",
         default=True
     )
-    bpy.types.Material.coat3D_subsurface = BoolProperty(
+    bpy.types.Material.coat3D_metalness = BoolProperty(
         name="Import diffuse texture",
         description="Import diffuse texture",
         default=True
@@ -1836,7 +1836,7 @@ def register():
     kc = bpy.context.window_manager.keyconfigs.addon
 
     if kc:
-        km = kc.keymaps.new(name="Object Mode")
+        km = kc.keymaps.new(name="Shader Mode")
         kmi = km.keymap_items.new('wm.call_menu', 'Q', 'PRESS', shift=True)
         kmi.properties.name = "VIEW3D_MT_Coat_Dynamic_Menu"
 
@@ -1849,7 +1849,7 @@ def unregister():
     del bpy.types.Scene.coat3D
     del bpy.types.Material.coat3D
     bpy.types.Material.coat3D_diffuse
-    bpy.types.Material.coat3D_subsurface
+    bpy.types.Material.coat3D_metalness
     bpy.types.Material.coat3D_roughness
     bpy.types.Material.coat3D_normal
     bpy.types.Material.coat3D_displacement



More information about the Bf-extensions-cvs mailing list