custom walk filtering
[carveJwlIkooP6JGAAIwe30JlM.git] / blender_export.py
index 8d202983d765851a3f14164de6ddefe3bd6656ab..70bb5ef494d9db15433bd6159e945fde98a4bdb5 100644 (file)
@@ -794,6 +794,7 @@ def sr_compile_material( mat ):#{
       #}
       if mat.SR_data.shader == 'invisible': flags |= 0x10
       if mat.SR_data.shader == 'boundary': flags |= (0x10|0x20)
+      if mat.SR_data.shader == 'walking': flags |= (0x10|0x80)
    #}
 
    m.flags = flags
@@ -856,6 +857,10 @@ def sr_compile_material( mat ):#{
       m.colour[2]  = pow( mat.SR_data.tint[2], 1.0/2.2 )
       m.colour[3]  = pow( mat.SR_data.tint[3], 1.0/2.2 )
    #}
+
+   if mat.SR_data.shader == 'walking':#{
+      m.shader = 9
+   #}
    
    if mat.SR_data.shader in ['standard', 'standard_cutout', 'terrain_blend', \
                              'vertex_blend', 'fxglow', 'cubemap' ]: #{
@@ -2419,7 +2424,8 @@ class SR_MATERIAL_PANEL(bpy.types.Panel):
          row = box.row()
 
          if (active_mat.SR_data.shader != 'invisible') and \
-            (active_mat.SR_data.shader != 'boundary'):#{
+            (active_mat.SR_data.shader != 'boundary') and \
+            (active_mat.SR_data.shader != 'walking'):#{
             row.prop( active_mat.SR_data, "skate_surface" )
             row.prop( active_mat.SR_data, "grind_surface" )
             row.prop( active_mat.SR_data, "grow_grass" )
@@ -3360,7 +3366,8 @@ class SR_MATERIAL_PROPERTIES(bpy.types.PropertyGroup):
       ('invisible','Invisible',''),
       ('boundary','Boundary',''),
       ('fxglow','FX Glow',''),
-      ('cubemap','Cubemap','')
+      ('cubemap','Cubemap',''),
+      ('walking','Walking','')
       ])
 
    surface_prop: bpy.props.EnumProperty(