Final trueSpace7.61 Beta 8 Std Unofficial Update

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

Re: Final trueSpace7.61 Beta 8 Std Unofficial Update

Post by trueBlue »

Update 75 for trueSpace7.61 Beta 8 Standalone Unofficial Update

July 16, 2021

viewtopic.php?f=55&t=3731

Hopefully this is the final Update

Workspace Layers 4 preference panel
WL4 panel.png
WL4 panel.png (10.84 KiB) Viewed 2354 times
Add
Auto show floating panel
Automatically opens the floating panel when saved to a scene
Show | Hide Aspects


The included Plugins.xml file has the Clintons3dPlugin, Clintons3dPluginExt and Clintons3dRsView, Installed and Loaded to the default path: C:\trueSpace761Std
WARNING: These 3 plugins are required to be Installed and Loaded when using trueSpace!
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 trueSpace7.61 Beta 8 Std Unofficial Update

Post by clintonman »

The plane loop select script had a bug. It did not restore the selection mode, but instead only set context selection mode.
Attachments
planeLoopSelect.RsObj
(21.99 KiB) Downloaded 119 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 trueSpace7.61 Beta 8 Std Unofficial Update

Post by trueBlue »

@ Clinton
Here is an updated Scene panel
RMB command
Shows the ORA Settings aspect in the stack/Panels
You may or may not like this RMB script so let me know what you think

Removed due to 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 trueSpace7.61 Beta 8 Std Unofficial Update

Post by clintonman »

trueBlue wrote: 04 Aug 2021, 21:25 ...
RMB command
Shows the ORA Settings aspect in the stack/Panels
You may or may not like this RMB script so let me know what you think
So what am I looking for when I RMB it?
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 trueSpace7.61 Beta 8 Std Unofficial Update

Post by clintonman »

Attached is a fix for the Cube View widgets CameraFromView script.

It fixes a logic problem and removes the clear history command so undos are not lost.
Removed the many Node.ConRemove(Cam, "LE2Data"); commands and replaced with single util.ConRemove(Cam, "LE2Data")

Just did some tests and camera node is going into the LE in an orderly fashion without the ConRemove. Maybe some UU update makes it not needed?
Attachments
CameraFromView.RsObj
(10.31 KiB) Downloaded 98 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 trueSpace7.61 Beta 8 Std Unofficial Update

Post by trueBlue »

clintonman wrote: 13 Aug 2021, 16:01 Attached is a fix for the Cube View widgets CameraFromView script.

It fixes a logic problem and removes the clear history command so undos are not lost.
Removed the many Node.ConRemove(Cam, "LE2Data"); commands and replaced with single util.ConRemove(Cam, "LE2Data")

Just did some tests and camera node is going into the LE in an orderly fashion without the ConRemove. Maybe some UU update makes it not needed?
I updated your Cube widget's CameraFromView to the New unreleased - Eye2Cam.xml so we are in sync

Code: Select all

// 8/13/2021
function Execute(params)
{
var Win = WindowsManager.GetWorkWindow();
var ID = Node.Value(Win, "WinID");
var Eye = "/D3DView/EyeCamera_" + ID;
if (Node.SubObjectCount("/D3DView") == 0) return;
if (!Node.ConExists(Win, "WinID")) return;
if (!Node.Exists("/D3DView/EyeCamera_" + ID)) return;
if (Node.Value(Eye, "CameraType") != 0) {
System.Alert("Switch to Perspetive view first");
return;
}
var cmd = '';
cmd += 'util = System.CreateDO("Clintons3D Package/Utility functions");'
cmd += 'var Cam = Node.Copy("/Preferences/Cameras/Camera", Space.CurrentScene());'
cmd += 'var Win = WindowsManager.GetWorkWindow();'
cmd += 'var ID = Node.Value(Win, "WinID");'
cmd += 'var Eye = "/D3DView/EyeCamera_" + ID;'
cmd += 'Node.Value(Cam, "Matrix") = Node.Value(Eye, "WldMatrix");'
cmd += 'Node.Value(Cam, "FOV") = Node.Value(Eye, "FOV");'
cmd += 'Node.ConRemove(Cam, "LE2Data");'
cmd += 'D3DView.SetActiveCamera(Cam, ID);'
cmd += 'util.SetStatusMessage("Now viewing from the new Camera", 5000);'
RsApp.RunScriptBuffer(cmd);
}
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Final trueSpace7.61 Beta 8 Std Unofficial Update

Post by trueBlue »

I made some improvements for your Select scripts
Select panel.png
Select panel.png (5.57 KiB) Viewed 1940 times
I found another possible Layers Info hidden node that should be excluded!
Layers Info.png
Layers Info.png (1.06 KiB) Viewed 1895 times
Fix for the Alphabetize/Selected Object script so it will not run on a Script
Added a selected count attribute

Runs the NURBStoCPMeshSelection script where needed

Added a Scene button that selects everything that has a WldMatrix con
Note: You can move the whole scene around
The All button runs the None script then the Inverse script

Cameras script starts the Move widget and None script closes the Move widget
Note: Before it was wonky moving multiple selected Cameras with the last selected Camera's widget

Added 3D Groups & 2D Groups scripts

Added a floating panel frame node & Open Panel script

Removed Attachment
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 trueSpace7.61 Beta 8 Std Unofficial Update

Post by clintonman »

trueBlue wrote: 13 Aug 2021, 22:10 ...
Fix for the Alphabetize/Selected Object script so it will not run on a Script
...
Why not alphabetize a script?

I can't test the CPMesh selection stuff since I reverted to the last UU.

I don't see a floating panel so I guess that's a toolbar button change?

