Yafaray4tS v0.9.0

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 09 Aug 2018, 02:48
trueBlue wrote: 08 Aug 2018, 21:52 ...

Testing your new Camera modifications.
Looks like all of the old attributes in the Cam Name script are no longer needed.
As a TEST, I selected a Yafaray Camera and pressed the Set Camera button.
Works and renders as expected.
I rename the Yafaray Camera to Camera without setting it up in the UI.
I get the Errors Found message and it renders the scene. <- The message is misleading with regards invalid selection in this scenario.
...
What is the Errors Found message?
If the camera in the YafaRay4tS node is invalid it will give a message and then search the scene for a camera and use it. If it finds no camera at all it uses the 3D view and if it still fails it gives some other error and probably fails to render.
Again this is just a slightly different TEST
Set Camera is not set in the Camera aspect (Empty String) and Camera is set to Render
YafaRay Camera exist in scene
As you can see Open View is called as well as the Errors Add
Notice also that the Render is complete in the Status line but the Rendered image is not shown.
Console shows that XML file is open for writing etc.. AFTER the Render is completed
Capture.PNG
It works much better if you eliminate the Errors Add
And in the case of no camera in the scene, switch to View

Code: Select all

				Yaf_CamPath = FindSceneCamera(scene);
				if(Yaf_CamPath != "") {
//tB
System.Trace("Camera not Set...");System.Trace("Found Camera in scene " + Yaf_CamPath)
//Errors.Add("Selected camera is not valid, using a scene camera instead.");

				CamMatrix = Node.Value(Yaf_CamPath, "WldMatrix");
				PerspectiveCheck = Node.Value(Yaf_CamPath + "/Camera", "Perspective");
				CamFOV = Node.Value(Yaf_CamPath + "/Camera", "FOV");
				} else {
				//System.Alert("Could not find camera.  Please choose a camera in the scene.")
				if(!d3dviewOpen) {
					System.Alert('CameraFnSet: ERROR - No 3D View window found!');
					return;
				}
				CamMatrix = Node.Value("/D3DView/" + EyeCam, "WldMatrix");
				PerspectiveCheck = Node.Value("/D3DView/" + EyeCam, "Perspective");
				CamFOV = Node.Value("/D3DView/" + EyeCam, "FOV");
//tB
//Errors.Add("No camera selected, using the active 3d view instead.");
System.Trace("Camera not Set...");System.Trace("Camera does not exist...");System.Trace("Switch to View");
Node.Value(System.ThisOwner(), 'Yaf_CamChoice') = 0;
Not sure what to say about the Open View and Render completed before the XML file is created. But it does seem to be reversed.


Also the Render Object would work better (in my opinion) if there was no Alert, if nothing was selected or an invalid selection. That's the way Vray works. If you do not select an object with a mesh it does not render.
In the Default/Render Mode, after using the experimental mode, both Radio Buttons are disabled. So you do not know which mode you are using.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

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

I don't know any way around the "don't load a scene" if you want to be able to save the setup. maybe it could be a button on the panel to load the scene after installation is done
Edit: - or maybe you can somehow make the YafaRay4tS scene show the setup panel when it loads

Nothing else has changed, only the installer code has changed all else is still rc25 code
Attachments
YafaRay4tS_Installer.RsObj
(1.13 MiB) Downloaded 267 times
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 08 Aug 2018, 21:52 ...

Installer does not show YafaRay4tS Setup. Could be because I had Vray loaded.

...
I saw that too with no vray installed. I'll see if I can find it before your next rc release.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 08 Aug 2018, 21:52 ...

Testing your new Camera modifications.
Looks like all of the old attributes in the Cam Name script are no longer needed.
As a TEST, I selected a Yafaray Camera and pressed the Set Camera button.
Works and renders as expected.
I rename the Yafaray Camera to Camera without setting it up in the UI.
I get the Errors Found message and it renders the scene. <- The message is misleading with regards invalid selection in this scenario.
...
What is the Errors Found message?
If the camera in the YafaRay4tS node is invalid it will give a message and then search the scene for a camera and use it. If it finds no camera at all it uses the 3D view and if it still fails it gives some other error and probably fails to render.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 08 Aug 2018, 21:52 ...
Not so sure your theory is correct about stopping connected scripts. If you look at that script in the Interactive Replace Tool at the bottom there is params.Param("lastSelectedObject") in with which lastSelectedObject is an Output. Seems to me that if the script ran without errors then there would be success verses failure at the Termination Flag. If there was success then and only then would a chained script fire. Nevertheless this is all an assumption on my part.
...
I don't think the params.SetTerminationFlag(); does anything in that script. It still works if the line isn't there. My guess is either the SetTerminationFlag behavior changed after he wrote the script or the script was used with some down stream functionality that was removed.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 08 Aug 2018, 21:52 ...
If the params.SetTerminationFlag() stops the downstream connected scripts from running, why did you get an error?
...
Without the fix:
1. new scene - so no YafaRay4tS node
2. run and get message "Scene does not contain a YafaRay4tS node" then get an error on line 19 of Process Textures
line 19 of Process Textures error because trying to read value from non-existent YafaRay4tS node

Code: Select all

var filename = Node.Value(Space.CurrentScene() + "/YafaRay4tS", "Yaf_BkgImage");
With fix only get the message "Scene does not contain a YafaRay4tS node".
Process Textures never runs so don't get the error
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Okay I get the reboot tS and PC, makes a lot of sense. :)
Sincere apology for the wasted hours!!!

Not sure I am following your test. I misled you in my post. I used the modified code in the other Update YafaRay Render Node.RsObj to test.
"I get an error" - The error comes from the Process Textures script which is inline after the Update YafaRay Render Node2
The params.SetTerminationFlag() seems to stop downstream connected scripts from running - super useful!
If the params.SetTerminationFlag() stops the downstream connected scripts from running, why did you get an error?
Not so sure your theory is correct about stopping connected scripts. If you look at that script in the Interactive Replace Tool at the bottom there is params.Param("lastSelectedObject") in with which lastSelectedObject is an Output. Seems to me that if the script ran without errors then there would be success verses failure at the Termination Flag. If there was success then and only then would a chained script fire. Nevertheless this is all an assumption on my part.
You know best, so whatever works correctly, works for me. Let me know how to use it properly.

Testing your new Camera modifications.
Looks like all of the old attributes in the Cam Name script are no longer needed.
As a TEST, I selected a Yafaray Camera and pressed the Set Camera button.
Works and renders as expected.
I rename the Yafaray Camera to Camera without setting it up in the UI.
I get the Errors Found message and it renders the scene. <- The message is misleading with regards invalid selection in this scenario.
All is good except you are not setting the Output - Render File to View.
Thinking this might be a problem with imported scenes too if you do not make the switch!!!

Also made some changes for a future RC-26 candidate:
RC-26
Replaced YafaRay4tS.RsScn

YafarayScripts
Changed Intergrated Buttons to version to 5
Changed Console and Alert messages
Object Render (experimental mode) Added (HideALL/Show Selected) and (ShowALL after render)

Installer does not show YafaRay4tS Setup. Could be because I had Vray loaded.

YafaRay4tS Setup library - Fixed D3D Preview Background objects icons and descriptions

YafaRay4tS Scene Utilities.RsObj
Add - WindowsManager.ActivateFrame(1); to the Browse button
Add - try/catch code from the Camera script to Lights, Update YafaRay Render Node2, and Update YafaRay Render Node2 scripts

