Yable problem solved, and a bug?

I found out tonight why my Yable wouldn’t work, I hadn’t finnished the installation of Yafray properly.
Now something else: As suggested in the docs the Render-button in Yable does not launch Yafray. But if I export with the Export-button and then render with the Yafray GUI I only get an error message saying that something is wrong with my .xml file. However, if I export with Yable’s Render-button and then render from the GUI, it all works fine. :-?
Any comments, anyone?

What error statement are you getting?

If it is the “Can’t launch renderer” error, you can make a minor modification to the script as recommended by eeshlo to fix it:

https://blenderartists.org/forum/viewtopic.php?t=7728&start=270

Starting at line 1629:


try:
			if POSIX:
				#os.spawnvp(1, "yafray", tuple(("", cpus, filename)))
				os.spawnlp(1, "yafray", "", cpus, filename )
			else:
				cmd = "C:\\YAFRay\\YAFRay"
				args = (cmd, cpus, filename)
				os.spawnv(os.P_NOWAIT, cmd, args)

That’s right, “can’t launch renderer”. I’ll try what you suggested, but how do I find line 1629 without counting manually?

ALT+J in text window.

Env

Well, if you are using Blender 2.26, there is a new icon in the Text Window header that contains 4 black horizontal lines with a tool tip that shows ‘Display Line numbers’. Press that icon button for Line Numbers.

Also, I should have mentioned that when you edit the Python file to be carefull, Python uses Tabs/spaces/ ‘White space’ to indicate delimitors. ie. which code belongs to which block. Also, you may need to modify the code I posted depending on where you installed the YAFRay executable file to -> I installed it in C:\Yafray .

Maybe someone can post the modified file if you don’t feel comfortable editing it. (I have no web site yet - sorry)

As env suggested, pressing Alt _ j is a fast way to jump to the desired line number. Also, note that for earlier versions of Blender, you can use this key combination as a quick check to see which line number the cursor is currently on in your Python file.

I just tried this but it did not work well, this is what I get:

http://home.tiscali.no/hanspb/misc/yablemsg.jpg

My Yafray is in c:\programfiler\yafray, so I changed the “cmd = …” line to
cmd = “c:\programfiler\yafray\yafray”

Any ideas?

And by the way, gram.yafray is also in c:\programfiler\yafray.

What does your line 62 read?

I have:

YABLEROOT = “C:\Data\Yafray”

If you look at line 67 in the Python script, the programmer has shown an example of the format to follow for windows users (line 68 is for unix users).

This was a bit of a surprise to me, but it seems that for windows the path to the gram file is hardcoded in yafray as ‘c:/yafray’. However, it also looks at the current directory, so if you are rendering from Blender, try copying gram.yafray to the blender directory.

Thanks, eeshlo! Copying gram.yafray to the blender directory did the trick! So now I can raytrace directly from Blender! :smiley: