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 »

Whack a Mole? :o
At first, I added the button scripts to the Render to File attribute.
Goal was to disable all other viewers.
Then I thought that since the Internal Viewer needed to be enabled when using the Opt Dectector, I would do that one too.
The rest of the viewers was two fold, to keep the UI uniform and disable all other viewers.


FYI...Interesting observation this morning testing the SetTerminationFlag.
First as shown in Test 2, setting the script to -> if true -> SetTerminationFlag -> return, changes Control Out to 2
Test 3 script was setup to -> if false -> SetTerminationFlag -> return
With that script it does (as you say) not let a linked script run.
Other observation, it matters how you hook up the linked scripts.
If you hook up Test 2 first it runs first. If you hook Test 3 next it runs second. If you hook Test 1 next it runs third.
SetTerminationFlag changes Control Out to 2.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: 11 Aug 2018, 19:21 ...

FYI...Interesting observation this morning testing the SetTerminationFlag.
First as shown in Test 2, setting the script to -> if true -> SetTerminationFlag -> return, changes Control Out to 2
Test 3 script was setup to -> if false -> SetTerminationFlag -> return
With that script it does (as you say) not let a linked script run.
Other observation, it matters how you hook up the linked scripts.
If you hook up Test 2 first it runs first. If you hook Test 3 next it runs second. If you hook Test 1 next it runs third.
SetTerminationFlag changes Control Out to 2.PNG
Glad to see you're investigating the SetTerminationFlag.

Would have been nice if connected scripts ran in parallel.

I found a couple of other useful methods attached to the params.
params.GetControlIn() gets the name of the control input that runs the script, so can have several input controls and make code decisions based on which input was used
params.SetControlOut(str) does the opposite and lets you choose which output control will fire off
ControlInOut.jpg

Code: Select all

function Execute(params)
{
	var controlIn1 = params.ConValue('controlIn1');
	var controlIn2 = params.ConValue('controlIn2');

	var scriptFrom = params.GetControlIn();

	System.Trace(scriptFrom);

	if(scriptFrom == "controlIn2")
		params.SetControlOut("ControlOut2")
	else
		params.SetControlOut("ControlOut1")

	// params.ConValue("controlOut1") = ...
	// params.ConValue("ControlOut2") = ...
}
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 »

This may be the same thing but you can create your own Control Outputs checking Control flow
Attachments
Control Flow.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: 11 Aug 2018, 22:01 This may be the same thing but you can create your own Control Outputs checking Control flow
Yep, same thing.
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 »

bug
line 127 ExportXMLFnSet
"+ XMLFile" should be "+ File"

Code: Select all

System.Trace("ExportXMLFnSet Error: XML_file does not exist!" + File);
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 »

NonBlockingErrors.jpg
Got working version of error display that does not block the render display.

Errors shown in image shows reverse animation range, blank texture map, no blend material collection and invalid camera selection.
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 »

Oh cool!
I was working on the same thing.
I hit a brick wall on how to send the message from script.
The Edit Control does not have Word Wrap.
It does have Multiple lines.
I do not know how to use a Carriage Return in the string, like you can in an Alert string. /n
Capture.PNG
Looks like you went a different route,
Are you creating and displaying an html file from the Console messages?
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: 13 Aug 2018, 13:17 Oh cool!
I was working on the same thing.
I hit a brick wall on how to send the message from script.
The Edit Control does not have Word Wrap.
It does have Multiple lines.
I do not know how to use a Carriage Return in the string, like you can in an Alert string. /n
Capture.PNG

Looks like you went a different route,
Are you creating and displaying an html file from the Console messages?
Yes, uses html code embedded in a string and the errors function set controls the error messages and panel display.
I don't know if it works but you can try /r/n for the carriage return.
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 »

Got an idea from one of Marcel's material for the YafaRay Materials
Instead of switching the user interface he just selects the panel.
Please try and see if you like it.

YafaRay Materials library
Changed all material's OpenMap.RsObj

OpenMap.RsObj
Changed to Node.Select/Unselect
//UserInterface.OpenToolPanelViewEx2("" , "" ,owner + "/" + MapAttribute, 3,true,false);
Node.Select(owner + "/" + MapAttribute);Space.Unselect()

SwitchImage.RsObj
Changed to Node.Select/Unselect
//UserInterface.OpenToolPanelViewEx2("" , "" ,owner + "/Cloud", 3,true,false);
Node.Select(owner + "/Cloud");Space.Unselect()
etc...

Map.RsObj
SwitchImage.RsObj

Changed to Node.Select/Unselect
//UserInterface.OpenToolPanelViewEx2("" , "" ,owner + "/Cloud", 3,true,false);
Node.Select(owner + "/Cloud");Space.Unselect()
etc...

Blend Material Collection
Changed the Spheres to new YafaRay Shiny_Diffuse material

YafaRay Blend
SwitchDiffuseImage.RsObj

Changed to Node.Select/Unselect
//UserInterface.OpenToolPanelViewEx2("" , "" ,owner + "/DiffuseCloud", 3,true,true);
Node.Select(owner + "/DiffuseCloud");Space.Unselect()
etc...

Previous way
New_Switch.PNG
New_Switch.PNG (68.3 KiB) Viewed 4171 times
New way
The attachment New_Switch.PNG is no longer available
Attachments
Old_Switch.PNG
Old_Switch.PNG (61.78 KiB) Viewed 4171 times
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 »

Testing Rc28:

testing on standalone unpatched + optdetector
install failed with error after answering the question dialog - fix: change model status code back to original

Edit: animation rendering causing errors - fix: change ShowDisplayFnSet back to RC27 version

will need to replace all nodes where status line was changed, guess change must only work in patched tS versions

Edit: List of replacements
ShowDisplayFnSet
update Opti display
YafarayXMLFileFnSet
RenderFnSet
SaveSettings
Render
ExportXML

remove Node.ConRemove("/Status Line", "YafaRay4tS"); from ExportXMLFnSet
Clinton Reese

http://clintons3d.com
Post Reply