Final trueSpace7.61 Beta 8 Std Unofficial Update

User avatar
clintonman
Captain
Posts: 5431
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: 28 Jun 2021, 19:53 @Clinton
How do you use SetNodeValueFloat(str, str, real) ?
I am getting an error

var util = System.CreateDO("Clintons3D Package/Utility functions");
//Node.Value("/Widgets/Select/Camera1/Activation/Automatic activation node", "Widget weight bias") = 2.000
util.SetNodeValueFloat("/Widgets/Select/Camera/Activation/Automatic activation node", "Widget weight bias", 2.000)

I tried this as well
aan = "/Widgets/Select/Camera/Activation/Automatic activation node"
util.SetNodeValueFloat(aan, "Widget weight bias", 1)
var util = System.CreateDO("Clintons3D Package/Utility functions");
//Node.Value("/Widgets/Select/Camera1/Activation/Automatic activation node", "Widget weight bias") = 2.000
util.SetNodeValueFloat("/Widgets/Select/Camera/Activation/Automatic activation node", "Widget weight bias", 2.000)

Works here, value is set and no error. What error are you getting?
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5215
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: 29 Jun 2021, 14:59
trueBlue wrote: 28 Jun 2021, 19:53 @Clinton
How do you use SetNodeValueFloat(str, str, real) ?
I am getting an error

var util = System.CreateDO("Clintons3D Package/Utility functions");
//Node.Value("/Widgets/Select/Camera1/Activation/Automatic activation node", "Widget weight bias") = 2.000
util.SetNodeValueFloat("/Widgets/Select/Camera/Activation/Automatic activation node", "Widget weight bias", 2.000)

I tried this as well
aan = "/Widgets/Select/Camera/Activation/Automatic activation node"
util.SetNodeValueFloat(aan, "Widget weight bias", 1)
var util = System.CreateDO("Clintons3D Package/Utility functions");
//Node.Value("/Widgets/Select/Camera1/Activation/Automatic activation node", "Widget weight bias") = 2.000
util.SetNodeValueFloat("/Widgets/Select/Camera/Activation/Automatic activation node", "Widget weight bias", 2.000)

Works here, value is set and no error. What error are you getting?
ERR Source object: /Widgets/Active Widgets Layer2/Active Widget, 3/Original Camera Widget Switch/Original On Error: Unspecified script error Line: 18, Char: 0 Script text: util.SetNodeValueFloat(aan, "Widget weight bias", 2)

This is the script in whole

Code: Select all

var util = System.CreateDO("Clintons3D Package/Utility functions");
aan = "/Widgets/Select/Camera/Activation/Automatic activation node"
if (Node.Exists("/Widgets/Select/Camera"))
{
//Node.Value("/Widgets/Select/Camera/Activation/Automatic activation node",	"Widget weight bias") = 1.000
util.SetNodeValueFloat(aan, "Widget weight bias", 1)
util.Rename("/Widgets/Select/Camera", "Camera2")
WindowsManager.Activate();
WindowsManager.UpdateWindowsStructure();
Widgets.ActivateDefaultWidget()
}
if (Node.Exists("/Widgets/Select/Camera1"))
{
//Node.Value("/Widgets/Select/Camera1/Activation/Automatic activation node", "Widget weight bias") = 2.000
util.SetNodeValueFloat(aan, "Widget weight bias", 2)
util.Rename("/Widgets/Select/Camera1", "Camera")
WindowsManager.Activate();
WindowsManager.UpdateWindowsStructure();
Widgets.ActivateDefaultWidget()
}
User avatar
clintonman
Captain
Posts: 5431
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 »

...
aan = "/Widgets/Select/Camera/Activation/Automatic activation node"
...
util.Rename("/Widgets/Select/Camera", "Camera2")
Camera no longer exists
...
util.SetNodeValueFloat(aan, "Widget weight bias", 2)

aan uses Camera which was renamed to Camera2 so it fails

I'm guessing you need an aan before the second if
aan = "/Widgets/Select/Camera1/Activation/Automatic activation node"
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5215
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: 29 Jun 2021, 15:57 ...
aan = "/Widgets/Select/Camera/Activation/Automatic activation node"
...
util.Rename("/Widgets/Select/Camera", "Camera2")
Camera no longer exists
...
util.SetNodeValueFloat(aan, "Widget weight bias", 2)

