Jump to: Board index » General » Fusion

Preference Files

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

Fred Pienkos

  • Posts: 86
  • Joined: Wed Jan 21, 2015 1:57 am

Preference Files

PostMon May 18, 2015 3:40 am

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
Offline
User avatar

Blazej Floch

  • Posts: 194
  • Joined: Tue Nov 11, 2014 12:48 am
  • Location: Toronto, ON

Re: Preference Files

PostMon May 18, 2015 12:27 pm

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.
Offline

Fred Pienkos

  • Posts: 86
  • Joined: Wed Jan 21, 2015 1:57 am

Re: Preference Files

PostTue May 19, 2015 6:08 am

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?
Offline
User avatar

Blazej Floch

  • Posts: 194
  • Joined: Tue Nov 11, 2014 12:48 am
  • Location: Toronto, ON

Re: Preference Files

PostTue May 19, 2015 12:01 pm

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.
Offline

Fred Pienkos

  • Posts: 86
  • Joined: Wed Jan 21, 2015 1:57 am

Re: Preference Files

PostWed May 20, 2015 11:09 pm

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
Offline
User avatar

Chad Capeland

  • Posts: 3306
  • Joined: Mon Nov 10, 2014 9:40 pm

Re: Preference Files

PostThu May 21, 2015 12:25 am

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.
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline
User avatar

Blazej Floch

  • Posts: 194
  • Joined: Tue Nov 11, 2014 12:48 am
  • Location: Toronto, ON

Re: Preference Files

PostFri May 22, 2015 1:35 am

(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 #
]
Attachments
envlauncher.zip
(1.1 KiB) Downloaded 330 times

Return to Fusion

Who is online

Users browsing this forum: Google [Bot] and 37 guests