It looks like the Search term is the label for the count. That part of the UI needs rearranging.

The new scripts seem to work well. :bananathumb:

NOTE for manual: camera selection don't use the camera widget, move widget is active
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 trueSpace7.61 Beta 8 Std Unofficial Update

Post by clintonman »

trueBlue wrote: 13 Aug 2021, 21:27
clintonman wrote: 13 Aug 2021, 16:01 Attached is a fix for the Cube View widgets CameraFromView script.

It fixes a logic problem and removes the clear history command so undos are not lost.
Removed the many Node.ConRemove(Cam, "LE2Data"); commands and replaced with single util.ConRemove(Cam, "LE2Data")

Just did some tests and camera node is going into the LE in an orderly fashion without the ConRemove. Maybe some UU update makes it not needed?
I updated your Cube widget's CameraFromView to the New unreleased - Eye2Cam.xml so we are in sync

Code: Select all

// 8/13/2021
function Execute(params)
{
var Win = WindowsManager.GetWorkWindow();
var ID = Node.Value(Win, "WinID");
var Eye = "/D3DView/EyeCamera_" + ID;
if (Node.SubObjectCount("/D3DView") == 0) return;
if (!Node.ConExists(Win, "WinID")) return;
if (!Node.Exists("/D3DView/EyeCamera_" + ID)) return;
if (Node.Value(Eye, "CameraType") != 0) {
System.Alert("Switch to Perspetive view first");
return;
}
var cmd = '';
cmd += 'util = System.CreateDO("Clintons3D Package/Utility functions");'
cmd += 'var Cam = Node.Copy("/Preferences/Cameras/Camera", Space.CurrentScene());'
cmd += 'var Win = WindowsManager.GetWorkWindow();'
cmd += 'var ID = Node.Value(Win, "WinID");'
cmd += 'var Eye = "/D3DView/EyeCamera_" + ID;'
cmd += 'Node.Value(Cam, "Matrix") = Node.Value(Eye, "WldMatrix");'
cmd += 'Node.Value(Cam, "FOV") = Node.Value(Eye, "FOV");'
cmd += 'Node.ConRemove(Cam, "LE2Data");'
cmd += 'D3DView.SetActiveCamera(Cam, ID);'
cmd += 'util.SetStatusMessage("Now viewing from the new Camera", 5000);'
RsApp.RunScriptBuffer(cmd);
}
Updated your updated Eye2Cam so it doesn't have repeated code. All is inside the cmd.
The CameraFromView is going away and all will use the Eye2Cam. That's 2 places in the cube widget.
I'm guessing the Cam2Eye scfript is the same as the cube widget SetCameraView, so that will change too.

Code: Select all

// Execute 
// Called to execute the command 
function Execute(params)
{
	var cmd = '';
	cmd += 'util = System.CreateDO("Clintons3D Package/Utility functions");';

	cmd += 'if(Node.SubObjectCount("/D3DView") == 0) return;';

	cmd += 'var workwindow = WindowsManager.GetWorkWindow();';

	cmd += 'if(!Node.ConExists(workwindow,"Def3D")) return;';
	cmd += 'if(Node.Value(workwindow,"Def3D") == "") return;';

	cmd += 'if(!Node.ConExists(workwindow,"View Index")) return;';
	cmd += 'if(Node.Value(workwindow,"View Index") != 0) return;';

	cmd += 'if(!Node.ConExists(workwindow,"WinID")) return;';

	cmd += 'var winid = Node.Value(workwindow,"WinID");';

	cmd += 'if(!Node.Exists("/D3DView/EyeCamera_" + winid)) return;';

	cmd += 'var Eye = "/D3DView/EyeCamera_" + winid;';

	cmd += 'if(Node.Value(Eye,"CameraType") != 0) {';
		cmd += '	System.Alert("Switch to Perspetive view first");';
		cmd += '	return;';
		cmd += '}';

		cmd += 'var Cam = Node.Copy("/Preferences/Cameras/Camera", Space.CurrentScene());';

		cmd += 'Node.Value(Cam,"Matrix") = Node.Value(Eye,"WldMatrix");';
		cmd += 'Node.Value(Cam + "/Camera","ClippingFar") = Node.Value(Eye,"ClippingFar");';
		cmd += 'Node.Value(Cam + "/Camera","ClippingNear") = Node.Value(Eye,"ClippingNear");';
		cmd += 'Node.Value(Cam + "/Camera","Focus") = Node.Value(Eye,"Focus");';
		cmd += 'Node.Value(Cam,"FOV") = Node.Value(Eye,"FOV");';
		cmd += 'Node.Value(Cam + "/Camera","Perspective") = Node.Value(Eye,"Perspective");';

		cmd += 'D3DView.SetActiveCamera(Cam, winid);';

		cmd += 'util.SetStatusMessage("Now viewing from the new camera", 3000);';

		RsApp.RunScriptBuffer(cmd);

}
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 trueSpace7.61 Beta 8 Std Unofficial Update

Post by clintonman »

Cube widget SetCameraView updated
fix some broken code.

new behavior:
will search the scene for cameras inside of groups

full behavior:
if camera is selected, set the view to the camera
if no camera selected find the last camera at the top level of the scene and set the view to it
if still no camera found search inside of group items in the scene for a camera

I thought this was the same as Eye2Cam but it's different. for now I'll plan to place the script inside /Widgets/WidgetScripts and call it from the 2 places inside the cube widget that use it.
Attachments
SetCameraView.RsObj
(6.97 KiB) Downloaded 104 times
Clinton Reese

http://clintons3d.com
Post Reply