Yafaray4tS v0.9.0
Re: Yafaray4tS v0.9.0
Whack a Mole?
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.
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.
- 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
Glad to see you're investigating the SetTerminationFlag.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
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
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") = ...
}
Re: Yafaray4tS v0.9.0
This may be the same thing but you can create your own Control Outputs checking Control flow
- 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
Yep, same thing.
- 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
bug
line 127 ExportXMLFnSet
"+ XMLFile" should be "+ File"
line 127 ExportXMLFnSet
"+ XMLFile" should be "+ File"
Code: Select all
System.Trace("ExportXMLFnSet Error: XML_file does not exist!" + File);
- 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
Errors shown in image shows reverse animation range, blank texture map, no blend material collection and invalid camera selection.
Re: Yafaray4tS v0.9.0
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 Looks like you went a different route,
Are you creating and displaying an html file from the Console messages?
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 Looks like you went a different route,
Are you creating and displaying an html file from the Console messages?
- 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
Yes, uses html code embedded in a string and the errors function set controls the error messages and panel display.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?
I don't know if it works but you can try /r/n for the carriage return.
Re: Yafaray4tS v0.9.0
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 way
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 way
- Attachments
-
- Old_Switch.PNG (61.78 KiB) Viewed 4171 times
- 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
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
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