Open Floating Panel
clintonman
Captain Posts: 5659 Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Open Floating Panel
Post
by clintonman » 29 Feb 2024, 04:33
Script that opens any node as a floating panel with opened panels organized from right to left.
It has one issue in that if the node the panel was created from is deleted the floating panel remains.
There are more options by setting connector values on the script node than shown below, but it can be run like so:
Code: Select all
start = "/Scripts/CustomCommands/OpenFloatingPanel/Start"
Node.Value(start, "TheNode") = full path to the node
Activity.Run(start)
http://clintons3d.com/plugins/truespace ... atingpanel
It uses an updated Global Functions Set
http://clintons3d.com/plugins/truespace ... lfunctions
The only change compared to the UU version is that 1 line was added to the top
clintonman
Captain Posts: 5659 Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Re: Open Floating Panel
Post
by clintonman » 01 Mar 2024, 04:30
Small Update
The script Aspect value was not resetting itself after running, fixed so value is set to 3 after the run
clintonman
Captain Posts: 5659 Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Re: Open Floating Panel
Post
by clintonman » 12 Mar 2024, 02:55
March 11 2024
Updated with modified trueBlue code
When the source node is deleted the floating panel will close
Add check for invalid selection
Is currently limited to 8 automatic closing panels at one time. After the limit is reached an option/warning is given and all subsequent panels will not automatically close when the source node is deleted. I figure 8 is enough but more can be easily added.
clintonman
Captain Posts: 5659 Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Re: Open Floating Panel
Post
by clintonman » 18 Apr 2024, 03:47
April 17 2024
Update
added the ability to open a floating panel at the mouse location relative to the active window
Code: Select all
start = "/Scripts/CustomCommands/OpenFloatingPanel/Start"
Node.Value(start, "TheNode") = full path to the node
Node.Value(start, "AtMouse") = true
Activity.Run(start)
clintonman
Captain Posts: 5659 Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Re: Open Floating Panel
Post
by clintonman » 01 Jul 2024, 23:16
July 1 2024
Update
I discovered that the script will fail to open the panel if the object is open in a le window. This release fixes that problem.
1 line changed in the start script.
Code: Select all
//only open 1 frame window for the object
for(var i=0;i<Node.SubObjectCount(WMS);i++) {
var frame = WMS + "/" + Node.SubObject(WMS, i);
//if(!Node.ConExists(frame, "RootNode")) continue;
if(!Node.ConExists(frame, "RootNode") && Node.Exists(frame + "/Panel Node")) continue;
if(Node.Value(frame, "RootNode") == TheNode) {
params.SetTerminationFlag();
return;
}
}
clintonman
Captain Posts: 5659 Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Re: Open Floating Panel
Post
by clintonman » 02 Jul 2024, 03:50
July 1 2024
Re-Released
Bad code got through QC somehow. The actual working change is
Code: Select all
//only open 1 frame window for the object
for(var i=0;i<Node.SubObjectCount(WMS);i++) {
var frame = WMS + "/" + Node.SubObject(WMS, i);
if(!Node.ConExists(frame, "RootNode")) continue;
//if(Node.Value(frame, "RootNode") == TheNode) {
if(Node.Value(frame, "RootNode") == TheNode && Node.Exists(frame + "/Panel Node")) {
params.SetTerminationFlag();
return;
}
}
clintonman
Captain Posts: 5659 Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Re: Open Floating Panel
Post
by clintonman » 05 Jul 2024, 19:06
Update July 5
new option AllowCopies enables multiple copies of a panel to be open - not used for anything yet
new: if a panel is already open then the aspect of the open panel is updated instead of just stopping - needed for the upcoming NURBS release