Den,

If you look at what I said, you probably would have to override some
built-in classes;
This could work but on a second though, it might be too much to implement
for such a simple thing.

I think Ron, said to create manually a 'base' nuke script (.nk) on the
server.

Then anytime you want to generate a new script, in python you open that
empty base and create whatever you want.
Then you save it anywhere using nuke.scriptSaveAs(location)

I think it is a better way finally;

Cheers,
Justin




2015-12-02 18:21 GMT+00:00 Den Serras <[email protected]>:

> Thanks Justin! I tried importing hiero from Nuke 9 command line, and got
> an error "No module named _fnpython", and I can't get Studio to launch as
> command line. Have you been able to do that?
>
> Thanks Ron. I am not sure what you mean, however. I'm trying to find a way
> to have Nuke server-side generate the script, so that all the proper
> configs are applied without me having to pre-generate a template whenever
> anyone updates code that would affect new files.
>
> Den
>
> On Wed, Dec 2, 2015 at 1:59 AM, Ron Ganbar <[email protected]> wrote:
>
>> You can create a file on the filesystem and open it all through Python.
>>
>>
>>
>> Ron Ganbar
>> email: [email protected]
>> tel: +44 (0)7968 007 309 [UK]
>>      +972 (0)54 255 9765 [Israel]
>> url: http://ronganbar.wordpress.com/
>>
>> On Wed, Dec 2, 2015 at 11:46 AM, Justin GD <[email protected]> wrote:
>>
>>> Hi Den,
>>>
>>> I guess you could create a nuke script as same as a Nuke Studio nuke
>>> script exporter..
>>>
>>>
>>> [...]pythonextensions\site-packages\hiero\core\nuke\Script.py
>>>
>>> You have the ScriptWriter class with a method called *writeToDisk *that
>>> uses* nuke.saveToScript( scriptFilename, fileContents )*
>>>
>>> Maybe that could help ?
>>>
>>>
>>> Cheers,
>>> Justin
>>>
>>>
>>> 2015-12-01 16:38 GMT+00:00 Den Serras <[email protected]>:
>>>
>>>> Hi all,
>>>>
>>>> Due to our pipeline, we have to create the Nuke file for the artist. We
>>>> currently create a template which is duplicated and moved into the correct
>>>> spot, but I'd prefer to do it more dynamically so every time I push a
>>>> change to the setup I don't have to generate a new file. I tried launching
>>>> the CLI and then saving the file, but none of my init scripts that actually
>>>> modify the file seem to be running in the CLI. Don't know if I'm doing
>>>> something wrong or this method won't work. Anyone have a dynamic way to
>>>> create a script, or are those who prebuild scripts always using templates?
>>>>
>>>> Thanks!
>>>> Den
>>>>
>>>> _______________________________________________
>>>> Nuke-python mailing list
>>>> [email protected], http://forums.thefoundry.co.uk/
>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Nuke-python mailing list
>>> [email protected], http://forums.thefoundry.co.uk/
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>>
>>>
>>
>> _______________________________________________
>> Nuke-python mailing list
>> [email protected], http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>
>>
>
> _______________________________________________
> Nuke-python mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to