@@ -29,10 +29,8 @@ def local_path(func):
29
29
def local_wrapper (* args , ** kwargs ):
30
30
use_local = kwargs .get ('local' )
31
31
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 :
36
34
path = args [1 ]
37
35
path = os .path .join (args [0 ].effect_name , path )
38
36
@@ -87,7 +85,7 @@ def draw(self, time, frametime, target):
87
85
# Methods for getting resources
88
86
89
87
@local_path
90
- def get_shader (self , path , local = True ):
88
+ def get_shader (self , path , local = False ):
91
89
"""
92
90
Get a shader or schedule the shader for loading.
93
91
If the resource is not loaded yet, an empty shader object
@@ -100,7 +98,7 @@ def get_shader(self, path, local=True):
100
98
return resources .shaders .get (path , create = True )
101
99
102
100
@local_path
103
- def get_texture (self , path , local = True , ** kwargs ):
101
+ def get_texture (self , path , local = False , ** kwargs ):
104
102
"""
105
103
Get a shader or schedule the texture for loading.
106
104
If the resource is not loaded yet, an empty texture object
@@ -113,7 +111,7 @@ def get_texture(self, path, local=True, **kwargs):
113
111
return resources .textures .get (path , create = True , ** kwargs )
114
112
115
113
@local_path
116
- def get_track (self , name , local = True ):
114
+ def get_track (self , name , local = False ):
117
115
"""
118
116
Get or create a rocket track. This only makes sense when using rocket timers.
119
117
If the resource is not loaded yet, an empty track object
@@ -126,7 +124,7 @@ def get_track(self, name, local=True):
126
124
return resources .tracks .get (name )
127
125
128
126
@local_path
129
- def get_scene (self , path , local = True , ** kwargs ):
127
+ def get_scene (self , path , local = False , ** kwargs ):
130
128
"""
131
129
Get or create a scene.
132
130
:param path: Path to the scene
0 commit comments