CGRU / cgru

CGRU - AFANASY
http://cgru.info/
GNU Lesser General Public License v3.0
278 stars 111 forks source link

getenv variables in path #403

Closed Recown closed 6 years ago

Recown commented 6 years ago

Found little bug with Nuke in case when: If i use any variable like [getenv someVariable] in the path of WriteNode when i push on render - variable dont replace with correct value. Instead of that, [getenv someVariable] still persist in the path. The issue exist only if check box "Render to temporary image" enabled in properties of Afanasy node. If uncheck this box - all going to be ok. I see, that problem in file render.py in the mechanism of proceeding path to temp directory. By the way, if use variable [getenv someVariable] in filename - there is no problem. Examples /some/path/to/render/my.render.[getenv someVariable].file.exr - it's ok and work well

/some/path/[getenv someVariable]/render/my.render.[getenv someVariable].file.exr - render via afanasy node crashes

/some/path/[getenv someVariable]/render/my.render.to.file.exr - render via afanasy node crashes

Steps to reproduce: Define in setup_nuke.sh some variables via export. In the Nuke create write node and connect to node afanasy. Then render throught afanasy node with checkbox "Render to temporary image" and without it.

P.S. unfortunately i don't know yet how to fix it P.P.S. Problem disappear in random moment of time, for now - all works fine.

lithorus commented 6 years ago

Does this still happen? I would imagine that the nuke submitter can be modifed to evaluate the path before building the job, but then the environment variable is coming from the host submitting the job and not the render host. Is that what is intended?

Recown commented 6 years ago

I am making variable setup for each node. In my case variables comes from init.py on the NAS server, so, every node receive this variable. If it is matter i use Nuke callbacks beforeRender() and onScripLoad() to launch function, that defines all environment variables. Right now the problem dissapered, but can return again like before. I understand, that it's "ghost" problem, because there is no way for 100% reproducing.

lithorus commented 6 years ago

But does the variable change for each node? Eg. for node001 the variable can be 'node001temp' and for node002 'node002temp'? Or is is just to distinguish render nodes from workstations? Or do you mean nuke node and not machine node?

Recown commented 6 years ago

I meant machine nodes. Value of a variable is not changing from machine node to machine node, but it defines each time, when render starts or script opens for each nuke render session. And variable in nuke node not changing as described in topic message.

lithorus commented 6 years ago

Hmm... seems that the nuke scripts are already using getEvaluatedValue, so the value should be baked with the value from the host submitting it. When you encountered it, it might have been that it didn't get evaluated properly. If it happens again check the paths of the block and if they are correct.

Recown commented 6 years ago

Ok, thanks for the answers. I think we should delete this topic, because i cant reproduce the problem anymore...

lithorus commented 6 years ago

I'll close the issue for now. But please do post in this again if it occurs again.