Yafaray4tS v0.9.0

LightWorks, VRay, Dribble, YafaRay and more..
User avatar
clintonman
Captain
Posts: 5429
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: 10 Aug 2018, 20:57
clintonman wrote: 10 Aug 2018, 20:34
trueBlue wrote: 10 Aug 2018, 20:33 Whoever downloaded YafaRay4tSv090-RC-26
There was a mistake!
Fixed and re uploaded in the previous post.
Cross post! :) That was me.
There is still a mistake, I need to update to the newest installer. I will fix it and re upload it
Edit: It's fixed
Also added an Alert.
Yafaray Settings LMB Command.RsObj
Add :
Space.LoadScene(System.GetMainDir() + "/Rs Main Libraries/YafaRay4tS Setup/YafaRay4tS.RsScn")
System.Alert("Right click to change to YafaRay4tS")

Edit2: If your last download installer shows the Setup aspect after installation and you have the Alert then it is the same.
Too late, I already did a bunch of tests and changes.

Replaced the installer nodes with the new ones.
added SetTermination Code to the Yaf scene Utilities
cleanup non functioning code

I'm not going to download it a 3rd time, you can have control back when I'm finished with the changes I already started.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 10 Aug 2018, 21:42
trueBlue wrote: 10 Aug 2018, 20:57
clintonman wrote: 10 Aug 2018, 20:34
Cross post! :) That was me.
There is still a mistake, I need to update to the newest installer. I will fix it and re upload it
Edit: It's fixed
Also added an Alert.
Yafaray Settings LMB Command.RsObj
Add :
Space.LoadScene(System.GetMainDir() + "/Rs Main Libraries/YafaRay4tS Setup/YafaRay4tS.RsScn")
System.Alert("Right click to change to YafaRay4tS")

Edit2: If your last download installer shows the Setup aspect after installation and you have the Alert then it is the same.
Too late, I already did a bunch of tests and changes.

Replaced the installer nodes with the new ones.
added SetTermination Code to the Yaf scene Utilities
cleanup non functioning code

I'm not going to download it a 3rd time, you can have control back when I'm finished with the changes I already started.
Understand. :)
If you can with your utility script, capture, select and set the old Camera and transfer to the new YafaRay4tS node, that would be awesome. Noticed with your demo scenes it being an issue.
User avatar
clintonman
Captain
Posts: 5429
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: 10 Aug 2018, 08:16 ...
You know best. I just hate nagging window messages. :)
Have you thought about using the Status line, instead of the Alerts?

...
I hear you, maybe in a future version that's been rewritten from the ground up can add truespace style options to not show various error messages(checkbox with, "Do not show this message again") and a preferences section to turn it on again.

Errors can take up several lines that would not fit well in the status line. Also the need to clear the status line makes it less than ideal.

I've reached a stopping point where I can send the changes back to you. Will upload RC27 soon.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5429
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 »

RC27 Changes
The big change is the new installer
clintonman wrote: 09 Aug 2018, 04:32 New Installer:

Checks for prerequisites earlier
Removed most of the Activity.Run statements - makes it difficult to run things in order
Uses the newly discovered params.SetTerminationFlag()

Install YafaRay4tSv0.9.0 node is now directly connected to the Integrated Button Install node
Removed YafaRay4tS scene loading - prevents the change to the Setup tab during installation
...
Process Imported Scene on the Yaf Scene Utilities - added SetTerminationFlag to stop execution
cleaned out non-functional camera code
cleaned unused connectors and code from the Update Yafaray Material

OK it's all yours.
Attachments
YafaRay4tSv090-RC-27.zip
(14.74 MiB) Downloaded 222 times
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

YafaRay4tS Scene Utilities

Noticed that you did not use the SetTermimanationFlag (s)
on the other Update YafaRay Render Node.RsObj and the other scripts where your plugin is required.
I made those changes and is included here:
YafaRay4tS Scene Utilities.RsObj
Let me know if this works for you.
User avatar
clintonman
Captain
Posts: 5429
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: 11 Aug 2018, 02:25 YafaRay4tS Scene Utilities