aan uses Camera which was renamed to Camera2 so it fails

I'm guessing you need an aan before the second if
aan = "/Widgets/Select/Camera1/Activation/Automatic activation node"
Thank you!
I ended up doing the renaming later in the script
Strange that the scripts worked before making these changes that use the plugin commands :o
User avatar
trueBlue
Captain
Posts: 5215
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 70 for trueSpace7.61 Beta 8 Standalone Unofficial Update

June 30, 2021

viewtopic.php?f=55&t=3731

Update

Widgets
Object Navigation Widget(s)
CycleNavWidget - Add Clintons3D Package/Utility functions commands

Point Edit Widget(s)
CyclePEWidget - Add Clintons3D Package/Utility functions commands

Camera Widget(s)
CycleCamWidget - Add Clintons3D Package/Utility functions commands

Mesh Origin Author - Clinton Reese 6/26/2021
Modifications

Add status message to all scripts

Add the FreezeScale function in the ApplyRotation script

OpenPanel script
Add
utilitydata = System.CreateDO("Clintons3D Package/Utility functions");
utilitydata.SetFrameRect(openedFrame, newLeft, top, maxStandardPanelWidth, newHeight);

StartWidgetSelect script
Add
if(!Node.ConExists(sel,"WldMatrix")) return;



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
trueBlue
Captain
Posts: 5215
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
Wanting to update the Clintons3dPlugin.xml file that runs from the init.js in the UU7
Does this look correct to you?
I was not able to write it as one Alert which would be better

Code: Select all

function Execute(params)
{
	var warnings = preLoadWarnings()
}

function preLoadWarnings()
{
	var clintons3dview = false;
	var clintons3d = false;

	// check if plugin(s) are Installed and or Loaded
	var xmldoc = new ActiveXObject("Msxml2.DOMDocument.6.0");
	xmldoc.load(System.GetMainDir() + "\\Scripts\\Plugins.xml");

	var doc = xmldoc.documentElement;

	for(var i=0;i<doc.childNodes.length;i++) {

		var child = doc.childNodes.item(i);
		var grandchild = child.childNodes.item(0);
		var NAME = grandchild.getAttribute("NAME");

		if(NAME == "Clintons3D Package") {
			STATUS = grandchild.getAttribute("STATUS");
			if(STATUS != "LOADED") {
				System.Alert("Clintons3dPlugin is Installed, but not Loaded\n\nLoad the Clintons3dPlugin.rsx in the Package Manager and \nRestart trueSpace")
					if(!PackageManager("Project/Windows Manager Space")) {
						WindowsManager.CreateWindowFromCLSID('{3011C160-2294-48d9-AE95-BD144574FB99}', '', '', '', 1)
					}
			}

			VERSION = grandchild.getAttribute("VERSION");
			var verArr = VERSION.split(".")
			var vernum = parseInt(verArr[1]);
			if(vernum < 1638428) {
					if(Question("WARNING !\nClintons3dPlugin v.1638428 or higher is Required\n\nWould you like to download the current\n\nClintons3DPlugin.rsx file?")) {
						RsTool.OpenWebPage("clintons3d.com/plugins/downloads/Clintons3dPlugin.rsx");
					return;
					}
			}

			clintons3d = true;
		}

		if(NAME == "Clintons3d ViewPlugin Package") {
			var STATUS = grandchild.getAttribute("STATUS");
			if(STATUS != "LOADED") {
				System.Alert("Clintons3dView plugin is Installed, but not Loaded\n\nLoad the Clintons3dRsView.rsx in the Package Manager and \nRestart trueSpace")
					if(!PackageManager("Project/Windows Manager Space")) {
						WindowsManager.CreateWindowFromCLSID('{3011C160-2294-48d9-AE95-BD144574FB99}', '', '', '', 1)
					}	
			} 

			clintons3dview = true;
		}

	}

	if(!clintons3d)
		System.Alert("WARNING !\nClintons3D Package plugin is Required!\n\nInstall and Load the Clintons3dPlugin.rsx in the Package Manager and \nRestart trueSpace")
	if(!clintons3d && !PackageManager("Project/Windows Manager Space")) {
		WindowsManager.CreateWindowFromCLSID('{3011C160-2294-48d9-AE95-BD144574FB99}', '', '', '', 1)
	}
	if(!clintons3dview)
		System.Alert("WARNING !\nClintons3dView plugin is Required!\n\nInstall and Load the Clintons3dRsView.rsx in the Package Manager and \nRestart trueSpace")
	if(!clintons3dview && !PackageManager("Project/Windows Manager Space")) {
		WindowsManager.CreateWindowFromCLSID('{3011C160-2294-48d9-AE95-BD144574FB99}', '', '', '', 1)
	}			
	return;
}

