Final trueSpace 7.61 Beta 8 Unofficial Update

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

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

trueBlue wrote: 30 Mar 2021, 15:41 Some observations:
D3D 2 YafaRay4tS
Multiple selected objects
1) Status always says:
Material Conversion 0

2) Needs clear history?

If Yafaray material combo control blank(Default), Alert no materials found
3) Needs a yafarayType default?
And or add material in it's saved state (This works)

MaterialInstanceConverterScript/SetMaterialEditorMode
//System.Alert("Clintons3dView plugin must be Installed and Loaded.");Wrong plugin
4) System.Alert("Clintons3dPlugin must be Installed and Loaded");

D3D 2 Instancing
5) Needs clear history?

Note: Changed all Conversion alert text identifing the converted material type
Example:
System.Alert("Converted " + numMaterialsConverted + " D3D Compiled materials"
1) is a count down - if you have 75 conversions it will start at "Material Conversion 75" then 74... down to 0.
2) see line 22 yafarayloop node
3) default might be a good idea
4)right
5) not needed see previous post
Clinton Reese

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

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

Can we leave it in for the simple fact, depending how many materials are getting converted, there can be several entries?
And to be consistent with all of the other conversion scripts that do clear the history?
I am still investigating but there my be a problem with the main view turning gray (runs out of memory?) when using the conversion scripts
Also noticed that Synchronize had problems with the 3D object's material turning black in Model
Not sure if it is all related to one or the other but something is different since the previous updates

With the Material Conversion 0 counter, I recall you using a % count down in one of your other projects for the status
That would be a great addition if possible
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

trueBlue wrote: 30 Mar 2021, 19:44 Can we leave it in for the simple fact, depending how many materials are getting converted, there can be several entries?
And to be consistent with all of the other conversion scripts that do clear the history?
I am still investigating but there my be a problem with the main view turning gray (runs out of memory?) when using the conversion scripts
Also noticed that Synchronize had problems with the 3D object's material turning black in Model
Not sure if it is all related to one or the other but something is different since the previous updates
No. Simplicity and neatness is not the goal. Reducing the destruction of undos at every opportunity is. Undo's are a valuable resource not to be removed except when there is no choice. On top of that Remove Orphan Materials has nothing to do with converting materials, so there is already inconsistency in the tool set.

Hopefully, the gray may just be some kind of redraw issue. The Yafaray conversion does have a negative effect. If there is a problem may need to limit other conversions as well. Yaf conversion is limited to 200 conversions in 1 run and gives a warning that it can only do those 200 conversions 4 times before tS may crash.
Clinton Reese

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

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

trueBlue wrote: 30 Mar 2021, 19:44 With the Material Conversion 0 counter, I recall you using a % count down in one of your other projects for the status
That would be a great addition if possible
Counts up as a percentage and removed the clear history from instancing run.
Attachments
D3D Material Converter102.RsObj
(2.08 MiB) Downloaded 121 times
Clinton Reese

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

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

Attached is an alternative to the current Eye2Cam script.
The current version eats up about 27 undo steps and clears the undo history
This version uses 15 undos and does not clear undo history.
If it did not remove the LE2Data connectors it would eat about 8 undos.

The LE2Data connector removal technique is based on the Copy03.RsObj submitted earlier in this thread.
Attachments
Eye2Cam04.RsObj
(6.65 KiB) Downloaded 120 times
Clinton Reese

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

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

Great improvement with % counter Clinton! :worship:
Thank you!
I will upload the changes shortly
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

clintonman wrote: 30 Mar 2021, 21:40 Attached is an alternative to the current Eye2Cam script.
The current version eats up about 27 undo steps and clears the undo history
This version uses 15 undos and does not clear undo history.
If it did not remove the LE2Data connectors it would eat about 8 undos.

The LE2Data connector removal technique is based on the Copy03.RsObj submitted earlier in this thread.
Since this script requires a Perspective view, I wonder if you could NOT use the commands that are committed out?

Code: Select all

	Node.Value(Cam, "Matrix") = Node.Value(Eye, "WldMatrix");
//	Node.Value(Cam + "/Camera", "ClippingFar") = Node.Value(Eye, "ClippingFar");
//	Node.Value(Cam + "/Camera", "ClippingNear") = Node.Value(Eye, "ClippingNear");
//	Node.Value(Cam + "/Camera", "Focus") = Node.Value(Eye, "Focus");
	Node.Value(Cam, "FOV") = Node.Value(Eye, "FOV");
//	Node.Value(Cam + "/Camera", "Perspective") = Node.Value(Eye, "Perspective");
	D3DView.SetActiveCamera(Cam, winid);
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

clintonman wrote: 30 Mar 2021, 21:40 Attached is an alternative to the current Eye2Cam script.
The current version eats up about 27 undo steps and clears the undo history
This version uses 15 undos and does not clear undo history.
If it did not remove the LE2Data connectors it would eat about 8 undos.

The LE2Data connector removal technique is based on the Copy03.RsObj submitted earlier in this thread.
I took a peak at the Camera in Preferences/Cameras and confirmed that it only has one hidden LE2Data connector
So it is only necessary to remove one

Code: Select all

	var workwindow = WindowsManager.GetWorkWindow();
	var winid = Node.Value(workwindow, "WinID");
	var Eye = "/D3DView/EyeCamera_" + winid;
	if (Node.SubObjectCount("/D3DView") == 0) return;
	if (!Node.ConExists(workwindow, "WinID")) return;
	if (!Node.Exists("/D3DView/EyeCamera_" + winid)) return;
	if (Node.Value(Eye, "CameraType") != 0) {
		System.Alert("Switch to Perspetive view first")
		return
	}
	var Cam = Node.Copy("/Preferences/Cameras/Camera", Space.CurrentScene());
	Node.Value(Cam, "Matrix") = Node.Value(Eye, "WldMatrix");
//	Node.Value(Cam + "/Camera", "ClippingFar") = Node.Value(Eye, "ClippingFar");
//	Node.Value(Cam + "/Camera", "ClippingNear") = Node.Value(Eye, "ClippingNear");
//	Node.Value(Cam + "/Camera", "Focus") = Node.Value(Eye, "Focus");
	Node.Value(Cam, "FOV") = Node.Value(Eye, "FOV");
//	Node.Value(Cam + "/Camera", "Perspective") = Node.Value(Eye, "Perspective");
	D3DView.SetActiveCamera(Cam, winid);
	Node.ConRemove(Cam, "LE2Data");
	RsApp.Undo()
Also putting the ConRemove at the end of the script and adding Undo, eliminates one entry
Total = 4 entries
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

trueBlue wrote: 30 Mar 2021, 23:23
Also putting the ConRemove at the end of the script and adding Undo, eliminates one entry
Total = 4 entries
That's interesting. I wonder if that trick will work when there are more than one LE2Data connectors.
Clinton Reese

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

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

Well that was short lived trick
Now it is not working
Post Reply