Yafaray4tS v0.9.0

LightWorks, VRay, Dribble, YafaRay and more..
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Testing in unpatched Rosetta
Sunday, August 19, 2018 RC-29v3

ToDo - Set ConsoleFrame's OwnedBy = {2C152F81-45A2-4035-8896-9E49D60C8A7A}

Invaild file name - Does not run ClearStatus. Add "Render aborted"
Invalid File extension - Does not run ClearStatus and creates zero byte file. Add "Render aborted"

Use Custom XML Export file's File Dialog does not allow you to save the CustomTemp.xml if it does not exist. Uses tS Open dialog. Needs to be a Save As dialog if possible.
Other possible fix not related to the above, would be add (Export XML button code):
Activity.Run("%THIS_NAME%" + "/VersionCheck");
Activity.Run("%THIS_NAME%" + "/ExportXML");
to the Render XML button?

"External Viewer only works with TGA format files. Render aborted." Works but does not run ClearStatus.

If Yaf_CamPath is empty and a node (not Camera) is selected works as expected but does not change the Output - Render File to -> View. Also the Yaf_CamPath default setup use to have Camera as the default.

Use Custom Temporary Directory (enabled) does not render to C:\Temp\



Note: Does not run ClearStatus
In testing the ClearAlert mentioned in the previous post, I notice that it does not work where noted above. Mostly it works on other ConsoleObject alerts. (Closes the ConsoleFrame in 10 seconds)
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 19 Aug 2018, 15:56 Yay! :D
Think there is a problem with the Render XML button.
At first it works but second attempts the ConsoleObject does not show and the ConsoleObject's htmlcode attribute is not Reset.
ConsoleObject Render XML.PNG

Steps
Open Render XML button.RsScn
Select the Render XML button and wait for 10 seconds until the ConsoleObject's Alert closes automatically. (See ClearAlert below)
Select the Render XML button several times and look at the YafaRay4tS/ConsoleObject


Also included in this scene is a ClearAlert that is similar to your ClearStatus.
Clear Alert in 10 seconds.PNG
Not fully tested with your new updates yet.
I commented out the con reset so you could see the above.
//Node.ConReset(Space.CurrentScene() + "/YafaRay4tS/ConsoleObject", "htmlcode")
I don't like the idea of closing a dialog automatically. It should be closed by the user after it has been read.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 19 Aug 2018, 18:46
trueBlue wrote: 19 Aug 2018, 15:56 Yay! :D
Think there is a problem with the Render XML button.
At first it works but second attempts the ConsoleObject does not show and the ConsoleObject's htmlcode attribute is not Reset.
ConsoleObject Render XML.PNG

Steps
Open Render XML button.RsScn
Select the Render XML button and wait for 10 seconds until the ConsoleObject's Alert closes automatically. (See ClearAlert below)
Select the Render XML button several times and look at the YafaRay4tS/ConsoleObject


Also included in this scene is a ClearAlert that is similar to your ClearStatus.
Clear Alert in 10 seconds.PNG
Not fully tested with your new updates yet.
I commented out the con reset so you could see the above.
//Node.ConReset(Space.CurrentScene() + "/YafaRay4tS/ConsoleObject", "htmlcode")
I don't like the idea of closing a dialog automatically. It should be closed by the user after it has been read.
Kinda figured you would say that. No problemo!
However for testing purposes I wonder whatever you do where it works you should do where it does not work.
Example where it does work is with the empty YafaRay path. So whatever you do there with your code, maybe do the same thing where it does not work. This all evolved from trying to figure out the Export XML issue.


Thinking ahead and NOT saying you should do this but it looks like you would be able to establish an YafaRay4ts User Preferences much like tS has.
ConsoleObject UI.PNG
ConsoleObject UI.PNG (7.26 KiB) Viewed 8096 times
Yaf user preferences.PNG
Yaf user preferences.PNG (9.29 KiB) Viewed 8096 times
Dialog settings could be on another YafaRay4tS aspect
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 19 Aug 2018, 18:53 ...
This all evolved from trying to figure out the Export XML issue.

...
And that issue is it doesn't work properly if run more than once? Are there any other factors like is the XML file valid or is the field blank?
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Yafaray4tS v0.9.0

Post by clintonman »

Some fixes for the Export XML and Render XML buttons.

Export XML Button:

Code: Select all

var Errors = Node.AccessFnSet("%THIS_NAME%" + '/ErrorsFnSet');
Errors.Clear();
Activity.Run("%THIS_NAME%" + "/VersionCheck");
Activity.Run("%THIS_NAME%" + "/ExportXML");
Render XML Button:

Code: Select all

var Errors = Node.AccessFnSet("%THIS_NAME%" + '/ErrorsFnSet');
Errors.Clear();
Activity.Run("%THIS_NAME%" + "/Render");
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 19 Aug 2018, 18:32 ...Also the Yaf_CamPath default setup use to have Camera as the default.

...
The default can be whatever you like.

