Custom Auto discover Maya install path

Hello,
I have question regarding Maya installation path.
In the Software Entity in SG we can point at a specific path for each OS and this byapasses the auto-discover code that is used by default.
But what if I have remote users that can have their Maya install not in the default location and each one in a different location?
Can I add a list of possible locations in the Software entity?
Or, can I change the method for the auto-discover?

You can do either.

  1. Add multiple maya Software entities and restrict them to the users with their own paths.

  2. Fork the tk-maya engine and change the auto discovery logic to your needs.
    I think you can just add your templates to the list here:

Thanks for the reply @Ricardo_Musch !

I think I’ll go for the restricted by user Software Entity tip.

Regarding the forking of an engine, is there a doc link to know how to properly do that and what are the pros and cons? I understand that forking any part of the code would keep it from updating if any new version is released in the app store, so it would mean a maintenance I’d prefer to skip for now, or I’m getting the concept wrong?

I’ve actually managed to use the Software Entity method entering an Env Var in the Windows Path and defnining it in the before_app_launch hook where I do my logic to discover Maya eventual location.
So basically I bypass the auto-discover of the engine by entering a path in the Software Entity, and inject mine through the hook.
Cheers

Whatever works hehe.

As they say, “there are many ways that lead to Rome”. :slight_smile:

Forking an engine isn’t super scary, you can still pull the changes from the official repo into your own but it does allow you to alter it your way.
yes it ads maintenance and I would definitely not recommend this if you aren’t comfortable with python coding and coding for toolkit.

Hey @Ricardo_Musch ,
thanks again. On my side for now is not much about feeling comfortable or not, it’s just that I have very little resources (actually I’m by myself for the time being) so I’ll try to skip the forking for now. Having said this, f there are good tips or explanations for forking good practices, I’d appreciate the links.
And since I’m Roman, I can’t help not to comment … we know the say like this: ALL paths lead to Rome! obviously :smiley:

1 Like