Page 1 of 1

Preference Files

PostPosted: Mon May 18, 2015 3:40 am
by Fred Pienkos
Hi Everyone.

I am launching Fusion from a batch file that preps environment variables, and launches fusion for us. We already utilize
Code: Select all
SET FUSION_MasterPrefs=

for setting facility settings that we usually use. But now we also need a way to set specific path mappings per project.

Is there a way to add another preference file that gets loaded when fusion is launched from our batch file?

We can have this new prefs file automatically generated when the user launches fusion from a project, but I am not sure how to make fusion read in another preference file other than the MasterPrefs, and the user prefs in their profile dir.

I am trying to avoid having to write out the entire master prefs file dynamically per project if possible, but if the only way we can do it is with a new master prefs each project, so be it.

thanks
Fred

Re: Preference Files

PostPosted: Mon May 18, 2015 12:27 pm
by Blazej Floch
Hi Fred,

yes. You also have FUSION_PROFILE_DIR which will set the profile path map.
Additionally you can also use regular environment variables in path maps e.g. $(USERNAME)

As mentioned here: viewtopic.php?f=22&t=33377
... which I thought of as a bug but I do believe now that the env vars only work in Studio.

Re: Preference Files

PostPosted: Tue May 19, 2015 6:08 am
by Fred Pienkos
Perhaps I am thinking about the profile dir wrong.

I have it setup that the profile dir is where there is a fusion.prefs file that contains the users preferences. (The prefs the user is allowed to set)

I usually do not touch that file.

Is it possible to have another .prefs file in this folder that would also be added to the current session of fusion's preferences?

Re: Preference Files

PostPosted: Tue May 19, 2015 12:01 pm
by Blazej Floch
Please compare to here:
http://www.steakunderwater.com/VFXPedia ... _and_Paths

The level of customization you can do with the envvars is:
Code: Select all
# MasterPref -> PrefDir -> Pref

# This can have the global settings and also settings that you don't want
# your artist to change via the Locked = true flag
FUSION_MasterPrefs = C:\path\to\masterPrefsFile.prefs

# Directory where all the profiles are stored
FUSION_PROFILE_DIR = C:\path\to\fusionProfileDirectory
FUSION_PROFILE = NameOfTheProfile


In the example provided the FUSION_PROFILE was set to %USERNAME% so each and every Artist would recieve their very own profile in the PROFILE_DIR.

There is no additional level of customization like Master -> User -> Show.
However as I said you can incorporate environment variables you could in your master prefs specify e.g. that certain path maps are based on the currest set show like this
X:\projects$(SHOW)_$(SEASON)\$(SHOT)\fusion

You just need to enforce the availability of the env vars you use.

Also note that for more global access to data the bin should be used.

Re: Preference Files

PostPosted: Wed May 20, 2015 11:09 pm
by Fred Pienkos
Yah I think the env variables is what I need to implement.

However, can the env variables be specific to a session of fusion that is open? Is it possible to launch a second fusion that would use different env variables on the same machine.. (multi tasking.... )

Fred

Re: Preference Files

PostPosted: Thu May 21, 2015 12:25 am
by Chad Capeland
Fred Pienkos wrote:Yah I think the env variables is what I need to implement.

However, can the env variables be specific to a session of fusion that is open? Is it possible to launch a second fusion that would use different env variables on the same machine.. (multi tasking.... )

Fred


Yes, just launch Fusion with a batch that includes SET.

Re: Preference Files

PostPosted: Fri May 22, 2015 1:35 am
by Blazej Floch
(Quickly hacked together for demo purposes)
If you have python you can use something like this. I used something similar to launch different builds of Fusion@eyeon.

It will set the ENV_VAR to the selected value.
E.g. if you select ShowX/Season02 it will set SHOT=show_x_s02 and launch fusion

If you had PySide this could look not ugly but it will do its job and is probably still nicer than batch files.
You can also easily "disable" certain shows by using a # prefix before the line.
Code: Select all
ENV_OPTIONS = [
  ['ShowX/Season01',  'show_x_s01'],
  ['ShowX/Season02',  'show_x_s02'],
# ['Import VFX Movie',  'vfx_movie'],  # <- This is disabled because of the first #
]