Code: Select all

	try {
		utilitydata = System.CreateDO("Clintons3D Package/Utility functions");
	} catch(err) {
		System.Alert("Requires Clintons3dPlugin.rsx plugin");
		return;
	}
	currentnode = Source;
	thedata = utilitydata.GetConnectorData(currentnode);
	connectors = thedata.split("\n");
	for(var i=0;i<connectors.length;i++) {

		connector = connectors[i].split("\t");

		if(connector[3] & CONFLG_IN && !(connector[3] & CONFLG_HIDDEN)) {
			if(Node.ConExists(Destination, connector[0])) {
				if(connector[0] == "Yaf_Path") {
					continue;
				} else {
					Node.Value(Destination, connector[0]) = Node.Value(Source, connector[0]);
					System.Trace(connector[0]);
				}
			}
		}
	}
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 08 Aug 2018, 20:48 ...
My thought is that the SetTerminationFlag is an Important/Mandatory part of the script that actualy kills the process.
Close - see the previous cross post. Experiment shows it stops the trailing scripts from running.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 08 Aug 2018, 01:34 YafaRay4tS Scene Utilities
Steps
Remove YafaRay4tS from scene
Select the Process Imported Scene button
Alert "Scene does not contain a YafaRay4tS node"
I get an error.

Update YafaRay Render Node2 script:
First I tried incorporating a try/catch/error
That did not work

I think, I found a solution to this problem that I found in the Interactive Replace Tool.RsObj in the Activities - My Activities library.
Author sets a params.SetTerminationFlag();

Fix:
...

I tried the above immediately after getting an error and so far it is working.
The params.SetTerminationFlag(); and the try/catch/error is need in both blocks of code.
I tested with and without and both are needed.
Your thoughts?
SetTerminationFlag.jpg
Here is what I found.
The try catches don't do anything and I don't know why it made a difference for you. Makes me think you need to restart the computer before testing further. Truespace will keep thinks in memory and mess you up, I've lost hours because of that in the past. If it misbehaves for no reason - restart.
"I get an error" - The error comes from the Process Textures script which is inline after the Update YafaRay Render Node2
The params.SetTerminationFlag() seems to stop downstream connected scripts from running - super useful! :bananathumb:
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Agreed I have not been a very good beta tester, still learning.
My thought is that the SetTerminationFlag is an Important/Mandatory part of the script that actualy kills the process.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

Well I guess the bottom line is that only specific, repeatable errors can be fixed. If I have errors and you never see them you'll have a hard time trying to fix them. One of the errors you had I never saw until after you shared a scene file, the kitchen scene which was included with all those other scenes. That one would still be giving errors if you hadn't shared the scene. Gotta have samples and steps to recreate errors, otherwise it's hit and miss.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Broad meaning if statements that are not being honored or throw errors. Like empty string errors.
Also several different instances where the error stops the execution of the script.
Looking back at the pics of the errors posted the common one are where the Exporting XML file is being stopped.
Or the access YafarayXMLFileFnSet which gives you no clue. This is with old scenes and new scenes.

Again I am not saying that my code is correct.
Just a test or experiment if you will.
And yes I deliberately removed the YafaRay4tS node from the scene and renamed the YafaRay Folder to test it.
If an if statement has a break and it does not stop or handle the error and or allows the script to continue, there is something wrong with that if statement.

I have been searching for a definition of the SetTerminationFlag() but so far no go.
Here is another definition of Throw and Try to Catch Errors

The try statement lets you test a block of code for errors.
The catch statement lets you handle the error.
The throw statement lets you create custom errors.
The finally statement lets you execute code, after try and catch, regardless of the result.

https://www.w3schools.com/js/js_errors.asp
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 08 Aug 2018, 16:44
clintonman wrote: 08 Aug 2018, 02:50
trueBlue wrote: 08 Aug 2018, 01:34 YafaRay4tS Scene Utilities
Steps
Remove YafaRay4tS from scene
Select the Process Imported Scene button
Alert "Scene does not contain a YafaRay4tS node"
I get an error.
...
I have now idea where you're going with this. The code is written to update a scene that has a yafaray4ts node. It's like running it on a vray scene then declaring it doesn't work? :? 100% lost here.
Wow, this is a bubble buster! :(
I asked you a few months back how I could help you test your project.
Your reply was to use it and try and break it.
I have reported this broad issue to your several times and it is a pretty big deal if you do not know how to recoup from it.
You recently confirmed you were able to confirm this issue with the scene that I shared with you and supplied a fix in your Integrated Offline Render icons.

Yesterday I reported that it was not entirely fixed but there was indeed a workaround.

I was pretty stoked finding and sharing, what looks like, a solid fix and perhaps a better way to write if statements.!

I am pretty sure that the author of that script is Vladimir, who was one of the longest core developers of trueSpace and the iOptDetectors plugin.
That script is pretty simple and he uses the params.SetTerminationFlag() at the beginning of his if statements.
To be honest with you, I do not know what it does or how it works. I was hoping you had a better understanding of its use.

So to answer your question, I was simply sharing that script with you and hoping that it helps.
As always I respect your expertise and look for your approval! :)
Fair enough. I just don't see the use case where someone would delete the node and then try to convert data from the missing node. It's like if the user went into the link editor and removed some of the nodes in YafaRay4tS Scene Utilities, that would break it too. What specifically is the broad issue you are referring to that you've been talking about? and you are saying that the params.SetTerminationFlag() may fix it?
params.SetTerminationFlag(); is an interesting find along with all the other params dot functions. I have no idea what they do. Here's the confusion in the code you provided:

Code: Select all

try {
   tryStatements}
catch(exception){
   catchStatements}
finally {
   finallyStatements}
 
from the docs
tryStatements
Required. Statements where an error can occur.
exception
Required. Any variable name. The initial value of exception is the value of the thrown error.
catchStatements
Optional. Statements to handle errors occurring in the associated tryStatements.
finallyStatements
Optional. Statements that are unconditionally executed after all other error processing has occurred.

The code that can break goes into the try section, your sample has nothing in the try so the catch will never do anything unless that params.SetTerminationFlag is doing something magical.

I'll add your changes and test it. It may be a case of truespace holding something in memory again where you making a coding change and the old values are still having an effect.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 08 Aug 2018, 02:50
trueBlue wrote: 08 Aug 2018, 01:34 YafaRay4tS Scene Utilities
Steps
Remove YafaRay4tS from scene
Select the Process Imported Scene button
Alert "Scene does not contain a YafaRay4tS node"
I get an error.
...
I have now idea where you're going with this. The code is written to update a scene that has a yafaray4ts node. It's like running it on a vray scene then declaring it doesn't work? :? 100% lost here.
Wow, this is a bubble buster! :(
I asked you a few months back how I could help you test your project.
Your reply was to use it and try and break it.
I have reported this broad issue to your several times and it is a pretty big deal if you do not know how to recoup from it.
You recently confirmed you were able to confirm this issue with the scene that I shared with you and supplied a fix in your Integrated Offline Render icons.

Yesterday I reported that it was not entirely fixed but there was indeed a workaround.

I was pretty stoked finding and sharing, what looks like, a solid fix and perhaps a better way to write if statements.!

I am pretty sure that the author of that script is Vladimir, who was one of the longest core developers of trueSpace and the iOptDetectors plugin.
That script is pretty simple and he uses the params.SetTerminationFlag() at the beginning of his if statements.
To be honest with you, I do not know what it does or how it works. I was hoping you had a better understanding of its use.

So to answer your question, I was simply sharing that script with you and hoping that it helps.
As always I respect your expertise and look for your approval! :)
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 08 Aug 2018, 01:34 YafaRay4tS Scene Utilities
Steps
Remove YafaRay4tS from scene
Select the Process Imported Scene button
Alert "Scene does not contain a YafaRay4tS node"
I get an error.
...
I have now idea where you're going with this. The code is written to update a scene that has a yafaray4ts node. It's like running it on a vray scene then declaring it doesn't work? :? 100% lost here.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5548
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
Steps
Remove YafaRay4tS from scene
Select the Process Imported Scene button
Alert "Scene does not contain a YafaRay4tS node"
I get an error.

Update YafaRay Render Node2 script:
First I tried incorporating a try/catch/error
That did not work

