from bpy_extras import mesh_utils
from bpy_extras import view3d_utils
-bl_info = {
- "name":"Skaterift .mdl exporter",
- "author": "Harry Godden (hgn)",
- "version": (0,2),
- "blender":(3,1,0),
- "location":"Export",
- "description":"",
- "warning":"",
- "wiki_url":"",
- "category":"Import/Export",
-}
-
sr_entity_list = [
('none', 'None', '', 0 ),
('ent_gate', 'Gate', '', 1 ),
SR_TRIGGERABLE = [ 'ent_audio', 'ent_ccmd', 'ent_gate', 'ent_challenge', \
'ent_relay', 'ent_skateshop', 'ent_objective', 'ent_route',\
'ent_miniworld', 'ent_region', 'ent_glider', 'ent_list',\
- 'ent_npc' ]
+ 'ent_npc', 'ent_water' ]
def get_entity_enum_id( alias ):
#{
("max_dist",c_float),
("reserved0",c_uint32),
("reserved1",c_uint32)]
+ sr_functions = { 0: "drown" }
#}
class volume_trigger(Structure):
else:
worldinfo.timezone = obj_data.timezone
+ if obj_data.water_safe:
+ flags |= 0x2
+
worldinfo.flags = flags
worldinfo.pstr_skybox = sr_compile_string( obj_data.skybox )
sr_ent_push( worldinfo )
timezone: bpy.props.FloatProperty(name="Timezone(hrs) (UTC0 +hrs)")
fixed_time: bpy.props.FloatProperty(name="Fixed Time (0-1)")
+ water_safe: bpy.props.BoolProperty(name="Water is Safe")
+
@staticmethod
- def sr_inspector( layout, data ):#{
+ def sr_inspector( layout, data ):
+ #{
layout.prop( data[0], 'name' )
layout.prop( data[0], 'desc' )
layout.prop( data[0], 'author' )
layout.prop( data[0], 'fixed_time' )
else:
layout.prop( data[0], 'timezone' )
+
+ layout.prop( data[0], 'water_safe' )
#}
#}
sand_colour: bpy.props.FloatVectorProperty( \
name="Sand Colour",\
subtype='COLOR',\
- min=0.0,max=1.0,\
- default=Vector((0.79,0.63,0.48)),\
+ min=0.0,max=1.0,size=4,\
+ default=Vector((0.79,0.63,0.48,1.0)),\
description="Blend to this colour near the 0 coordinate on UP axis"\
)
shore_colour: bpy.props.FloatVectorProperty( \