Yeah I came accross that module today and read some of the doc. Didn’t really
know how to handle it though. You solved the hardest part.
Thank you!
> On Jan 27, 2017, at 9:23 PM, Frank Rueter|OHUfx wrote:
>
> Pytohn's ConfigParser comes in handy here. Try this for starters:
>
> import os
> im
Pytohn's ConfigParser comes in handy here. Try this for starters:
import os
import ConfigParser
workSpace = 'Compositing'
iniFile = os.path.expanduser('~/.nuke/uistate.ini') config =
ConfigParser.RawConfigParser()
config.read(iniFile)
config.set('Nuke', 'StartupWorkspace', workSpace)
with
I'll keep the HOME variable in mind but it's a bit invasive indeed. I'll try to
parse uistate tomorrow and get back with the results.
Thanks
--
Bruno-Pierre Jobin
> On Jan 26, 2017, at 5:55 PM, Frank Rueter|OHUfx wrote:
>
> Actually, I just tried and there doesn't seem to be an API for deali
Actually, I just tried and there doesn't seem to be an API for dealing
with workspaces.
However, you could write a simple wrapper script to search and replace
the respective value in your ~/.nuke/uistate.ini (e.g.
startupWorkspace=Scripting)
On 27/01/17 11:42 AM, Frank Rueter|OHUfx wrote:
I
I see. You could modify your home directory as Jake pointed out.
If that's too invasive, you could try a python script that checks your
environment on startup, and if in DEV mode, changes the startup workspace.
I haven't tried it myself though.
On 27/01/17 10:47 AM, Bruno-Pierre Jobin wrote:
uno-Pierre Jobin"
| To: "Nuke Python discussion"
| Sent: Thursday, January 26, 2017 4:47:28 PM
| Subject: Re: [Nuke-python] preferences file
| It’s only for myself. I want the workspace to be set in scripting
| mode when I launch nuke from the dev environment. Else I want my
|
It’s only for myself. I want the workspace to be set in scripting mode when I
launch nuke from the dev environment. Else I want my default workspace to comp.
If anyone know how to achieve this, it’d be awesome.
> On Jan 26, 2017, at 2:37 PM, Frank Rueter|OHUfx wrote:
>
> I don't think this is
I don't think this is possible out of the box, so some suctom python
code may be required to parse an arbitrary preference file.
Out of interest, why do you want to do this, seeing the workspace should
be an artist's choice rather than an enforced setting?
Cheers,
frank
On 27/01/17 4:25 AM,