I think, I found a solution to this problem that I found in the Interactive Replace Tool.RsObj in the Activities - My Activities library.
Author sets a params.SetTerminationFlag();

Fix:

Code: Select all

	var template = "Yafaray Folder/YafaRay4tS";
	var Source = Space.CurrentScene() + "/YafaRay4tS";

	if(!Node.Exists(Source)) {
		System.Alert("Scene does not contain a YafaRay4tS node");
		params.SetTerminationFlag(); 
		return;
	}
	try {
//
	} catch(e) {
		System.Alert("Scene does not contain a YafaRay4tS node");
		return;
	}

	if(!Node.Exists(template)) {
		System.Alert("Error: YafaRay4tS does not seem to be installed");
		params.SetTerminationFlag(); 
		return;
	}
	try {
//
	} catch(e) {
		System.Alert("Error: YafaRay4tS does not seem to be installed");
		return;
	}
I tried the above immediately after getting an error and so far it is working.
The params.SetTerminationFlag(); and the try/catch/error is need in both blocks of code.
I tested with and without and both are needed.
Your thoughts?
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

RC 25

bug - the YafaRay4tS scene file in the YafaRay4tS Setup library is wrong
Attachments
YafaRay4tSv090-RC-25.zip
(14.92 MiB) Downloaded 209 times
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 07 Aug 2018, 19:59 More changes:

YafaRay4tS
changed the way the camera works and removed the code from the choose camera button.
added error processing to the camera.
added camera selection to the render to file panel
during render if camera is invalid will search for cameras at the top scene level and also inside of groups while ignoring cameras inside of lights

YafaRay4tS Scene Utilities
added copy for YafaRay4tS camera
re-added the missing script

Awesome!
Glad to see you changed how the Select Camera works.
I have noticed several times using the Choose Texture Source Folder buttton that the dialog is not showing.
I addded WindowsManager.ActivateFrame(1); to that button.

Do you mind sharing your updated YafaRaytS.RsObj and YafaRay4tS Scene UtilitiesRsObj ???
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 07 Aug 2018, 19:49
trueBlue wrote: 07 Aug 2018, 04:16 Oh cool!
I think we cross post or did you notice:
Also added the YafaaRay Light Material to you materialtoload list but it does not work
Also I made a mistake by deleting the Update YafaRay Render Node.RsObj in the YafaRay4tS Scene Utilities.RsObj that I shared with you in that scene.
That script by the way does not copy the selected Camera from the old YafaRay4tS,RsObj and tranfer it to the new one.
That looks like a tough task given the differences of the Select Camera buttons scripts. Yikes!


Edit:
If FolderForFiles is empty the Alerts do not work and I also notice an error.
Steps:
Select the Browse button and the Cancel button = empty string in FolderForFiles
Select the Process Imported Scene button
Error:
Capture.PNG
That error has nothing to do with FolderForFiles and I went through your steps and it behaved properly. If you share the problem scene I can look at it.
I tested my steps again and I get that error.
I updated the YafarayScripts/OpenView with your code.
I selected the Offline Render Scene icon.
I tested my steps again and it works without errors.


I am guessing when YafaRay4tS adds an error, you should take a break and Render something ;)
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

More changes:

YafaRay4tS
changed the way the camera works and removed the code from the choose camera button.
added error processing to the camera.
added camera selection to the render to file panel
during render if camera is invalid will search for cameras at the top scene level and also inside of groups while ignoring cameras inside of lights

YafaRay4tS Scene Utilities
added copy for YafaRay4tS camera
re-added the missing script
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 07 Aug 2018, 04:16 Oh cool!
I think we cross post or did you notice:
Also added the YafaaRay Light Material to you materialtoload list but it does not work
Also I made a mistake by deleting the Update YafaRay Render Node.RsObj in the YafaRay4tS Scene Utilities.RsObj that I shared with you in that scene.
That script by the way does not copy the selected Camera from the old YafaRay4tS,RsObj and tranfer it to the new one.
That looks like a tough task given the differences of the Select Camera buttons scripts. Yikes!


Edit:
If FolderForFiles is empty the Alerts do not work and I also notice an error.
Steps:
Select the Browse button and the Cancel button = empty string in FolderForFiles
Select the Process Imported Scene button
Error:
Capture.PNG
That error has nothing to do with FolderForFiles and I went through your steps and it behaved properly. If you share the problem scene I can look at it.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5548
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 think we cross post or did you notice:
Also added the YafaaRay Light Material to you materialtoload list but it does not work
Also I made a mistake by deleting the Update YafaRay Render Node.RsObj in the YafaRay4tS Scene Utilities.RsObj that I shared with you in that scene.
That script by the way does not copy the selected Camera from the old YafaRay4tS,RsObj and tranfer it to the new one.
That looks like a tough task given the differences of the Select Camera buttons scripts. Yikes!


Edit:
If FolderForFiles is empty the Alerts do not work and I also notice an error.
Steps:
Select the Browse button and the Cancel button = empty string in FolderForFiles
Select the Process Imported Scene button
Error:
Capture.PNG
Capture.PNG (11.17 KiB) Viewed 4668 times
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

Your code works. It was just tS being finicky. The OwnerMatrix for the camera is in some kind of unstable state. You can recreate it on any object by right click to expand the connector then delete the ExpandIn node. The fact that you don't disconnect first makes the connector value invalid/unstable.
Added a try catch to get around it.

Edit: Come to think of it maybe should add try catch for all cases where connector values are copied.
Attachments
YafaRay4tS Scene Utilities0e4e.RsObj
(121.09 KiB) Downloaded 234 times
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Yahoooooo!
Sure glad you found it!

Here is Jack's Test Scene.
Camera1 is an original tS Camera.
All materials are old unconverted materials
Added new YafaRay4tS panel
Added an Unofficial Update 4 Camera
Added an Yafaray Camera
Added your YafaRay4tS Scene Utilities with a Update Cameras button and script
Also added the YafaaRay Light Material to you materialtoload list but it does not work.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 06 Aug 2018, 17:04 Copying your ConvertLights script, I made a ConvertCameras script, just as a learning experience to see if I could do it.
NOT... :oops:
Problem:
I get an error ...
If you share a problem scene along with the script I'll take a look at it.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 06 Aug 2018, 02:18 ...

Edit: In the Popup Panel - Script, you will need to change the delete lines to:
Node.Delete(Space.CurrentScene() + "/YafaRay4tS Scene Utilities, 1")
Rename the Cancel button to Close.


Just out of curiosity, I notice that you are using ScriptObject verses Activity.Run

I thought you mentioned that there was a problem using ScriptObject
Or was that just with the reset.js file?
Renamed the Cancel button to Close
Delete set node as YafaRay4tS Scene Utilities...

It was just the external js file. My understanding is that the Activity.Run runs after the script that contains it is done and ScriptObject stops the containing script while it runs.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

Fix for native render button used without the render to file dialog:
BTW the only reason I was able to find it was because of the maxkuchnia scene file that you posted. I mostly use the render to file dialog and since the problem is in a setup process I wouldn't even see it if I switched to no render to file option cause the setup would have already been set once.

Scripts/CustomCommands/YafarayScripts/OpenView

Code: Select all

// Execute 
// Called to execute the command 
function Execute(params)
{
	var szViewName = params.ConValue('szViewName');
	var dwWidth = params.ConValue('dwWidth');
	var dwHeight = params.ConValue('dwHeight');

	System.Trace("open view");

	var yafNode = Space.CurrentScene() + "/YafaRay4tS";

	if(!Node.Exists(yafNode))
		return;

	var Errors = Node.AccessFnSet(yafNode + '/ErrorsFnSet');
	Errors.Clear();

	var useExternal = Node.Value(yafNode, "Yaf_UseExternalViewer");
	var Yaf_RenderFilename = Node.Value(yafNode, "Yaf_RenderFilename");

	var fso = new ActiveXObject("Scripting.FileSystemObject");
	var fileExt = fso.GetExtensionName(Yaf_RenderFilename);

	if(useExternal && fileExt.toLowerCase() != "tga") {
		Errors.Add("External viewer only works with TGA files. Render will abort.");
	}

	var useInternal = Node.Value(yafNode, "Yaf_UseInternalViewer");
	if(useInternal && fileExt.toLowerCase() == "tif") {
	    Errors.Add("Warning: TIF files will not display inside trueSpace" )
	}

}
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

I found the problem. It's coming from the new error reporting system. The first step is clearing errors and some setup and it's not happening. I think it has to do with the render to file vs no render to file code.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Yes I know but seems kind of strange that it works then does not work without rebooting tS and or my computer.
Not sure how or what to look for in finding the problem here but it has happened several times. Fresh installs etc...etc...
I thought I had a Ah Ha! moment there with enabling/disabling the OptDetector Viewer in finding the problem.
One thing that I just figured out though.
I saved a backup yaf_temp.xml -> yaf_tempBAK.xml
Repalcing the bad xml file with the backup was the easiest way to recoup.
Maybe you could create a button script on the YafaRay4tS.RsObj that restores the yaf_temp.xml
The problem with that though is with tS open Win10 will not let you delete the bad xml file because it is in use.

Edit: I was wondering what it was in the Update 4 that restored YafaRay4tS.
The only thing it could be is the new untouched YafaRay4tS.RsObj
So that tells me that the YafaRay4tS.RsObj in trueSpace is getting corrupted with this XML file problem.
If this is true then it seems to me that this should be corrected.
For the life of me though I can not figure out how the XML problem is corrupting the YafaRay4tS.RsObj in the YafaRay Folder in the preobjects folder. Resetting the Default Context does not fix this problem. The only thing that should be saved to this backup folder is when a user sets the Save Settings button.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 06 Aug 2018, 19:55
...

I am going to save the scene at this point and keep testing.
Don't forget to occasionally restart your computer especially if you're making code changes. It seems sometimes things get stuck in memory and only restart removes them.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 06 Aug 2018, 19:28
trueBlue wrote: 06 Aug 2018, 18:41 ...
Running the Update 4 restores YafaRay4tS and I am able to render again.
next time try close tS, delete the xml file, start tS and try render again
Will do.

After updating with the Update 4
Reloaded the scene again, this time used your YafaRay4tS Scene Utilities script
Process Imported Scene found 1 image
Used all other buttons.
It renders without errors.
The only thing I did differently was uncheck Delete xml file after render.
Next I installed and loaded the OptDetector's plugin and rebooted tS
Rendered and I get this error:
Capture.PNG
I saved the xml and cmd files. Which is odd because YafaRay4tS is stuck exporting the xml file.

Next I close tS , delete the xml file, render, and I get the same error as above.

Next I uncheck Use OptDetector Viewer and render.
It renders fine!

Next I enable Use OptDetector Viewer and render.
It renders fine!


Here is the bottom portion of the saved xml file that caused the error.

Code: Select all

<mesh id="9" vertices="4" faces="2" has_orco="false" has_uv="true" type="0" obj_pass_index="9">
            <p x="24.92363739013672" y="5.128124237060547" z="-10.51930046081543"/>
            <p x="24.92363739013672" y="15.387716293334961" z="-10.51930046081543"/>
            <p x="24.92363739013672" y="15.387716293334961" z="6.5801100730896"/>
            <p x="24.92363739013672" y="5.128124237060547" z="6.5801100730896"/>
            <uv u="0" v="0"/>
            <uv u="0" v="0"/>
            <uv u="0" v="0"/>
            <uv u="0" v="0"/>
            <uv u="0" v="0"/>
            <uv u="0" v="0"/>
            <set_material sval="Mesh_012Material 0"/>
            <f a="1" b="0" c="3" uv_a="0" uv_b="1" uv_c="2"/>
            <f a="3" b="2" c="1" uv_a="3" uv_b="4" uv_c="5"/>
</mesh>

<texture name="Tex0">

Reading the good xml file there is thousands entries of the below line:
uv u="0" v="0"/>

I am going to save the scene at this point and keep testing.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 06 Aug 2018, 18:41 ...
Running the Update 4 restores YafaRay4tS and I am able to render again.
next time try close tS, delete the xml file, start tS and try render again
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Wanted to test the max3dKuchnia.RsScn that I uploaded previously.
I got this error again with the stuck status message Exporting YafaRay XML …
Capture.PNG
Reloaded the scene again, this time used your YafaRay4tS Scene Utilities script
Process Imported Scene found 1 image
Used all other buttons.
Next error
Capture2.PNG
Whatever this problem is it corrupts the backup YafaRay Folder because resetting the Default Context does not fix this problem.
Running the Update 4 restores YafaRay4tS and I am able to render again.
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Copying your ConvertLights script, I made a ConvertCameras script, just as a learning experience to see if I could do it.
NOT... :oops:
Problem:
I get an error in the 'function CopyAttributes(Source, Destination)' when original trueSpace Cameras are present in the scene.
Notes: Original trueSpace Cameras do not have an OwnerName node.
Not sure how the CameraTypes, old, new, etc... works. :?

FYI: Found a better command to activate trueSpace's window frame from the Window.Shortcuts.xml file.
WindowsManager.ActivateFrame(1);


Before you release the next installer, I need to update the YafaRay4tS Help file.
ToDo:
About.htm - YafaRay4tS Setup library : Add - YafaRay4tS Scene Utilities.RsObj
History.htm - Any new additions, R2F changes, Bucket Rendering (OptDisplay), toolbar buttons...
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 06 Aug 2018, 01:32
trueBlue wrote: 06 Aug 2018, 01:04
clintonman wrote: 06 Aug 2018, 00:39
Most scenes are good.
max3dKuchnia does not render like before, scene is dark.
mappingCmir, mappingRAYmir, translucency and transparency have incorrect texture on walls or floor
With the max3dKuchnia scene I noticed the old Shinny Diffuse was darker then the new Shinny Diffuse.
That and the YafaRay Glass was the only thing that I noticed that was different.
Not sure what happened with the textures. I first ran the Update to YafaRay4tSv0.9.0 script and then copied the path from the old to the new.

With the lights and cameras I used the CopyAttributes.RsObj script.
The glass scene rendered without any problems. Most of the texture problems are because all the boxes have 2 textures in the original scenes and only 1 in the updated scenes.
It was the max3dKuchnia scene that I notice a change with the glass.
I remember the boxes, they had a FBX node with two materials.
I replaced both materials.
Edit: The boxes have two materials but the floors has a wall texture

Amazing work on the YafaRay4tS Scene Utilities. :worship:
Have not used yet, just read it. Very easy to read too!
You write 4 pages of code to my 10 lines. :mrgreen:

The only thing missing is an update to Yafaray Cameras and Yaf(a)Ray Light Material.
Capture.PNG
Capture.PNG (3.51 KiB) Viewed 4555 times
Edit: In the Popup Panel - Script, you will need to change the delete lines to:
Node.Delete(Space.CurrentScene() + "/YafaRay4tS Scene Utilities, 1")
Rename the Cancel button to Close.


Just out of curiosity, I notice that you are using ScriptObject verses Activity.Run

I thought you mentioned that there was a problem using ScriptObject
Or was that just with the reset.js file?
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

Rough Glass shader name has been set to Yaf_Rough_Glass

Replaced YafaRay4tS scene file in the setup library
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 06 Aug 2018, 01:04
clintonman wrote: 06 Aug 2018, 00:39
trueBlue wrote: 04 Aug 2018, 00:27 I went through your YafaRay Scenes and replaced all of the lights, cameras, and materials with current YafaRay lights, cameras, and materials.
I did not have any problems rendering before or after, except the max3dKuchnia.RsScn
I get errorrs and the Status message is stuck with Exporting XML file...

