Page 1 of 2

afanasy: Unknown command

Posted: Fri Jul 14, 2017 11:54 am
by Recown
Greetings!
I have some strange issue with afanasy node in nuke 10.5 (in early versions was the same)
When i try to render through this node i get error on all hosts
HOSTNAME=somePC
LM_LICENCS_FILE='/usr/local/Nuke10.5v4/nuke.lic'
NUKE = '/usr/local/Nuke10.5v4/Nuke10.5'
Nuke 10.5v4, 64 bit, built May 4 2017.
Copyright (c) 2017 The Foundry Visionmongers Ltd. All Rights Reserved.
FileBrowser, Can't write favorites: No preferences path.
Temp directory = "/tmp/.afrender.nuke.win_0050_comp_v097.nk.0714-161607-816.win_0050_comp_v097.nk-v012.nk.25963"
Opening /teams/team_A/2016.07_Kolovrat/4_out/win/win_0050/2d/comp/scripts/win_0050_comp_v097.nk.0714-161607-816.win_0050_comp_v097.nk-v012.nk
Scene open error:
/teams/team_A/2016.07_Kolovrat/4_out/win/win_0050/2d/comp/scripts/win_0050_comp_v097.nk.0714-161607-816.win_0050_comp_v097.nk-v012.nk:
afanasy: Unknown command
Removing temp directory:
/tmp/.afrender.nuke.win_0050_comp_v097.nk.0714-161607-816.win_0050_comp_v097.nk-v012.nk.25963

If i use Submit Job menu - there is no problems
I checked, this file exist on this path (afanasy node created that file)
Local .nk file location get the same issue on machine, where it stored.
afanasy: Unknown command - i just cant understand what command afanasy dont know :) I believe that afanasy is best software for me, i just want to understand what am i doing wrong?

Re: Nuke node Afanasy

Posted: Fri Jul 14, 2017 12:20 pm
by timurhai
May be you machine on farm does not recognize "afanasy" gizmo?
May workstation and render (afrender process) Nuke setup differs?

Re: Nuke node Afanasy

Posted: Fri Jul 14, 2017 12:35 pm
by Recown
I see that error even on machine, from where i send the task. This machine definitely know afanasy env, becomse i can use afanacy node in node graph :)
all setup files of cgru is absolutely identical on each node. That error tells me, that afanasy environment not loaded?
In Gizmo i see only 100 pcs of inputs, and 1 output. All of that nodes is empy.
UPD.
I opened that gizmo and take a look on the knobs in the "Manage user knobs"
All of that knobs is empty. Only Render button has a code like this cgru.render( nuke.toNode("this"))

Re: Nuke node Afanasy

Posted: Fri Jul 14, 2017 12:40 pm
by timurhai
afanasy: Unknown command
- Nuke definitely has not recognized "afanasy" gizmo.
And it can be on the same machine.
At seems that you and afrender runs Nuke with differ environment.

Do you run afrender as windows service?
How do you run Nuke and how do you run afrender?

Re: Nuke node Afanasy

Posted: Fri Jul 14, 2017 12:44 pm
by Recown
Please, take a look on my last updated reply.

I use ubuntu 14.04
afrender work from simple user on each machine. Autostart from init.d script from default install CGRU. On my workstation Nuke starts from cgru script start_nuke.sh

ok, how to initialize cgru environment for afrender? It should work...

Re: Nuke node Afanasy

Posted: Fri Jul 14, 2017 3:27 pm
by Recown
I think i found my problem
My setup_nuke.sh modificated. I added NUKE_PATH, because we ahve a lot of software stuff on NAS.
source "$CGRU_LOCATION/software_setup/setup__all.sh"

# Setup CGRU common scripts if location provided
if [ ! -z "${CGRU_LOCATION}" ]; then
export NUKE_CGRU_PATH="${CGRU_LOCATION}/plugins/nuke"
if [ -z "${NUKE_PATH}" ]; then
export NUKE_PATH="/mnt/san/lib/lib_soft/nuke"
else
export NUKE_PATH="${NUKE_CGRU_PATH}:${NUKE_PATH}"
fi
fi

BUT! When i start Nuke, i see all my extra staff. But i don't see CGRU panel. I thinks, that not all CGRU modules and scripts importing. How can i add my custom NUKE_PATH in another way?

Re: Nuke node Afanasy

Posted: Fri Jul 14, 2017 3:45 pm
by Recown
Thanks for help! I found the solution. If you have custom init.py in custom NUKE_PATH, you just need to add all content of CGRU init.py (on Linux /opt/cgru/plugins/nuke/init.py) into the your custom init.py

Re: Nuke node Afanasy

Posted: Fri Jul 14, 2017 5:27 pm
by timurhai
Better solution is to add your custom NUKE_PATH before CGRU adds it.
For example you can create "setup_libs.sh" in the CGRU root folder, with text:

Code: Select all

export NUKE_PATH="/mnt/san/lib/lib_soft/nuke"
CGRU at setup will source all scripts matches "setup_*.sh" pattern:
https://github.com/CGRU/cgru/blob/master/setup.sh#L25

Re: Nuke node Afanasy

Posted: Sat Jul 15, 2017 11:21 am
by Recown
Thank you for this trick, on Monday I'll try to do it.

Re: Nuke node Afanasy

Posted: Mon Jul 17, 2017 7:17 am
by Recown
Unfortunately it doesn't work. With this setup Nuke sees only my custom plugins without CGRU plagins.
I've tested all variations and ways, but only one work for me. I added in my custom init.py (in the root directory of my remote plugins):
nuke.pluginAppendPath('/mnt/san/lib/lib_soft/nuke/cgru/plugins/nuke')

Works even if i add default CGRU path of Linux nuke.pluginAppendPath('/opt/cgru/plugins/nuke')
May be some staff in my custom init.py is messing up with normal start process of $NUKE_PATH:$NUKE_CGRU_PATH