function Question(strText)
{
	var nSecondsToWait = -1;
	var strTitle = "Clintons3DPlugin.rsx v.1638428";
	var MB_YESNO = 4;
	var MB_SYSTEMMODAL = 4096;
	var MB_ICONQUESTION = 32;


	var nType = MB_YESNO+MB_SYSTEMMODAL+MB_ICONQUESTION;
	var IDYES = 6;
	var IDNO = 7;

	var shell = new ActiveXObject("WScript.shell");
	var button = shell.Popup (strText, nSecondsToWait, strTitle, nType);

	if(button == IDYES) return true;
	return false;
}

function NodeSubObject(root, index)
{
	return root + "/" + Node.SubObject(root, index);
}

function PackageManager()
{
	var WMS = "Project/Windows Manager Space";
	var numwindows = Node.SubObjectCount(WMS);

	for(var winIndex=0; winIndex < numwindows; winIndex++)
	{
		var currentWindow = NodeSubObject(WMS, winIndex);
		if(Node.SubObjectCount(currentWindow) < 1)
			continue;

		var shortname = Node.ShortName(NodeSubObject(currentWindow, 0));
		if( shortname == "Package View Node")
			return true;
	}
	return false;
}
User avatar
clintonman
Captain
Posts: 5431
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: 02 Jul 2021, 17:13 @Clinton
Wanting to update the Clintons3dPlugin.xml file that runs from the init.js in the UU7
Does this look correct to you?
I was not able to write it as one Alert which would be better

Code: Select all

function Execute(params)
{
	var warnings = preLoadWarnings()
}

function preLoadWarnings()
{
	var clintons3dview = false;
	var clintons3d = false;

	// check if plugin(s) are Installed and or Loaded
	var xmldoc = new ActiveXObject("Msxml2.DOMDocument.6.0");
	xmldoc.load(System.GetMainDir() + "\\Scripts\\Plugins.xml");

	var doc = xmldoc.documentElement;

	for(var i=0;i<doc.childNodes.length;i++) {

		var child = doc.childNodes.item(i);
		var grandchild = child.childNodes.item(0);
		var NAME = grandchild.getAttribute("NAME");

		if(NAME == "Clintons3D Package") {
			STATUS = grandchild.getAttribute("STATUS");
			if(STATUS != "LOADED") {
				System.Alert("Clintons3dPlugin is Installed, but not Loaded\n\nLoad the Clintons3dPlugin.rsx in the Package Manager and \nRestart trueSpace")
					if(!PackageManager("Project/Windows Manager Space")) {
						WindowsManager.CreateWindowFromCLSID('{3011C160-2294-48d9-AE95-BD144574FB99}', '', '', '', 1)
					}
			}

			VERSION = grandchild.getAttribute("VERSION");
			var verArr = VERSION.split(".")
			var vernum = parseInt(verArr[1]);
			if(vernum < 1638428) {
					if(Question("WARNING !\nClintons3dPlugin v.1638428 or higher is Required\n\nWould you like to download the current\n\nClintons3DPlugin.rsx file?")) {
						RsTool.OpenWebPage("clintons3d.com/plugins/downloads/Clintons3dPlugin.rsx");
					return;
					}
			}

			clintons3d = true;
		}

		if(NAME == "Clintons3d ViewPlugin Package") {
			var STATUS = grandchild.getAttribute("STATUS");
			if(STATUS != "LOADED") {
				System.Alert("Clintons3dView plugin is Installed, but not Loaded\n\nLoad the Clintons3dRsView.rsx in the Package Manager and \nRestart trueSpace")
					if(!PackageManager("Project/Windows Manager Space")) {
						WindowsManager.CreateWindowFromCLSID('{3011C160-2294-48d9-AE95-BD144574FB99}', '', '', '', 1)
					}	
			} 

			clintons3dview = true;
		}

	}

	if(!clintons3d)
		System.Alert("WARNING !\nClintons3D Package plugin is Required!\n\nInstall and Load the Clintons3dPlugin.rsx in the Package Manager and \nRestart trueSpace")
	if(!clintons3d && !PackageManager("Project/Windows Manager Space")) {
		WindowsManager.CreateWindowFromCLSID('{3011C160-2294-48d9-AE95-BD144574FB99}', '', '', '', 1)
	}
	if(!clintons3dview)
		System.Alert("WARNING !\nClintons3dView plugin is Required!\n\nInstall and Load the Clintons3dRsView.rsx in the Package Manager and \nRestart trueSpace")
	if(!clintons3dview && !PackageManager("Project/Windows Manager Space")) {
		WindowsManager.CreateWindowFromCLSID('{3011C160-2294-48d9-AE95-BD144574FB99}', '', '', '', 1)
	}			
	return;
}