After replacing the materials, I have not had any problems with it.

There is also a caustics scene, the one with the drinking glass and straw. There is still an issue with the reflection of the bottom inside of the glass.
Most scenes are good.
max3dKuchnia does not render like before, scene is dark.
mappingCmir, mappingRAYmir, translucency and transparency have incorrect texture on walls or floor
With the max3dKuchnia scene I noticed the old Shinny Diffuse was darker then the new Shinny Diffuse.
That and the YafaRay Glass was the only thing that I noticed that was different.
Not sure what happened with the textures. I first ran the Update to YafaRay4tSv0.9.0 script and then copied the path from the old to the new.

With the lights and cameras I used the CopyAttributes.RsObj script.
The glass scene rendered without any problems. Most of the texture problems are because all the boxes have 2 textures in the original scenes and only 1 in the updated scenes.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

YafaRaySceneUtilities.jpg
YafaRaySceneUtilities.jpg (36.64 KiB) Viewed 4573 times
YafaRay Scene Utilities

Process Imported Scene - make demo scenes renderable
Gather Textures for Sharing - copies a scenes textures to the selected folder

Update YafaRay4tS node - convert old version Yafaray node to the v0.9.0 version
Update Materials - converts old version materials to v0.9.0 version materials
- if get "Image file does not exist" error then need to press the Process Imported Scene button later
Update Lights - converts old lights to new format

note: if the old version scene has bad texture paths the Map node in the material will give an error, "Image file does not exist" . running the "Process Imported Scene" will fix it given the correct texture path is provided
Attachments
YafaRay4tS Scene Utilities208b.RsObj
(123.14 KiB) Downloaded 219 times
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 06 Aug 2018, 00:39
trueBlue wrote: 04 Aug 2018, 00:27 I went through your YafaRay Scenes and replaced all of the lights, cameras, and materials with current YafaRay lights, cameras, and materials.
I did not have any problems rendering before or after, except the max3dKuchnia.RsScn
I get errorrs and the Status message is stuck with Exporting XML file...

After replacing the materials, I have not had any problems with it.

There is also a caustics scene, the one with the drinking glass and straw. There is still an issue with the reflection of the bottom inside of the glass.
Most scenes are good.
max3dKuchnia does not render like before, scene is dark.
mappingCmir, mappingRAYmir, translucency and transparency have incorrect texture on walls or floor
With the max3dKuchnia scene I noticed the old Shinny Diffuse was darker then the new Shinny Diffuse.
That and the YafaRay Glass was the only thing that I noticed that was different.
Not sure what happened with the textures. I first ran the Update to YafaRay4tSv0.9.0 script and then copied the path from the old to the new.

With the lights and cameras I used the CopyAttributes.RsObj script.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 04 Aug 2018, 00:27 I went through your YafaRay Scenes and replaced all of the lights, cameras, and materials with current YafaRay lights, cameras, and materials.
I did not have any problems rendering before or after, except the max3dKuchnia.RsScn
I get errorrs and the Status message is stuck with Exporting XML file...

After replacing the materials, I have not had any problems with it.

There is also a caustics scene, the one with the drinking glass and straw. There is still an issue with the reflection of the bottom inside of the glass.
Most scenes are good.
max3dKuchnia does not render like before, scene is dark.
mappingCmir, mappingRAYmir, translucency and transparency have incorrect texture on walls or floor
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Yes
Making a small gain on converting old yaf materials to new yaf materials

Code: Select all

function Search(CurrentNode)
{

    if(Node.Exists(CurrentNode + "/D3D material"))
    {
        	//YafaRay Glass has No unique con name so start off by naming the yafarayType = "YafaRay Glass"
		Node.Select(CurrentNode + "/D3D material")
		Node.Value(System.ThisOwner() + "/CopyAttributes", "Source") = Node.FirstSelected();
		Node.Value(System.ThisOwner() + "/Convert", "yafarayType") = "YafaRay Glass"
    }
    if(Node.ConExists(CurrentNode + "/D3D material", "Exponent"))
    {
		Node.Value(System.ThisOwner() + "/Convert", "yafarayType") = "YafaRay Rough Glass"
    }
    if(Node.ConExists(CurrentNode + "/D3D material", "UseTranslucencyMap"))
    {
		Node.Value(System.ThisOwner() + "/Convert", "yafarayType") = "YafaRay Shiny_Diffuse"
    }
    if(Node.ConExists(CurrentNode + "/D3D material", "glossy_reflect_imgOUT"))
    {
		Node.Value(System.ThisOwner() + "/Convert", "yafarayType") = "YafaRay Glossy"
    }
    if(Node.ConExists(CurrentNode + "/D3D material", "GlossyBitMap"))
    {
		Node.Value(System.ThisOwner() + "/Convert", "yafarayType") = "YafaRay Coated_Glossy"
    }
    if(Node.ConExists(CurrentNode + "/D3D material", "double_sided"))
    {
		Node.Value(System.ThisOwner() + "/Convert", "yafarayType") = "YafaRay Light_Material"
        return false
    }
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 05 Aug 2018, 20:57 Well when you load a new scene with Vray installed and loaded it loads the Vray node automatically into the scene. Ready to render. :)
No user interaction needed.
So it's a replacement for the YafaRay4tS scene found inside the "YafaRay4tS Setup" library?
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Well when you load a new scene with Vray installed and loaded it loads the Vray node automatically into the scene. Ready to render. :)
No user interaction needed.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 05 Aug 2018, 19:49 Loads the YafaRay4tS.RsObj from the Yafaray Folder into the scene.
Bottom line, what is it for? Why would I load a scene so it would load the YafaRay4tS when I could just right click a button and get the same thing?
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Loads the YafaRay4tS.RsObj from the Yafaray Folder into the scene.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 05 Aug 2018, 18:09 ...
Here is a new YafaRay4tS.RsScn that loads the following script:

Code: Select all

//Start script
	//current lighting render panel
	if (Node.Exists(Space.CurrentScene()+"/YafaRay4tS")){
	} else {
		if(Node.Exists("/Yafaray Folder")){
			Node.Copy("/Yafaray Folder/YafaRay4tS", Space.CurrentScene());
		}
	};
	Activity.Run(Space.CurrentScene() + "/YafaRay4tS/Lighting Method Switch")
Node.Delete(System.ThisOwner())
//End script
what does it do?
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 05 Aug 2018, 15:28
trueBlue wrote: 05 Aug 2018, 14:31 ...

I do not know if this matters or not but the current YafaRay Glass & YafaRay Rough Glass have the same ShaderName = "Yaf_Glass"
It doesn't matter, but if you change the name it has to be"Yaf_Rough_Glass".
Seems like it would be a good time to do it before you officialy release v0.9.0
Here is a new YafaRay4tS.RsScn that loads the following script:

Code: Select all

//Start script
	//current lighting render panel
	if (Node.Exists(Space.CurrentScene()+"/YafaRay4tS")){
	} else {
		if(Node.Exists("/Yafaray Folder")){
			Node.Copy("/Yafaray Folder/YafaRay4tS", Space.CurrentScene());
		}
	};
	Activity.Run(Space.CurrentScene() + "/YafaRay4tS/Lighting Method Switch")
Node.Delete(System.ThisOwner())
//End script
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 05 Aug 2018, 14:31 ...

I do not know if this matters or not but the current YafaRay Glass & YafaRay Rough Glass have the same ShaderName = "Yaf_Glass"
It doesn't matter, but if you change the name it has to be"Yaf_Rough_Glass".
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Created a Save as RsObj that is called from the File Menu.
Save as RsObj.PNG
Save as RsObj.PNG (5.28 KiB) Viewed 4288 times

Code: Select all

