@@ -29,10 +29,8 @@ def local_path(func):
2929 def local_wrapper (* args , ** kwargs ):
3030 use_local = kwargs .get ('local' )
3131
32- # If use_local is True or None we assume local loading
33- if use_local is not False :
34- # Don't mess with the path if path starts with local dir
35- if not args [1 ].startswith ("{}/" .format (args [0 ].effect_name )):
32+ # If use_local is True prepend the package name to the path
33+ if use_local is True :
3634 path = args [1 ]
3735 path = os .path .join (args [0 ].effect_name , path )
3836
@@ -87,7 +85,7 @@ def draw(self, time, frametime, target):
8785 # Methods for getting resources
8886
8987 @local_path
90- def get_shader (self , path , local = True ):
88+ def get_shader (self , path , local = False ):
9189 """
9290 Get a shader or schedule the shader for loading.
9391 If the resource is not loaded yet, an empty shader object
@@ -100,7 +98,7 @@ def get_shader(self, path, local=True):
10098 return resources .shaders .get (path , create = True )
10199
102100 @local_path
103- def get_texture (self , path , local = True , ** kwargs ):
101+ def get_texture (self , path , local = False , ** kwargs ):
104102 """
105103 Get a shader or schedule the texture for loading.
106104 If the resource is not loaded yet, an empty texture object
@@ -113,7 +111,7 @@ def get_texture(self, path, local=True, **kwargs):
113111 return resources .textures .get (path , create = True , ** kwargs )
114112
115113 @local_path
116- def get_track (self , name , local = True ):
114+ def get_track (self , name , local = False ):
117115 """
118116 Get or create a rocket track. This only makes sense when using rocket timers.
119117 If the resource is not loaded yet, an empty track object
@@ -126,7 +124,7 @@ def get_track(self, name, local=True):
126124 return resources .tracks .get (name )
127125
128126 @local_path
129- def get_scene (self , path , local = True , ** kwargs ):
127+ def get_scene (self , path , local = False , ** kwargs ):
130128 """
131129 Get or create a scene.
132130 :param path: Path to the scene
0 commit comments