Noticed that you did not use the SetTermimanationFlag (s)
on the other Update YafaRay Render Node.RsObj and the other scripts where your plugin is required.
I made those changes and is included here:
YafaRay4tS Scene Utilities.RsObj
Let me know if this works for you.
My understanding is that it is only needed in the one place because of the command link between the 2 nodes.
From an earlier post, " Experiment shows it stops the trailing scripts from running."
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

The changes I made and was talking about were to different scripts that are not chained together.


Again, I am not so sure that your are entirely correct.

I believe that you setup this SetTreminationFlag at the beginning of a block of if statements with a return

Code: Select all

	// check if new object selection has been made and if it is object with matrix
	currentSelected = Node.FirstSelected(); 
	if ((lastSelected == currentSelected) || (currentSelected == "") || !Node.ConExists(currentSelected, 'ObjMatrix')) 
	{
		params.SetTerminationFlag(); 
		return; //--> 
	}

	// check replacement object
	if (replacName == "") {
		System.Alert("No replacement object selected !");
		return; //-->
	}
	if (!Node.Exists(replacName)) {
		System.Alert("Invalid replacement object selected !");
		return; //-->
	}
	if (!Node.ConExists(replacName, 'ObjMatrix')) {
		System.Alert("Replacement object does't have transform matrix attribute!");
		return; //-->
	}
If any of the if statements are incorrect then the script stops here.
If correct then from here you can process any of the above attributes.

Code: Select all

	// get target matrix 
	matrixT = Node.Value(currentSelected, 'ObjMatrix')

	// get replacement matrix 
	matrixR = Node.Value(replacName, 'ObjMatrix')

	// copy object 
	pureCurrName = Node.ShortName(currentSelected); 
	Node.Delete(currentSelected); 
	newName = Node.Copy(replacName, Space.CurrentScene());
	Node.Rename(newName, pureCurrName); 

	// update target matrix
	if (!keepOrient)
	{
		matrixT.SetRoll(matrixR.GetRoll()); 
		matrixT.SetYaw(matrixR.GetYaw()); 
		matrixT.SetPitch(matrixR.GetPitch()); 
	}
	if (!keepScale)
	{
		matrixT.SetScaleX(matrixR.GetScaleX()); 
		matrixT.SetScaleY(matrixR.GetScaleY()); 
		matrixT.SetScaleZ(matrixR.GetScaleZ()); 
	}
	Node.Value(currentSelected, 'Matrix') = matrixT; 

	params.Param("lastSelectedObject") = currentSelected;
My thought is, if you have more code from here in the same script with different attributes, you would need to setup another SetTreminationFlag with a return, etc..
This would include separate functions as well.
User avatar
clintonman
Captain
Posts: 5429
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 »

"after" never prints, the return ends the script
placing params.SetTerminationFlag(); before the return doesn't change the fact that the return statement ends a function execution

Code: Select all

// Execute 
// Called to execute the command 
function Execute(params)
{
	System.Trace("before");
	if(true) {
		return;
	}
	System.Trace("after")
}
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Gotcha! :)
Gonna test this further to see if I can find out it's use and how to use it properly.


Will you test this scene and let me know what you think?
Modified YafaRay4tS.RsObj
New Viewer buttons
New RTF.PNG
New RTF.PNG (10.97 KiB) Viewed 4135 times
New Render to File
The attachment New RTF.PNG is no longer available
Things to try:
The new viewer button's scripts
Render to File button scripts
Note: You can still use the viewer Check Boxes if you wanted to enable a viewer along with the Render to File.
Attachments
New Viewer buttons.PNG
New Viewer buttons.PNG (4.31 KiB) Viewed 4135 times
User avatar
clintonman
Captain
Posts: 5429
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 »

Changing user preferences on the popup panel without any visible feedback is unacceptable and doesn't respect user choices. The only setup button I like is the optdetector activating the internal render. The other buttons are like playing whack a mole.

If you like the buttons keep them, but get rid of the popup panel change.
Clinton Reese

http://clintons3d.com
Post Reply