Alternative Fusion Home Directory

User avatar
Mclawest
Fusioneer
Posts: 86
Joined: Tue Jul 28, 2015 6:31 am
Contact:

Alternative Fusion Home Directory

#1

Post by Mclawest » Fri Apr 26, 2019 4:47 pm

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!

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

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.

Go to full post

User avatar
intelligent machine
Fusionista
Posts: 427
Joined: Fri May 13, 2016 10:01 pm
Answers: 2
Location: Austin, Texas, USA
Been thanked: 32 times
Contact:

Re: Alternative Fusion Home Directory

#2

Post by intelligent machine » Fri Apr 26, 2019 9:26 pm

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)


User avatar
Mclawest
Fusioneer
Posts: 86
Joined: Tue Jul 28, 2015 6:31 am
Contact:

Re: Alternative Fusion Home Directory

#3

Post by Mclawest » Sat Apr 27, 2019 4:53 am

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 )))


User avatar
PeterLoveday
Fusioneer
Posts: 153
Joined: Sun Sep 14, 2014 6:09 pm
Answers: 6
Been thanked: 17 times

Re: Alternative Fusion Home Directory

#4

Post by PeterLoveday » Sat Apr 27, 2019 5:08 am

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.


User avatar
Mclawest
Fusioneer
Posts: 86
Joined: Tue Jul 28, 2015 6:31 am
Contact:

Re: Alternative Fusion Home Directory

#5

Post by Mclawest » Sat Apr 27, 2019 5:42 am

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!