Page 1 of 1

Alternative Fusion Home Directory

Posted: Fri Apr 26, 2019 4:47 pm
by Mclawest

Hey, friends!

Is there an any variable to define a custom Fusion's home directory? Let's say I want to start Fusion from python script with some predefined variables where some tools and scripts will be stored and will be visible by Fusion..

Thanks!


Re: Alternative Fusion Home Directory

Posted: Fri Apr 26, 2019 9:26 pm
by intelligent machine

This should get you started:

Code: Select all

comp.SetPrefs( 'Comp.Paths.Map', {
	"UserPath1":"the/user/path/1",
	"UserPath2":"the/user/path/2",	
} )

(keep in mind that this alone will overwrite any existing comp level path maps. If you need to add to an existing list then get that list first, add to it, and then overwrite)


Re: Alternative Fusion Home Directory

Posted: Sat Apr 27, 2019 4:53 am
by Mclawest

ok, but this script shoud be run when Fusion started as an event scripts.. I meant is there any environment variable which will be added to existed? Like HOUDINI_PATH or HSITE in Houdini.. I believe .nuke folder in path variable doing something similar for Nuke..
Fusion starts with settings from root folder and user folder, so can we add one more place which will be added to default ones? Or event scripts is the only way?
We have a custom folder with scripts and tools for Fusion, but we add a path to this folder manualy each time to global Path Maps, even with scripts it takes more time if we just had an environment variable which can do the job..
After thirteen years of using Fusion I decided to ask this question )))


Re: Alternative Fusion Home Directory

Posted: Sat Apr 27, 2019 5:08 am
by PeterLoveday

You can use environment variables in path maps, so to include a custom location (in addition to the standard ones) you could adjust your UserPaths: map to include something like $(FUSION_PATH). For a default config that would be:

Code: Select all

UserData:;AllData:;Fusion:;$(FUSION_PATH)

If you've installed Reactor, you may want:

Code: Select all

UserData:;AllData:;Fusion:;Reactor:Deploy;$(FUSION_PATH)

In any case, you should be able to simply append ;$(FUSION_PATH) to your current map. The UserPaths map includes the majority of installable assets, such as scripts, macros, fuses, etc... so it's an easy way to add custom locations.


Re: Alternative Fusion Home Directory

Posted: Sat Apr 27, 2019 5:42 am
by Mclawest

ok, that's what I was looking for! almost.. I thought that there is already exist some predefined $(FUSION_PATH) in Paths Maps by default.
But, nayway, it is cool and works well! Thanks!