From: <au...@us...> - 2012-04-04 01:23:57
|
Revision: 11087 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=11087&view=rev Author: auria Date: 2012-04-04 01:23:51 +0000 (Wed, 04 Apr 2012) Log Message: ----------- Check all script paths for XML files Modified Paths: -------------- media/trunk/blender_25/stk_panel.py Modified: media/trunk/blender_25/stk_panel.py =================================================================== --- media/trunk/blender_25/stk_panel.py 2012-04-04 01:03:09 UTC (rev 11086) +++ media/trunk/blender_25/stk_panel.py 2012-04-04 01:23:51 UTC (rev 11087) @@ -719,7 +719,15 @@ raise Exception("No <Properties> node in " + filename) import os.path -datapath = os.path.join(bpy.utils.script_paths()[0], "addons", "stkdata") + +datapath = None +for curr in bpy.utils.script_paths(): + if os.path.exists(os.path.join(curr, "addons", "stkdata")): + datapath = os.path.join(bpy.utils.script_paths()[0], "addons", "stkdata") + +if datapath is None: + print("Make sure the stkdata folder is installed, cannot locate it!!") + SCENE_PROPS = getPropertiesFromXML(os.path.join(datapath, "stk_panel_parameters.xml"), contextLevel=CONTEXT_SCENE) STK_PER_OBJECT_TRACK_PROPERTIES = getPropertiesFromXML(os.path.join(datapath, "stk_object_parameters.xml"), contextLevel=CONTEXT_OBJECT) STK_MATERIAL_PROPERTIES = getPropertiesFromXML(os.path.join(datapath, "stk_material_parameters.xml"), contextLevel=CONTEXT_MATERIAL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |