Page 1 of 1

nuke Run - .bat

Posted: Fri May 19, 2017 4:45 pm
by cgspill
Timur, good afternoon!
I set up Afanasy, everything works fine. If I run through Keeper (in Nuke) the farm is working faultlessly. But I want to integrate it into my pipeline and I'm not really able to write the correct .bat file.
How can this be done? That I could run a plug-in through my file. I tried to register the variables, but with the renderer an error pops up:

NukeX 10.5v1, 64 bit, built Dec 6 2016.
Copyright (c) 2016 The Foundry Visionmongers Ltd. All Rights Reserved.
File "C:\cgru\python\lib\", line 176
SyntaxError: invalid syntax

Example my .bat file:
@echo off
set AF_PYTHON=C:\cgru\afanasy\python
set AF_ROOT=C:\cgru\afanasy
set NUKE_CGRU_PATH=C:\cgru\plugins\nuke
set CGRU_PYTHON=C:\cgru\lib\python
set PYTHONPATH=C:\cgru\afanasy\python;C:\cgru\plugins\nuke\scripts;C:\cgru\afanasy\python;C:\cgru\lib\python

"C:\Program Files\Nuke10.5v1\Nuke10.5.exe" --nukex

Re: nuke Run - .bat

Posted: Sun May 21, 2017 9:42 am
by timurhai
You can look at the default CGRU Nuke setup bat: ... uke.cmd#L2
Note, that any soft setup includes this file: ... all.cmd#L4
It reset PYTHONHOME that is used for afrender to use CGRU provided Python: ... hon.cmd#L4
If you does not reset it, soft can try to use CGRU provided Python too, and it can be incompatible with an own Python version.

Re: nuke Run - .bat

Posted: Sun May 21, 2017 3:33 pm
by cgspill
Timur, thank you. Everything works fine. It turns out I had another problem. I created a .bat file and moved it to the hard drive (made the "Launcher" folder) and sent the shortcut to the desktop. It's very strange why this error occurs because I'm running through a shortcut, it just refers to the executing file.

А теперь на русском :)
Тимур, спасибо. Все отлично работает. Оказывается у меня была другая проблема. Я создал .bat файл и переместил его на жесткий диск (сделал папку "Launcher") и отправил ярлык на рабочий стол. Очень странно почему выходит эта ошибка из-за того что я запускаюсь через ярлык, она ведь всего лишь ссылается на исполняющий файл.
Сейчас просто оставил батник на рабочем столе и всё гуд)
Еще раз огромное спасибо.

Извиняюсь за наглость, но где я могу найти информацию от том, как выставить сколько ресурсов будет тратиться на рендер? Машины быстрые, но афанасий не использует и 50% мощности(

Re: nuke Run - .bat

Posted: Mon May 22, 2017 10:45 am
by timurhai
Better not to speak in Russian, as for most Afanasy developers and users it is not the native language.
It is very good that afrender takes less that 50% resources.
It should take less that 1% resources.
If launched software takes less than 50% resources you can find a bottleneck of this.
It can be network, for example.
If soft can`t take 100% resources for some other internal architecture reason (some caching can use only 1 core, for example),
You should use capacity mechanism.
Render with 2000 capacity can take 2 tasks with 1000 capacity, or 1 task with 1000 and 2 with 500.
See this