I hope you will continue to make the Python interface more complete. It is very handy.
Thanks to you for highlighting this "hole" in the API. This seems like a useful thing for Scripts to do (work with the locator functions). We will consider adding support for this asap.
Thanks again for your comments and suggestions.
It was easier to use my own function to find the texture maps, copy them to the new location, and update the texture name, instead of using mgWriteTexture(). And much easier than converting everything to C, but thanks for the suggestion.
I hope you will continue to make the Python interface more complete. It is very handy.
Is there any way to set the search path used by the default locator function?
No there is not. The idea was that the locator function could be swapped in/out by the app so no need to twiddle with search paths. The problem is you can't do this in OpenFlight Script, only the C-language API. Admittedly this is a hole in OpenFlight Script. Can you convert your app to use the C-language API?
Is there any way to set the search path used by the default locator function?
The documentation is at fault here. You cannot use the locator functions in OpenFlight script currently. Sorry that the documentation does not suggest that. You can only use the locator functions in the C language API.
Again, sorry about that.
Craig
I want to use mgSetTextureLocatorFunc() in Python, but I cannot find any definition for the Python version of mgfilelocator func. It needs to return a path string.
Apparently I can't just get the current one and call it in the Python interactive interpreter either.
I'm guessing it is either:
or