function Execute(params)
{
	// CreateRsFileHandle flags
	RSFHNDO_READ = 1;
	RSFHNDO_WRITE = 2;
	RSFHNDO_NO_CHNK_LIST = 4;

	// RdBitmap flags
	BFILEFMT_BMP = 0 // Save as bitmap file
	BFILEFMT_JPG = 1 // Save as jpeg
	BFILEFMT_TGA = 2 // TGA is not supported
	BFILEFMT_PNG = 3 // Save as PNG
	BFILEFMT_DDS = 4 // Save as DirectX DDS file
	BFILEFMT_PPM = 5 // PPM is not supported
	BFILEFMT_DIB = 6 // Save as Windows DIB
	BFILEFMT_HDR = 7 // Save in HDR format
	BFILEFMT_PFM = 8 // Save in Portable Pixmap format


	Thumbnail = params.conValue('Thumbnail');
	FileName =  params.conValue('FileName');
	Author =  params.conValue('Author');
	Description =  params.conValue('Description');
	var Obj = Node.FirstSelected();

	if (FileName == "") {
		return;
	}
	if (Obj == "") {
		return;
	}

	hFile = RsFileIO.CreateRsFileHandle(FileName, RSFHNDO_WRITE);

	// Create header chunk and add it
	chHeader = System.CreateDO('FileIO Package/RdChunk Header');
	chHeader.Author = Author;
	chHeader.Description = Description;
	chHeader.Producer = 'tS7.61B8.4';
	chHeader.Type = '.RsObj';

	hFile.AddChunk(chHeader, false);

	// Create Thumbnail chunk and add it
	objBitmap = System.CreateDO('Common Data Package/Bitmap Data');
  try
	{
		objBitmap.LoadFromFile(Thumbnail);
		chThumbnail = System.CreateDO('FileIO Package/RdChunk Thumbnail');
		chThumbnail.PutBitmap(objBitmap, BFILEFMT_PNG)
		hFile.AddChunk(chThumbnail, false);
	}
	catch (e)
	{
	}

	// Create Thumbnail chunk and add it
	chRsObj = System.CreateDO('FileIO Package/RdChunk RsObj');
	chRsObj.AddNode(Obj, '', '');
	hFile.AddChunk(chRsObj, false);

Node.Value(System.ThisOwner(), "Description") = "";

	// Close the file
	hFile.Close(false)

}
Uses the standard File Browse Dialog which has a quirk in that the object (My_Object.RsObj) needs to exist.
Also does not pick up the Node.FirstSelected's name.
Can not figure out how to use a Folder dialog and use the object's name separately to save.


You can find the unmodified script in the Objects - Tutorial Objects library - Save RsObj
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 05 Aug 2018, 14:44
trueBlue wrote: 05 Aug 2018, 14:31 ...
Would be nice if all three processes were in one DRY package, even if each script was called from a separate button.

...
Right, that was going to be my question to you, thanks for the input.
When I painly went through your sample scenes changing the materials, lights, and cameras.
I navigated to the object's D3D material, loaded a new material and used your CopyAttributes.RsObj on them, reconnected the Material to the Material Flavor Manager, deleted the old, and renamed the new to D3D material.
I had to also fix the link to textures, and restore any D3D Previews if they had any.

I have been fooling around with your D3DmaterialConverter.RsObj trying to use that for updating old Yaf materials to new Yaf materials.
If possible the workflow could be like this.
Read the ShaderName (not possible with Glass and Rough Glass because they have the same ShaderName)
Change the yafarayType to the new Material Name
Load the new material
Use your CopyAttributes.RsObj
Clean up
Process the links to images and D3D Preview and or whatever is needed.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 05 Aug 2018, 14:31 ...
Would be nice if all three processes were in one DRY package, even if each script was called from a separate button.

...
Right, that was going to be my question to you, thanks for the input.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 05 Aug 2018, 14:25
clintonman wrote: 05 Aug 2018, 03:34
trueBlue wrote: 05 Aug 2018, 01:51 ...

Maybe it is because I use Display topic order direction: Descending
Bingo! Good call. If I change order to descending it matches. Now just need a more reliable way to do the link so it works all the time.

Looks like some kind of bug in the forum software. If you change your preferences for posts to descending copied links only work for users with descending posts option. Probably opposite is true as well.

These are the links that worked for me
viewt ... 100#p52448
viewt ... 580#p52448

This is a link with descending set - it's missing the "sd=d" portion which I assume stands for descending
viewt ... 580#p52448

will need to do more tests with different combinations of user control panel ascending/descending and bottom of page option for ascending/descending
Also all of the previous links do not work like they use to since going to HTTPS.
Click on my signature and test those links. For me when I click on those links, my theme changes and I am logged out.


Back to the original point in the post. I was trying to give you a heads up that there may be a problem with the D3DmaterialConverter.RsObj in that post. :|
Maybe cause I didn't use the insert url thing, was trying to just past just text to show the differences but came in as links.

D3DmaterialConverter problem - roger that
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 05 Aug 2018, 05:44
trueBlue wrote: 05 Aug 2018, 01:09
clintonman wrote: 04 Aug 2018, 23:29 progress on changes to rc23

Todo and what not:

Update to YafaRay4tSv0.9.0
doesn't do what the name implies - it copies old yafaray values to the new node then sets up texture file references. it does not update materials to the new version
also improperly updates the node used for setting up new scenes - should update a copy
if updating old scene should not need to update texture references
note: partial solution post in this thread page 11, 9 June 21:39

possible material update to show reflections in the d3d viewport
Update to YafaRay4tSv0.9.0 included the Update YafaRay Render Node script from the previous setup library and your recent Prep YafaRay Scene script.

...
That's where some confusion came from. It seems to be a combination of 2 different things, updating old YafaRay4tS node and processing a new YafaRay4tS scene that's been downloaded from the internet. As I see it this is what is needed - 3 different processes:

a. Update old YafaRay4tS scene to the new format
b. Process a YafaRay4tS scene from the internet so it will render and find needed textures
c. process to gather textures together for sharing yafaray scenes that use texture maps

a has 4 parts - replace the YafaRay4tS node, update the yafaray path and replace the materials with the new materials, replace lights with new lights
b has 3 parts - fix texture references, fix the render path and fix the yafaray path
Would be nice if all three processes were in one DRY package, even if each script was called from a separate button.

I do not know if this matters or not but the current YafaRay Glass & YafaRay Rough Glass have the same ShaderName = "Yaf_Glass"
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 05 Aug 2018, 03:34
trueBlue wrote: 05 Aug 2018, 01:51 ...

Maybe it is because I use Display topic order direction: Descending
Bingo! Good call. If I change order to descending it matches. Now just need a more reliable way to do the link so it works all the time.

Looks like some kind of bug in the forum software. If you change your preferences for posts to descending copied links only work for users with descending posts option. Probably opposite is true as well.

These are the links that worked for me
viewt ... 100#p52448
viewt ... 580#p52448

This is a link with descending set - it's missing the "sd=d" portion which I assume stands for descending
viewt ... 580#p52448

will need to do more tests with different combinations of user control panel ascending/descending and bottom of page option for ascending/descending
Also all of the previous links do not work like they use to since going to HTTPS.
Click on my signature and test those links. For me when I click on those links, my theme changes and I am logged out.


Back to the original point in the post. I was trying to give you a heads up that there may be a problem with the D3DmaterialConverter.RsObj in that post. :|
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 05 Aug 2018, 01:09
clintonman wrote: 04 Aug 2018, 23:29 progress on changes to rc23

Todo and what not:

Update to YafaRay4tSv0.9.0
doesn't do what the name implies - it copies old yafaray values to the new node then sets up texture file references. it does not update materials to the new version
also improperly updates the node used for setting up new scenes - should update a copy
if updating old scene should not need to update texture references
note: partial solution post in this thread page 11, 9 June 21:39

possible material update to show reflections in the d3d viewport
Update to YafaRay4tSv0.9.0 included the Update YafaRay Render Node script from the previous setup library and your recent Prep YafaRay Scene script.