Unpatched tS new scene default is "Camera1"
Patched tS new scene default is "Camera"
YafaRay scene file has "Camera"
loading Yafaray Camera from the toolbar gives "YafaRay Camera"
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Yafaray4tS v0.9.0

Post by clintonman »

YafaRay4tS node

fixed export xml button
fixed render xml button
added magic number to console frame owner attribute
Attachments
YafaRay4tS.RsObj
(875.09 KiB) Downloaded 271 times
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Using your code I think I found a way to delete the Yaf_render.cmd file by hooking up this script to the Render script.

Code: Select all

function StripPath(Str) {
	var pos = Str.lastIndexOf('\\');
	if (pos > 0)
		return Str.substring(0, pos + 1);
	return Str;
}

function Execute(params)
{
	var fso = new ActiveXObject("Scripting.FileSystemObject");
	var Yaf_TempDir = Node.Value(System.ThisOwner() + '/Render', 'Yaf_TempDir');
	var CMD_Filename = Yaf_TempDir + 'Yaf_render.cmd';

	if (fso.FileExists(CMD_Filename)) {
		fso.DeleteFile(CMD_Filename, true);
	}

	var Yaf_RenderFilename = Node.Value(System.ThisOwner() + '/Render', 'Yaf_RenderFilename');
	var Yaf_RenderPath = StripPath(Yaf_RenderFilename);
	var Yaf_RenderPath = Yaf_RenderPath + 'Yaf_render.cmd';

	if (fso.FileExists(Yaf_RenderPath)) {
		fso.DeleteFile(Yaf_RenderPath, true);
	}

}
Delete CMD file.PNG
Delete CMD file.PNG (22.02 KiB) Viewed 8083 times
Need to add a params.SetTerminationFlag() to the Render script and or anything else you think it might need.
Render script.PNG
Render script.PNG (6.53 KiB) Viewed 8081 times
Testing in unpatched Rosetta, it works so far except when rendering an animation. Not a big deal, my only goal was deleting the Yaf_render.cmd for when you wanted to render an image to the Desktop. Can not image a user rendering an animation to the Desktop.


Well that was short lived. Ugh!
Rendering an animation with empty string in the YafaRay Installation Path throws an error.
Render Animation test with an empty YafaRay Installation Path .PNG

Edit: Nope, this ERROR exist with or with out the Delete CMD script
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Testing in unpatched Rosetta

Monday, August 20, 2018 RC-29v4

ToDo
Add - Yaf_CamPath = "Camera" to ExportXML - OnDefaultValue
Add - "Camera" in the Yaf_CamPath to the YafaRay4tS.RsObj in the YafaRay4tS_Installer.RsObj
Add - Node.Value(Space.CurrentScene() + "/YafaRay4tS", "Yaf_CamChoice") = "0" (Line 190) in CameraFnSet
Note: (Line 76) does not work but the above does.

1.) This is not working:
"Use Custom temporary directory - Directory for storing generated XML file and temporary YafaRay output image. Default working directory is the same as the output image directory. Use this option if you want to use a different directory from the final image output directory."

2.) Is this working as expected?
"Use Custom XML export file - Use a custom filename and directory for the generated XML file. This is useful when generating multiple XML files for batch rendering or for rendering a previously generated XML file."

3.) Rendering an animation with empty string in the YafaRay Installation Path throws an error.
Render Animation test with an empty YafaRay Installation Path .PNG
4.) Output Render File with unsupported image format. Creates Yaf_render.cmd, yaf_temp.xml, and a file with zero bytes.
yaf_test bmp zero bytes.PNG
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 20 Aug 2018, 18:48 Testing in unpatched Rosetta

Monday, August 20, 2018 RC-29v4

ToDo
Add - Yaf_CamPath = "Camera" to ExportXML - OnDefaultValue
Add - "Camera" in the Yaf_CamPath to the YafaRay4tS.RsObj in the YafaRay4tS_Installer.RsObj
Add - Node.Value(Space.CurrentScene() + "/YafaRay4tS", "Yaf_CamChoice") = "0" (Line 190) in CameraFnSet
Note: (Line 76) does not work but the above does.

1.) This is not working:
"Use Custom temporary directory - Directory for storing generated XML file and temporary YafaRay output image. Default working directory is the same as the output image directory. Use this option if you want to use a different directory from the final image output directory."

2.) Is this working as expected?
"Use Custom XML export file - Use a custom filename and directory for the generated XML file. This is useful when generating multiple XML files for batch rendering or for rendering a previously generated XML file."

3.) Rendering an animation with empty string in the YafaRay Installation Path throws an error.
Render Animation test with an empty YafaRay Installation Path .PNG

4.) Output Render File with unsupported image format. Creates Yaf_render.cmd, yaf_temp.xml, and a file with zero bytes.yaf_test bmp zero bytes.PNG
4.) fixed
3.) fixed
2.) looks ok to me
1.) looks like it's working to me

camera default set to "Camera"

CameraFnSet behaving as it should - please define the behavior you want to change or describe how it should work
Attachments
YafaRay4tS.RsObj
(877.24 KiB) Downloaded 291 times
Clinton Reese

http://clintons3d.com
Post Reply