X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=blender_export.py;h=70bb5ef494d9db15433bd6159e945fde98a4bdb5;hb=ab34e6bf232cb0c890d8b02c5d21449c20b938e6;hp=349dbe038b00040efc87d5eb9b71d576358d0671;hpb=14b3d5c13faab36bd37ae27aa8c1501ba7146f89;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/blender_export.py b/blender_export.py index 349dbe0..70bb5ef 100644 --- a/blender_export.py +++ b/blender_export.py @@ -462,14 +462,17 @@ class ent_ccmd(Structure): class ent_challenge(Structure):#{ _fields_ = [("transform",mdl_transform), ("submesh_start",c_uint32), ("submesh_count",c_uint32), + ("flags",c_uint32), ("id_next",c_uint32), - ("filter",c_uint32), + ("filter",c_uint32),("filter2",c_uint32), ("id_win",c_uint32), ("win_event",c_uint32), ("time_limit",c_float)] sr_functions = { 0: 'trigger', - 1: 'start_challenge' } + 1: 'start_challenge', + 2: 'show', + 3: 'hide' } #} class ent_unlock(Structure):#{ @@ -791,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 @@ -853,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' ]: #{ @@ -1853,7 +1861,8 @@ def sr_compile( collection ): challenge.id_next = sr_entity_id( obj_data.proxima ) challenge.id_win = sr_entity_id( obj_data.target ) challenge.win_event = obj_data.target_event - challenge.filter = 0 + challenge.filter = int(obj_data.filtrar) + challenge.filter2 = 0 challenge.time_limit = obj_data.time_limit compile_obj_transform( obj, challenge.transform ) @@ -2415,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" ) @@ -2869,9 +2879,7 @@ class SR_OBJECT_ENT_VOLUME(bpy.types.PropertyGroup):#{ target: bpy.props.PointerProperty( \ type=bpy.types.Object, name="Target", \ - poll=lambda self,obj: sr_filter_ent_type(obj,\ - ['ent_audio','ent_skateshop','ent_ccmd',\ - 'ent_challenge'])) + poll=lambda self,obj: sr_filter_ent_type(obj,SR_TRIGGERABLE)) target_event: bpy.props.IntProperty( name="Event/Method" ) @staticmethod @@ -3196,11 +3204,26 @@ class SR_OBJECT_ENT_CHALLENGE(bpy.types.PropertyGroup):#{ poll=lambda self,obj: sr_filter_ent_type(obj,SR_TRIGGERABLE)) target_event: bpy.props.IntProperty( name="Event/Method" ) time_limit: bpy.props.FloatProperty( name="Time Limit", default=1.0 ) + filtrar: bpy.props.EnumProperty( name='Filter',\ + items=[('0','none',''), + (str(0x1),'trick_shuvit',''), + (str(0x2),'trick_kickflip',''), + (str(0x4),'trick_treflip',''), + (str(0x1|0x2|0x4),'trick_any',''), + (str(0x8),'flip_back',''), + (str(0x10),'flip_front',''), + (str(0x8|0x10),'flip_any',''), + (str(0x20),'grind_truck_any',''), + (str(0x40),'grind_board_any',''), + (str(0x20|0x40),'grind_any',''), + (str(0x80),'footplant','') + ]) @staticmethod def sr_inspector( layout, data ):#{ layout.prop( data[0], 'proxima' ) layout.prop( data[0], 'time_limit' ) + layout.prop( data[0], 'filtrar' ) SR_OBJECT_ENT_VOLUME.inspect_target( layout, data, 'target' ) #} #} @@ -3343,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(