...
That's where some confusion came from. It seems to be a combination of 2 different things, updating old YafaRay4tS node and processing a new YafaRay4tS scene that's been downloaded from the internet. As I see it this is what is needed - 3 different processes:

a. Update old YafaRay4tS scene to the new format
b. Process a YafaRay4tS scene from the internet so it will render and find needed textures
c. process to gather textures together for sharing yafaray scenes that use texture maps

a has 4 parts - replace the YafaRay4tS node, update the yafaray path and replace the materials with the new materials, replace lights with new lights
b has 3 parts - fix texture references, fix the render path and fix the yafaray path
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 05 Aug 2018, 01:51 ...

Maybe it is because I use Display topic order direction: Descending
Bingo! Good call. If I change order to descending it matches. Now just need a more reliable way to do the link so it works all the time.

Looks like some kind of bug in the forum software. If you change your preferences for posts to descending copied links only work for users with descending posts option. Probably opposite is true as well.

These are the links that worked for me
viewt ... 100#p52448
viewt ... 580#p52448

This is a link with descending set - it's missing the "sd=d" portion which I assume stands for descending
viewt ... 580#p52448

will need to do more tests with different combinations of user control panel ascending/descending and bottom of page option for ascending/descending
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

viewt ... 580#p52448
The above link was copied and pasted inside the Insert URL from the icon above.
Screen shot
Capture.PNG
Here is a screen shot and your quote:
Capture2.PNG
clintonman wrote: 09 Jun 2018, 21:39 Attached new material converter can be used with the new yafaray4ts

notes for previous version are here:
http://clintons3d.com/plugins/truespace ... erter.html
Maybe it is because I use Display topic order direction: Descending
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 05 Aug 2018, 01:09 ...

Maybe its because I use the creamy theme but for me it is:
Page 59 Sat Jun 09, 2018 2:39 pm
...
Nope, it's your link.
I tried xcreamy, a different browser and my cell phone with combinations of being logged in and not logged in and they all come up as page 11.
We could solve it if you said how you create the link and supplied a screen shot showing page 59 with the address bar visible. The only reason I found it was because I was going through all the pages in the thread looking for things I missed or forgot and it was one of them.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 04 Aug 2018, 23:29 progress on changes to rc23

Todo and what not:

Update to YafaRay4tSv0.9.0
doesn't do what the name implies - it copies old yafaray values to the new node then sets up texture file references. it does not update materials to the new version
also improperly updates the node used for setting up new scenes - should update a copy
if updating old scene should not need to update texture references
note: partial solution post in this thread page 11, 9 June 21:39

possible material update to show reflections in the d3d viewport
Update to YafaRay4tSv0.9.0 included the Update YafaRay Render Node script from the previous setup library and your recent Prep YafaRay Scene script.

Maybe its because I use the creamy theme but for me it is:
Page 59 Sat Jun 09, 2018 2:39 pm
Thats is the one that is using ShaderNames instead of Material Names.

I do not know if this matters or not but the current YafaRay Glass & YafaRay Rough Glass have the same ShaderName = "Yaf_Glass"
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

progress on changes to rc23

Blend Material Collection
re-established the right click select for the box
removed old selection change based scripts - not used anymore
renamed internal block from Blend Material Collection to Blend Material Grid

Background preview spheres
removed the show backface - should only be visible from the inside of the sphere
image sphere - re-established sphere primitive uv map and reversed u coordinate to match renders, yaw value lock changed from 90 to 180
changed scale default from 10 to 50 and increased scrubber scale max value to 100

Re-established previous defaults in YafaRay4tS node
useRenderToFile - true
useOptDetector - true
tileOrder - centre

Render To File panel - added useRenderToFile button for easy opt out

Edit:

YafaRay Camera - fixed DOF script and added check for valid selection

Todo and what not:

Update to YafaRay4tSv0.9.0
doesn't do what the name implies - it copies old yafaray values to the new node then sets up texture file references. it does not update materials to the new version
also improperly updates the node used for setting up new scenes - should update a copy
if updating old scene should not need to update texture references
note: partial solution post in this thread page 11, 9 June 21:39

possible material update to show reflections in the d3d viewport
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

I went through your YafaRay Scenes and replaced all of the lights, cameras, and materials with current YafaRay lights, cameras, and materials.
I did not have any problems rendering before or after, except the max3dKuchnia.RsScn
I get errorrs and the Status message is stuck with Exporting XML file...

After replacing the materials, I have not had any problems with it.

There is also a caustics scene, the one with the drinking glass and straw. There is still an issue with the reflection of the bottom inside of the glass.
Attachments
YafaRay Scenes.zip
(15.34 MiB) Downloaded 220 times
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 03 Aug 2018, 14:38
clintonman wrote: 03 Aug 2018, 13:50
trueBlue wrote: 03 Aug 2018, 13:09 Forgot to mention that in the Blend Material Collection, the Sphere and Text are setup differently in their Highlight LMB and RMB scripts. Shouldn't they be the same?

In testing the Blend Material Collection, I am thinking about adding Space.Unselect() to the Inspect widget's Cancel command. This eliminates the last selected object getting Painted and or other unwanted things like initiating Point Editing . Whatcha think? Good idea or Bad idea?
The sphere materials change with user selection shiny diffuse, glossy, glass etc. So you would have to modify all the yafaray materials to have some common input for highlighting.

Don't know about the Space.Unselect idea. Only way to tell is try it and see.
You are missunderstanding me. I was reffering to the Blend Material Collection's Sphere and Text object's Highlight scripts.
Thought I was referring to the same thing, so whatever you're thinking try it and see if it works.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 03 Aug 2018, 13:50
trueBlue wrote: 03 Aug 2018, 13:09 Forgot to mention that in the Blend Material Collection, the Sphere and Text are setup differently in their Highlight LMB and RMB scripts. Shouldn't they be the same?

In testing the Blend Material Collection, I am thinking about adding Space.Unselect() to the Inspect widget's Cancel command. This eliminates the last selected object getting Painted and or other unwanted things like initiating Point Editing . Whatcha think? Good idea or Bad idea?
The sphere materials change with user selection shiny diffuse, glossy, glass etc. So you would have to modify all the yafaray materials to have some common input for highlighting.

Don't know about the Space.Unselect idea. Only way to tell is try it and see.
You are missunderstanding me. I was reffering to the Blend Material Collection's Sphere and Text object's Highlight scripts.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 03 Aug 2018, 13:09 Forgot to mention that in the Blend Material Collection, the Sphere and Text are setup differently in their Highlight LMB and RMB scripts. Shouldn't they be the same?

In testing the Blend Material Collection, I am thinking about adding Space.Unselect() to the Inspect widget's Cancel command. This eliminates the last selected object getting Painted and or other unwanted things like initiating Point Editing . Whatcha think? Good idea or Bad idea?
The sphere materials change with user selection shiny diffuse, glossy, glass etc. So you would have to modify all the yafaray materials to have some common input for highlighting.

Don't know about the Space.Unselect idea. Only way to tell is try it and see.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Forgot to mention that in the Blend Material Collection, the Sphere and Text are setup differently in their Highlight LMB and RMB scripts. Shouldn't they be the same?

In testing the Blend Material Collection, I am thinking about adding Space.Unselect() to the Inspect widget's Cancel command. This eliminates the last selected object getting Painted and or other unwanted things like initiating Point Editing . Whatcha think? Good idea or Bad idea?
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 03 Aug 2018, 02:59 Gotcha! :)
Hopefully you can include that with your next release.
I do not know if you know this or not.
When you save it to the library, right click it.
Choose Change Thumbnail to Icon.

Hoping that your next (Very Soon!) release is Gold. :)

I am going to release the Unofficial Update 4 on August 4, 2018
I will just grab a copy of the Blend Material Collection from that and include it with the update.

