Thanks Ben - I didn't know about nuke.env
Nice and simple when you know how
Cheers
Howard
________________________________
From: Ben Dickson <ben.dick...@rsp.com.au>
To: Nuke Python discussion <nuke-python@support.thefoundry.co.uk>
Sent: Friday, 24 May 2013, 11:00
Subject: Re: [Nuke-python] Re: nuke.scriptOpen
Can make this a bit more robust by doing:
nuke_exe = nuke.env['ExecutablePath']
subprocess.Popen([nuke_exe, '--pause', '--nukex', '/path/to/thing.nk'])
On 23/05/13 22:30, Ben Dickson wrote:
> Not quite, that would be the same as running this in a shell:
>
> nuke '--pause --nukex' '/path/to/thing.nk'
> ..which error saying no argument named '--pause --nukex'
>
> Each argument goes in a separate index in the list, like this:
>
> subprocess.Popen(['nuke', '--pause', '--nukex', '/path/to/thing.nk'])
>
> On 23/05/13 21:49, Howard Jones wrote:
>> Thanks Ben
>>
>> I thought it might be a subprocess. As its for trouble shooting I'll
>> write a separate tool then.
>> Presumably
>>
>> subprocess.Popen(['nuke', '--pause --nukex', '/path/to/thing.nk'])
>>
>> would also do the nukex bit?
>> Cheers
>> Howard
>>
>> ------------------------------------------------------------------------
>> *From:* Ben Dickson <ben.dick...@rsp.com.au>
>> *To:* Nuke Python discussion <nuke-python@support.thefoundry.co.uk>
>> *Sent:* Thursday, 23 May 2013, 9:35
>> *Subject:* Re: [Nuke-python] Re: nuke.scriptOpen
>>
>> "No" indeed, as far as I'm aware
>>
>> I don't think it's even possible to pause the viewer from Python (e.g
>> from an onScriptOpen callback). You could maybe disconnect the viewer's
>> inputs, but it might not happen soon enough
>>
>> Closest thing would be to, instead of nuke.scriptOpen(), use
>>
>> subprocess.Popen(['nuke', '--pause', '/path/to/thing.nk'])
>>
>> Not quite the same (will always open a new instance), and you may want
>> to check nuke.env for NukeX, and add --nukex to the command etc
>>
>> On 23/05/13 17:54, Howard Jones wrote:
>> > No? Or was that a really dumb question no one wants to answer ;)
>> >
>> > Basically I've hit an issue where atomkraft can screw up the motion
>> > channel, so gizmos using that channel corrupt and I get scripts that
>> > bomb the second I open them. At least it would appear to be the issue.
>> > (All at 3am of course)
>> >
>> > So via my pipeline that opens scripts I'd like to add the --pause
>> option.
>> >
>> > Obviously I can do this manually in a shell or write a different tool
>> > but if I can modify nuke.scriptOpen() that would be easiest.
>> >
>> > Any help appreciated
>> > Howard
>> >
>> > On 20 May 2013, at 22:39, Howard Jones <mrhowardjo...@yahoo.com
>> <mailto:mrhowardjo...@yahoo.com>
>> > <mailto:mrhowardjo...@yahoo.com <mailto:mrhowardjo...@yahoo.com>>>
>> wrote:
>> >
>> >> Hi
>> >>
>> >> Is there a way to pass '--pause' into nuke.scriptOpen()?
>> >> Cheers
>> >> Howard
>> >
>> >
>> > _______________________________________________
>> > Nuke-python mailing list
>> > Nuke-python@support.thefoundry.co.uk
>> <mailto:Nuke-python@support.thefoundry.co.uk>,
>> http://forums.thefoundry.co.uk/
>> > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>
>> --
>> ben dickson
>> 2D TD | ben.dick...@rsp.com.au <mailto:ben.dick...@rsp.com.au>
>> rising sun pictures | www.rsp.com.au
>> _______________________________________________
>> Nuke-python mailing list
>> Nuke-python@support.thefoundry.co.uk
>> <mailto:Nuke-python@support.thefoundry.co.uk>,
>> http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>
>>
>>
>>
>> _______________________________________________
>> Nuke-python mailing list
>> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
--
ben dickson
2D TD | ben.dick...@rsp.com.au
rising sun pictures | www.rsp.com.au
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python