function Question(strText)
{
	var nSecondsToWait = -1;
	var strTitle = "Clintons3DPlugin.rsx v.1638428";
	var MB_YESNO = 4;
	var MB_SYSTEMMODAL = 4096;
	var MB_ICONQUESTION = 32;


	var nType = MB_YESNO+MB_SYSTEMMODAL+MB_ICONQUESTION;
	var IDYES = 6;
	var IDNO = 7;

	var shell = new ActiveXObject("WScript.shell");
	var button = shell.Popup (strText, nSecondsToWait, strTitle, nType);

	if(button == IDYES) return true;
	return false;
}

function NodeSubObject(root, index)
{
	return root + "/" + Node.SubObject(root, index);
}

function PackageManager()
{
	var WMS = "Project/Windows Manager Space";
	var numwindows = Node.SubObjectCount(WMS);

	for(var winIndex=0; winIndex < numwindows; winIndex++)
	{
		var currentWindow = NodeSubObject(WMS, winIndex);
		if(Node.SubObjectCount(currentWindow) < 1)
			continue;

		var shortname = Node.ShortName(NodeSubObject(currentWindow, 0));
		if( shortname == "Package View Node")
			return true;
	}
	return false;
}
Seems ok.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5215
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 71 for trueSpace7.61 Beta 8 Standalone Unofficial Update

July 2, 2021

viewtopic.php?f=55&t=3731

Hopefully this is the final Update

Widgets
All widget help file scripts
Add
utilitydata = System.CreateDO("Clintons3D Package/Utility functions");
utilitydata.SetFrameRect(openedFrame, newLeft, top, maxStandardPanelWidth, newHeight);
CamAndViewHelp.png
Note: All open from Right to Left
New: Camera, View, and Background widget help files can be opened at the same time
Add Default Context widget's shortcuts to the Background widget help file

tS761 Workspace Shortcut List.rtf

Window.Shortcuts.xml
Removed
Workspace 3D Window
<RS_ACC KEY="ESC" DESC="Object tool/Unselect" GROUP="VIEW3D" COMMAND="RsTool.Arrow();var PVT_LOCKED = 2;RsStackView.RemovePanelsFromCurrSelection(PVT_LOCKED, 0);Space.Unselect();" />

Clintons3dPlugin.xml
Add
Version Check
Clintons3dPlugin v.1638428 or higher is Required


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
trueBlue
Captain
Posts: 5215
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 a new Widget for the UU7 Lights that does not interfere with Point Editing
Ctrl + RB click opens the light's floating panel
Let me know if this works without any interferences
Attachments
Omni.RsObj
(583.42 KiB) Downloaded 118 times
User avatar
clintonman
Captain
Posts: 5431
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: 08 Jul 2021, 14:57 @Clinton
Here is a new Widget for the UU7 Lights that does not interfere with Point Editing
Ctrl + RB click opens the light's floating panel
Let me know if this works without any interferences
That did the trick. :bananathumb:
Clinton Reese

http://clintons3d.com
Post Reply