update compiler for blender 3.4.1
[carveJwlIkooP6JGAAIwe30JlM.git] / blender_export.py
index cf6d3f7dd9d4fcde68765723ec608ed3ffa2291a..8cd60ea7d15240eb82ade9c56dc8afb5471a9b93 100644 (file)
@@ -1009,8 +1009,8 @@ cxr_graph_mapping = \
          },
          "Mix":
          {
-            "Color1": material_tex_image("tex_diffuse"),
-            "Color2": material_tex_image("tex_decal")
+            "A": material_tex_image("tex_diffuse"),
+            "B": material_tex_image("tex_decal")
          },
       },
       "Normal":
@@ -1063,9 +1063,20 @@ def material_info(mat):
 
          if isinstance( link_def, dict ):
          #{
-            node_link = node.inputs[link]
+            node_link = None
+            for x in node.inputs:
+            #{
+               if isinstance( x, bpy.types.NodeSocketColor ):
+               #{
+                  if link == x.name:
+                  #{
+                     node_link = x
+                     break
+                  #}
+               #}
+            #}
 
-            if node_link.is_linked:
+            if node_link and node_link.is_linked:
             #{
                # look for definitions for the connected node type
                #
@@ -2551,6 +2562,12 @@ class CV_MATERIAL_PANEL(bpy.types.Panel):
 
       info = material_info( active_mat )
 
+      if 'tex_diffuse' in info:
+      #{
+         _.layout.label( icon='INFO', \
+            text=F"{info['tex_diffuse'].name} will be compiled" )
+      #}
+
       _.layout.prop( active_mat.cv_data, "shader" )
       _.layout.prop( active_mat.cv_data, "surface_prop" )
       _.layout.prop( active_mat.cv_data, "collision" )