Thanks again for everything!
Sounds good to me. I will review the previous posts and check my paper notes to see if I missed anything and do some last bit of testing. The forums are way overdue for an update and I hope to get that done this weekend as well.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Gotcha! :)
Hopefully you can include that with your next release.
I do not know if you know this or not.
When you save it to the library, right click it.
Choose Change Thumbnail to Icon.

Hoping that your next (Very Soon!) release is Gold. :)

I am going to release the Unofficial Update 4 on August 4, 2018
I will just grab a copy of the Blend Material Collection from that and include it with the update.

Thanks again for everything!
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

keepRightClick.jpg
Looks good except I would keep the right click on the Blend Material Collection Highlight node.
Image shows what happens if it is accidentally edited. This can't be stopped but at least can have a little prevention.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

YafaRay4tSv0.9.0-RC-23
Updates:
Blend Materials Collection
YafaRay4tS Help
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Nice! Looks like you got the selecting of the BlendMaterial# dialed.
I changed a few things as the workflow has changed and updated the help file to reflect these changes.

Blend Material Collection
Removed MeshModifiers.ToggleTool('/Widgets/Tools/Material editor/Inspect'); from the Popup panel script.
Added your fix for the MatrixOffset.
Added a Space.Unselect() script to the Reset script. Disables the Inspect tool after resetting.
Added an Exit button to the panel. Removes the Blend Material Collection from the scene.
Renamed the Cube to Blend Material Collection and changed the Highlight script from RMB to LMB.
Changed the BlendMaterial# panels to "Add description of the material" "Shinny Diffuse - Default settings".


YafaRay4tS Help


Blend Material Collection

Reset - Removes all of the spheres in the collection except for the first two original spheres.
Add Material - Adds a new sphere to the collection, selects it, activates the Inspect tool, and adds a BlendMaterial# to the Material combo control.
Select Material - Selects the BlendMaterial# in the present Material combo control and activates the Inspect tool.
BlendMaterial - Each material in the collection has a panel where you can enter a description of the material for further references.

Note: Upon loading, it automatically resets the D3D Material Editor’s default material. This is to ensure that a YafaRay Blend material is not added to the collection.


Steps to apply a YafaRay Blend material



1. The easiest way to apply a YafaRay Blend material is to select your Object first.
2. Load the YafaRay Blend material from the library into the D3D Material Editor.
This automatically loads the required Blend Material Collection into the scene and selects BlendMaterial1.
3. Load a YafaRay material from the library into the D3D Material Editor.
BlendMaterial1 will be painted with your selected material or if needed use the Paint tool.
4. Right click any of the spheres in the collection and then left click with the Inspect tool.
5. Load a YafaRay material from the library and Paint the sphere if needed.
6. Select the Update D3D Preview button.
7. With the Inspect tool, inspect your Object and adjust the amount of Blend between the two blended materials.
8. Right click in 3D Space to exit the Inspect tool.

You can also manually select a BlendMaterial# with the Select Material button.

Note: Ensure that any sphere in the collection is not painted with a YafaRay Blend material.

Limitations: In order to use Blend materials, the Blend Material Collection must be included with your scene.
Only one Blend Material Collection is supported per scene.
You cannot rename the Blend Material Collection.
Using different YafaRay Blend materials for different objects, must be included in the Blend Material Collection.
The Blend Material Collection supports up to 25 materials.
The Blend Material Collection does not render and is completely transparent to the YafaRay render engine.


Tried to upload the zip file.
I get an error.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

RC-22

bug in Blend Material Collection 3d add button - getting double rotations

line 42 MatrixOffset add lines to fix

Code: Select all

	MatrixIn.SetYaw(0);
	MatrixIn.SetRoll(0);
	MatrixIn.SetPitch(0);
note: just found that right click in open space does not prevent mesh edit of Blend Material Collection meshes, so mesh edit is not completely blocked
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 02 Aug 2018, 04:24 Its for adding notes about the selected BlendMaterial# in the collection.

It does not change to the selected BlendMaterial# when using the Inspect tool.
The Inspect tool does not select the object, only the material.

It does change when you select the Add Material button and also when using the Select Material button.
I see it now. Must have been stuck earlier.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

RC-22 changes

fixed offline renderer not added during installation

updated Blend Material Collection -
activate the d3d material option to edit picked materials directly - needed for unpatched tS
locked all items from mesh editing
can only transform(translate, rotate, scale) via the flat surface

replaced selection change with 3d button behavior - generally right click to edit

left or right click the plus button will add a new material
right click on sphere will edit material
right click the number labels will edit material
left or right click the flat mesh to select it

cannot process as a button and override left click so,
left click the number labels selects the sphere - hmm maybe this one should do the edit instead of select...
left click the sphere selects the sphere
Attachments
YafaRay4tSv090-RC-22.zip
(14.7 MiB) Downloaded 201 times
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 02 Aug 2018, 02:51 Nothing was changed in the installer with regards to the Renderer.
Do you have an idea what it could be?
Most have got lost in the changes.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Its for adding notes about the selected BlendMaterial# in the collection.

It does not change to the selected BlendMaterial# when using the Inspect tool.
The Inspect tool does not select the object, only the material.

It does change when you select the Add Material button and also when using the Select Material button.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

textentrymystery.jpg
What is the white square? Seems to show randomly or maybe only for the last blend material.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Nothing was changed in the installer with regards to the Renderer.
Do you have an idea what it could be?
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Yafaray4tS v0.9.0

Post by clintonman »

Installed to non-patched tS full.
The Offline Renderer was missing.
Reset to default context and it appeared.

will test on unpatch tS std to see if same.

Edit: Yep, same for unpatch std tS. Must reset context before offline renderer is available
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

YafaRay4tSv090-RC-20

Includes all of the changes in RC-19

Added the fix to MaterialsFnSet
Line 1382

Code: Select all

function ExportBlendMaterial(MaterialNode) {
	var Errors = Node.AccessFnSet(System.ThisOwner() + '/ErrorsFnSet');
	if(!Node.Exists(Space.CurrentScene() + "/Blend Material Collection")) {
		//System.Trace("Error: Blend Material Collection not found. Skipping material export.");
		Errors.Add("Blend Material Collection not found. Skipping material export.");
		return;
	}
Installer
Added beginning and end status message just for fun. tS2 users might remember it's installer. :)
Added a Textures folder that includes the demo scenes images.
Moved YafaRay4tS.RsSLgts from the setup library to the YafaRay Lights library.
Changed loading the above light setup to loading the YafaRay4tS.RsScn

YafaRay4tS Setup library
New icons for the Background D3D Preview objects.
New - The Update to YafaRay4tSv0.9.0.RsObj includes the script to load textures for the demo and or older scenes.

YafaRay Materials library
All materials panels were divided into aspects. IE Default, Transparency, Specular, Bump, and Expanded.
New Blend and Blend Materials Collection noted here:


YafaRay4tS.RsObj
Renamed the Open Temp Folder button to Open Output Folder and included it to all of the panels in the Output - Render File.
Changed the Open Render Pass button to a On / Off button.
Renamed the Draw Parameters check box to Log Draw Parameters.
Added a status message to the Save Settings script.

New complete YafaRay4tS Help.chm

@ Clinton
I hope you like the changes because the help file reflects these changes.
The goal was to make it a little more intuitive.
I did not include the OptDetectorsPreferences.RsObj
This will be included in the Unofficial Update 4

The Per - Material attributes are on the Default and Expanded aspects.
Capture.PNG
Removed due to update
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Okay noted in the help file.

Note: Ensure that any sphere in the collection is not painted with a YafaRay Blend material.

Limitations: In order to use Blend materials, the Blend Material Collection must be included with your scene.
Only one Blend Material Collection is supported per scene.
You cannot rename Blend Material Collection.
Using different Blend materials for different objects, must be included in the Blend Material Collection.
The Blend Material Collection supports up to 25 materials.
The Blend Material Collection does not render, it is complete transparent to the YafaRay render engine.

Return to “Rendering”