Unselectable script

free scripts, plugins, models, textures
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Unselectable script

Post by clintonman »

Update to the "unselectable" script used to lock object selections. The new version uses the web ui plugin to deselected locked items when they are selected. The big change is that it locks link editor selections where the old version only locked 3d view selections and it requires the web ui plugin/script to be installed. Still not ideal since it deselects instead of preventing selection in the first place. It's the best that can be done without source code access.

http://clintons3d.com/plugins/truespace ... selectable

Related and required is an update to the web scene view, which processes the selection change events. Locking has been added the the browser based scene view.

http://clintons3d.com/plugins/truespace ... webui.html

Related as well is the workspace layers. Changed to use the new locking and some fixes like camera and spotlights could not be hidden. It also allows items to be hidden and locked at the same time. This requires the web ui plugins/scripts for locking items.

http://clintons3d.com/plugins/truespace ... ayers.html
Clinton Reese

http://clintons3d.com
User avatar
Draise
Captain
Posts: 3200
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia

Re: Unselectable script

Post by Draise »

I still haven't managed to get the Webui system going yet. I'll have to give it another try once I'm done delivering and going into a lull for the end of the year.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

Update June 2020

when unlocking the lock data node is removed
installer clears the recent files list before saving tS state
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: Unselectable script

Post by clintonman »

Update July 2020

reintroduced script based locking based on trueBlue "undo" technique

script based locking works by undo if it finds a locked node in the selection. if you select a several items at once and one is locked the entire selection will revert to it's previous state via undo action. plugin based locking will keep the selection for items that are not locked

if the web server panel is open the internal script based locking will be disabled.
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: Unselectable script

Post by trueBlue »

Have you noticed that if you select an object that has the UnSelectable attribute twice or more, there can be two Object Navigation Widgets?
Even if the other object that has the additional Object Navigation Widget has an UnSelectable attribute!
In the UnDo script, I added:

Code: Select all

RsApp.Undo();
MeshModifiers.ActivateSelectionTool() //<----
break;
This also fixes an issue with the Active attribute unchecking.
IE: If an object that has the UnSelectable attribute is selected before Activating the Undo script

Also with the unlockAll script, I added:

Code: Select all

function Execute(params)
{
	scene = Space.CurrentScene();
Node.Value(System.ThisOwner(), "Active") = 0 //<----
	//recursively search scene and set unlock selection
	ExploreNode(scene);
}
You may also want to reconsider having the scripts located in CustomCommands, where a user could leave it Active!
IMO... It would be safer if it was loaded into a scene!
With an option to have the panel auto load when the scene loads.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 18 Jul 2020, 13:30 Have you noticed that if you select an object that has the UnSelectable attribute twice or more, there can be two Object Navigation Widgets?
Even if the other object that has the additional Object Navigation Widget has an UnSelectable attribute!
In the UnDo script, I added:

Code: Select all

RsApp.Undo();
MeshModifiers.ActivateSelectionTool() //<----
break;
Also with the unlockAll script, I added:

Code: Select all

function Execute(params)
{
	scene = Space.CurrentScene();
Node.Value(System.ThisOwner(), "Active") = 0 //<----
	//recursively search scene and set unlock selection
	ExploreNode(scene);
}
Added inactive to unlock all.

No idea what you're talking about with the 2 object nav widgets. How do you make it happen?
tried it with lockig active and inactive
1. add unselectable attribute
2. select the object twice or more
nothing
1. add multiple unselectable attributes
2. select the object twice or more
nothing
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: Unselectable script

Post by trueBlue »

Yeah I can not seem to replicate that issue that I saw this morning.
But it did happen.
Did you notice the other issue:
This also fixes an issue with the Active attribute unchecking.
IE: If an object that has the UnSelectable attribute is selected before Activating the Undo script
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Unselectable script

Post by trueBlue »

Okay try this:
Select an object that has an UnSelectable attribute
Activate the UnDo script
Rectangle select multiple objects in the LE
Results:
The Undo Active checkbox unchecks.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

Mis-posted before.
Meant to say Added inactive to unlock, not "Added inactive to unlock all."

Why is it needed for unlock all?

"You may also want to reconsider having the scripts located in CustomCommands, where a user could leave it Active!"
Not gonna recode the rsx plugin for the web server to look in the scene. It takes much more work to make rsx changes and I'm just not willing to put in the time.
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: Unselectable script

Post by clintonman »

Ok, I'm confusing myself. Here are the untested changes I've made.

Unlock All

Code: Select all

Node.Value(System.ThisOwner(), "Active") = false;

Undo

Code: Select all

			if (Node.ConExists(sel, "UnSelectable") && Node.Value(sel, "UnSelectable")) {

				RsApp.Undo();

				//below needed for case:
				// 1. selected object is locked and unselectable is inactive then
				// 2. unselectable is activated and the same object is selected - no real selection change so will undo the activation
				Node.Value(System.ThisOwner(), "Active") = true;

				break;
			}
LockIt

Code: Select all

var validSelection = false;

	if(num < 1) return;

	for(i=0;i<num;i++)
	{
		cursel = Node.SelectionGetAt(sel,i);
		System.Trace(cursel);
		//valid scene object
		if(Node.ConExists(cursel,"WldMatrix"))
		{
			//copy selection locking node if does not exist
			if(!Node.ConExists(cursel,"UnSelectable"))
			{
				newnode = Node.Copy(owner + "/selectionLocking",cursel);
				Node.ExportConnector(newnode, "UnSelectable", "", 1, 1);			
			}

			Node.Value(cursel,"UnSelectable") = true;
			validSelection = true;
		}
	}
	
	if(validSelection)
		Space.Unselect();
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: Unselectable script

Post by trueBlue »

clintonman wrote: 18 Jul 2020, 14:52 Mis-posted before.
Meant to say Added inactive to unlock, not "Added inactive to unlock all."

Why is it needed for unlock all?

"You may also want to reconsider having the scripts located in CustomCommands, where a user could leave it Active!"
Not gonna recode the rsx plugin for the web server to look in the scene. It takes much more work to make rsx changes and I'm just not willing to put in the time.
Just makes sense that you uncheck Active if all of the scene objects do not have the attribute.
And for safety purposes too!
I am not sure what effect it would have with your plugin.
I am only referring to running it with your toolbar icon.
IE: Separately from the Workspace Layers

For an example try this:
viewtopic.php?t=5536
It has been updated with your code and with my modifications
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 18 Jul 2020, 14:50 Okay try this:
Select an object that has an UnSelectable attribute
Activate the UnDo script
Rectangle select multiple objects in the LE
Results:
The Undo Active checkbox unchecks.
I tested my changes mentioned above and they fix this problem.
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: Unselectable script

Post by clintonman »

trueBlue wrote: 18 Jul 2020, 15:01
clintonman wrote: 18 Jul 2020, 14:52 Mis-posted before.
Meant to say Added inactive to unlock, not "Added inactive to unlock all."

Why is it needed for unlock all?

"You may also want to reconsider having the scripts located in CustomCommands, where a user could leave it Active!"
Not gonna recode the rsx plugin for the web server to look in the scene. It takes much more work to make rsx changes and I'm just not willing to put in the time.
Just makes sense that you uncheck Active if all of the scene objects do not have the attribute.
And for safety purposes too!
I am not sure what effect it would have with your plugin.
I am only referring to running it with your toolbar icon.
IE: Separately from the Workspace Layers

For an example try this:
viewtopic.php?t=5536
It has been updated with your code and with my modifications
Like I said before I was getting confused, by making changes and at the same time adding your changes.

The effect it would have on the plugin would be to break... wait a minute... hmm, maybe it will work...
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: Unselectable script

Post by clintonman »

Gotta leave now. Here's what I have so far.
It uses a different method for the popup that doesn't use timers.

untested
-
Attachments
unSelectabled559.RsObj
(49.89 KiB) Downloaded 204 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: Unselectable script

Post by trueBlue »

Seems to work.
Personally I would like the UI to be as small as possible
Save As.png
Save the unSelectable,RsObj in the scene somewhere around the top or left
Save the selectionLocking.RsObj location too
Add
Node.Delete(Space.CurrentScene() + "/unSelectable,1")
Node.Delete(Space.CurrentScene() + "/unSelectable, 1")
In the RemoteCommand script
Create a button that will Close / Open the panel
Toolbar icon
LMB = Node.Copy("Scripts/CustomCommands/unSelectable", Space.CurrentScene());
RMB = UserInterface.OpenToolPanelViewEx2("" , "" ,"/Scripts/CustomCommands/unSelectable", 4, 1, 0);
Attachments
unSelectablee866.RsObj
(49.26 KiB) Downloaded 214 times
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

July 23 2020 Update

script loaded into the scene
automatic floating panel when loading
various trueBlue fixes previously discussed

LMB - copy script and open window or just open window if script is already in the scene
RMB - opens window in the side panel if the script is already in the scene


http://clintons3d.com/plugins/truespace ... selectable
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: Unselectable script

Post by clintonman »

Update Sept 21:

Unselectable script has the option of using a new widget based locking mechanism.

This should be an improvement over the undo command used internally and doesn't need an extra process to be running like the web ui window option. There is no undo or deselecting so it should work well with all processes and scripts.

http://clintons3d.com/plugins/truespace ... table.html

To use the new locking requires update to the Clintons3dPlugin file. Overwriting the file with the new version doesn't work because the xml file associated with the plugin won't update to indicate the new version was loaded.
Uninstall the old rsx plugin, restart truespace then install the new version.
The script checks the version of the installed plugin by reading the xml file, if it's not new enough then the new widget won't be used.

If you reset to default context then the widget would need to be re-enabled.
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: Unselectable script

Post by trueBlue »

Widget Based Locking is not working for me when selecting an unSelectable object in the Link Editor
Seems to work in 3D only
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 22 Sep 2020, 18:33 Widget Based Locking is not working for me when selecting an unSelectable object in the Link Editor
Seems to work in 3D only
Right, widgets only work in the 3D view. It works great for me since the 3D view is the only place I want to lock things. If you want to lock LE items I think the widget is compatible with the internal unselectable scripts.
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: Unselectable script

Post by trueBlue »

I have been stumped a couple of times yesterday and today using, as you call, "Widget Base Locking"
It is not clear that you need to Lock the objects first using the Default aspect!
Suggest you give a better explanation on how to use this.
Maybe a better name like, "Update Select Widget" or something?
And add the Lock, UnLock, and UnLock All buttons to the Widget aspect?
Would it be possible to add code to your plugin, to check that the UnSelectable script exist in the scene and if it does not stop execution?

Widget Base Locking seems to suggest that you are using the widget to Lock objects, which is what I was trying to do.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 23 Sep 2020, 18:24 ...
Would it be possible to add code to your plugin, to check that the UnSelectable script exist in the scene and if it does not stop execution?
...
Can you rephrase 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: Unselectable script

Post by trueBlue »

Code: Select all

if(!Node.Exists(Space.CurrentScene() + "/unSelectable")) {
return;
}
What I was thinking , that maybe your modifications to the Select widget could be permanent.
Meaning, if possible, your Selection locked widget only works if your plugin and the unSelectable script exist.

Been testing your Selection locked widget with other scripts and activities, and it seems to work great.
Can not think of any reason not to remove the Selection Change Event/Undo portion.
UnSelectable.png
UnSelectable.png (7.13 KiB) Viewed 2900 times
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 23 Sep 2020, 20:55

Code: Select all

if(!Node.Exists(Space.CurrentScene() + "/unSelectable")) {
return;
}
What I was thinking , that maybe your modifications to the Select widget could be permanent.
Meaning, if possible, your Selection locked widget only works if your plugin and the unSelectable script exist.

Been testing your Selection locked widget with other scripts and activities, and it seems to work great.
Can not think of any reason not to remove the Selection Change Event/Undo portion.
UnSelectable.png
No, I don't see how that could be possible. The widget based on the plugin would have to look at itself to see if the plugin it's based on is installed. circular so it's a no go.
Agreed, no reason to remove the Undo style unselect.
I've noted your earlier suggestions and I think I'll also change the toolbar button to also lock the selected item(s) instead of just opening the panel.
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: Unselectable script

Post by trueBlue »

The RSXcheck is not working
If it is Uninstalled, no Alerts and does not update the Select widget portion

Incorporated your new UnSelectable scripts (Update Select Widget portion only) into Workspace Layers 3 and removed the Selection Change Event/Undo.
Seems to be working! :D
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 24 Sep 2020, 18:42 The RSXcheck is not working
...
Did you see this part?
"To use the new locking requires update to the Clintons3dPlugin file. Overwriting the file with the new version doesn't work because the xml file associated with the plugin won't update to indicate the new version was loaded.
Uninstall the old rsx plugin, restart truespace then install the new version.
The script checks the version of the installed plugin by reading the xml file, if it's not new enough then the new widget won't be used."
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: Unselectable script

Post by trueBlue »

I did read it.
So why does the Alert not work?
System.Alert("Clintons3D plugin v.1638419 or higher is required. Widget locking is disabled until the plugin is updated.");
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

OK, I see, you uninstalled the plugin.

add an alert before the final return false in the RSXcheck function
RSXcheck is working, just not giving an error message.
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: Unselectable script

Post by trueBlue »

That works, thanks!
Wonder why the Alert did not work?
Could it be because of the v in the xml file
VERSION="v.1638419"
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

It looks for the plugin in the xml file.
If it finds it it checks that it is loaded, if not error message.
Then it checks the version number is high enough, if not then error message
if it doesn't find it at all then it gives the new/missing error message.

The purpose of RSXcheck is to make sure everything is good with the plugin, the error messages are just a bonus, so to speak.
Important thing is if the rsx file doesn't have the unselectable code then the widget would break and make it impossible to select anything in the 3d view. The combination of RSXcheck and the emergency restore is there to prevent any unforeseeable "permanent" damage.
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: Unselectable script

Post by trueBlue »

I was not testing the version part correctly.
It does work as expected.
Thanks!
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Unselectable script

Post by trueBlue »

Not sure how your new plugin based locked code works or what it looks for to make an object unselectable.
If you Flatten an object that has the selectionLocking node, the selectionLocking node is removed but the exported UnSelectable attribute is not removed.
Even though the UnSelectable attribute exist, it is selectable with your plugin.
Is your plugin code looking for the selectionLocking node?
If so, maybe it would be better if it worked like your WebView works.
Edit:
The lock can be removed by either disabling the locking on the internal script or web ui window. For web ui locking, the lock can also be removed by select the locked node and uncheck the "UnSelectable" checkbox in the panel view.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 26 Sep 2020, 14:32 Not sure how your new plugin based locked code works or what it looks for to make an object unselectable.
If you Flatten an object that has the selectionLocking node, the selectionLocking node is removed but the exported UnSelectable attribute is not removed.
Even though the UnSelectable attribute exist, it is selectable with your plugin.
Is your plugin code looking for the selectionLocking node?
If so, maybe it would be better if it worked like your WebView works.
It looks for the node, I'll see what I can do.
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: Unselectable script

Post by clintonman »

Made the change. The next version of the plugin will check for the "UnSelectable" connector and read it's value, checked is locked, unchecked is unlocked.
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: Unselectable script

Post by trueBlue »

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

Re: Unselectable script

Post by clintonman »

Updated Unselectable Script and a new corresponding rsx plugin has been released.

http://clintons3d.com/plugins/truespace ... table.html

http://clintons3d.com/plugins/truespace ... index.html

Uses a new style of locking. The old way was to export the UnSelectable connector from inside the object. Lights and cameras did not show the exported connector. The new style exports the node aspect, so the locking state for lights and cameras can be seen.
The new scripts are backward compatible with the old style and the new rsx plugin v.1638420 will also work with both new and old styles of locking.

Altered the UI to be more in line with the Unofficial Update version of the script.
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: Unselectable script

Post by trueBlue »

Notice you are no longer exporting the UnSelectable attribute.
As reported, Flattening an object removes the selectionLocking node and it no longer works with your UnSelectable scripts and your Workspace Layers 3
Workspace Layers 3 does export the UnSelectable attribute.
I suspect that your Web UI is not going to work with Checking/Unchecking the missing exported UnSelectable attribute.

Not sure why you would want to keep the Selection Change Event/Undo given the conflict with other Selection Change Event activities. :shock:
Your plugin base option is far superior! :worship:
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

Thanks for the heads up. I thought the flatten problem was part of the update, I guess I missed 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: Unselectable script

Post by trueBlue »

clintonman wrote: 30 Sep 2020, 15:04 Thanks for the heads up. I thought the flatten problem was part of the update, I guess I missed it.
The flatten problem is fixed in your plugin.
Made the change. The next version of the plugin will check for the "UnSelectable" connector and read it's value, checked is locked, unchecked is unlocked.
The problem now is, you are no longer exporting the UnSelectable attribute in the Lock script

Also Workspace Layers 3 does not add a selectionLocking node if the object has an Unselectable attribute. Still works though.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

lightLockExported.jpg
lightLockExported.jpg (37.24 KiB) Viewed 3013 times
Stack view: The light is locked and the connector has been exported. Can't tell if it's locked.
Can go to the link editor to the expanded aspect to see the lock and uncheck it.

lightLockNotExported.jpg
lightLockNotExported.jpg (38.55 KiB) Viewed 3013 times
Stack view: The light aspect is exported so can tell if item is locked and can uncheck to unlock it.
If the connector is exported as well then it can be seen but not changed, link editor only way to get to it.

I'm exporting the node aspect instead of exporting the connector so the locking state can be seen on cameras and lights.

Disadvantage is that flattening a locked object loses the lock. The lock was either removed or overridden to select the locked item and flatten it, so it shouldn't be a problem to just lock it again after flattening.
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: Unselectable script

Post by trueBlue »

Thank you for the explanation.
There is a solution to support your new way and Locked objects that have been Flattened.
Add a On/Off button with an assigned boolean to the selectionLocking node.
selectionLocking button.png
selectionLocking button.png (10.42 KiB) Viewed 3010 times
Script on Up - Deactivate

Code: Select all

Node.ConRemove("%THIS_OWNER_NAME%", "UnSelectable")
Node.Value("%THIS_NAME%", "UnSelectable") = 0
Node.ExportConnector("%THIS_NAME%", "UnSelectable", "", 1, 1)
Script on Down - Activate

Code: Select all

Node.ConRemove("%THIS_OWNER_NAME%", "UnSelectable")
Node.Value("%THIS_NAME%", "UnSelectable") = -1
Node.ExportConnector("%THIS_NAME%", "UnSelectable", "", 1, 1)
Lock script
Change Node.ConExists to Node.Exists, add Node.ConRemove, and add Node.ExportConnector

Code: Select all

			//copy selection locking node if does not exist
			//if(!Node.ConExists(cursel,"UnSelectable"))
			if(!Node.Exists(cursel +"/selectionLocking"))
			{
				Node.ConRemove(cursel, "UnSelectable")
				newnode = Node.Copy(owner + "/selectionLocking",cursel);
				Node.ExportConnector(newnode, "UnSelectable", "", 1, 1);			
			}
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

lockMod01.jpg
lockMod01.jpg (43.41 KiB) Viewed 3513 times
Not perfect, but it works.
After flattening only the connector remains, so the exported panel disappears.
I had to swap the up and down scripts to get it to work. Removed the checkbox because the button takes care of it. Changed up text is "Unlocked" and down text is "Locked".
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: Unselectable script

Post by trueBlue »

Remove the checkbox?
I think your plugin honors the checkbox, checked or unchecked.

The default state of the selectionLocking node in your UnSelectable scripts is Unlocked
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

But the checkbox doesn't honor the code in the button, so button replaces it.

Edit:
Maybe your button isn't connected to the UnSelectable value? Mine is linked to it.
Last edited by clintonman on 04 Oct 2020, 16:27, edited 1 time in total.
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: Unselectable script

Post by clintonman »

trueBlue wrote: 04 Oct 2020, 16:15 ...

The default state of the selectionLocking node in your UnSelectable scripts is Unlocked
Yep, already fixed 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: Unselectable script

Post by trueBlue »

clintonman wrote: 04 Oct 2020, 16:22 But the checkbox doesn't honor the code in the button, so button replaces it.

Edit:
Maybe your button isn't connected to the UnSelectable value? Mine is linked to it.
Correct, it is not linked to the UnSelectable attribute and is assigned to a new boolean, UnLock_Lock.
I changed the text to Up = UnLock and Down = Lock
This matches the UI, Lock and Unlock

For backwards compatibility, it might be necessary to delete the unSelectable node in the scene, in order to replace it in an existing scene
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 04 Oct 2020, 16:40 ...

For backwards compatibility, it might be necessary to delete the unSelectable node in the scene, in order to replace it in an existing scene
Good point.
Attached is the node I plan to use.
Attachments
selectionLocking.RsObj
(8.59 KiB) 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: Unselectable script

Post by clintonman »

Untested check for and remove old version:

Added to the Lockit and the RMB scripts.

Code: Select all

//check for old version and remove it
if(Node.Exists(Space.CurrentScene() + "/unSelectable") && !Node.ConExists(Space.CurrentScene() + "/unSelectable", "Source")) {
	Node.Delete(Space.CurrentScene() + "/unSelectable");
}
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: Unselectable script

Post by trueBlue »

clintonman wrote: 04 Oct 2020, 16:58
trueBlue wrote: 04 Oct 2020, 16:40 ...

For backwards compatibility, it might be necessary to delete the unSelectable node in the scene, in order to replace it in an existing scene
Good point.
Attached is the node I plan to use.
That works too.
I am going to add Space.Unselect() to the Down script
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Unselectable script

Post by trueBlue »

clintonman wrote: 04 Oct 2020, 17:14 Untested check for and remove old version:

Added to the Lockit and the RMB scripts.

Code: Select all

//check for old version and remove it
if(Node.Exists(Space.CurrentScene() + "/unSelectable") && !Node.ConExists(Space.CurrentScene() + "/unSelectable", "Source")) {
	Node.Delete(Space.CurrentScene() + "/unSelectable");
}
I'll wait for your official update and add it to the unofficial updates. :mrgreen:
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 04 Oct 2020, 17:18
clintonman wrote: 04 Oct 2020, 16:58
trueBlue wrote: 04 Oct 2020, 16:40 ...

For backwards compatibility, it might be necessary to delete the unSelectable node in the scene, in order to replace it in an existing scene
Good point.
Attached is the node I plan to use.
That works too.
I am going to add Space.Unselect() to the Down script
Right, I was going to ask you about that, but forgot. I'll do the same.
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: Unselectable script

Post by trueBlue »

clintonman wrote: 04 Oct 2020, 17:24
trueBlue wrote: 04 Oct 2020, 17:18
clintonman wrote: 04 Oct 2020, 16:58
Good point.
Attached is the node I plan to use.
That works too.
I am going to add Space.Unselect() to the Down script
Right, I was going to ask you about that, but forgot. I'll do the same.
Correction
I am going to add Space.Unselect() to the Up script
I would also suggest creating an Enable/Disable button that gives indication of it's present state
Enable ONOff button.png
Enable ONOff button.png (11.65 KiB) Viewed 3247 times
The Close button insures the widget is restored to it's original state

Code: Select all

Node.Value("%THIS_NAME%", "Enable") = 0
Node.ConReset('%THIS_NAME%/Enable', 'Active_Out')
Activity.Run("Scripts/CustomCommands/unSelectable/DeactivateWidgetLocking");
Node.Delete('%THIS_NAME%')
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

unselectableInconsistency.jpg

I got it to work and tested it, but I don't like it. I don't like the checkbox and the on/off button both being available and the lights and cameras don't have the same look as meshes because of the exported connector.

Attached is the final work on this version in case you want it for the unofficial updates. My final version won't have the exported connector.

Also I don't see the unselectable widget as something that is turned off and on on a regular basis. I see it as enable one time and forget it.

If you do make the enable button an on/off button you will need to check whether the widget is active/installed or not each time the panel is opened and you will need to update the widget nodes based on a loaded scene unselectable script state. So if the scene was saved disabled you need to deactivate the widget, and if the scene was saved enabled then you need to activate the widget. Right now there's nothing in the code that really does that. It can be done, just takes some work.
Attachments
UnSelectable UnOfficial Update.RsObj
(181.49 KiB) Downloaded 199 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: Unselectable script

Post by trueBlue »

There is another possibility
Do not export the UnSelectable boolean attribute
Create the UnSelectable attribute as a string
Untested, but you could even create it as hidden
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 05 Oct 2020, 02:17 There is another possibility
Do not export the UnSelectable boolean attribute
Create the UnSelectable attribute as a string
Untested, but you could even create it as hidden
I don't understand how that would work and isn't removing the export the opposite of what you wanted because of the flattening process?
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: Unselectable script

Post by trueBlue »

Flattening an object that has an UnSelectable string does not remove the connector
Your plugin does not support it currently.
If your plugin supported the UnSelectable string, as in, if it exist, it would be locked.
Several earlier UnSeletable projects did in fact use the UnSelectable string
I believe you were the first to use a UnSelectable boolean
Seems in theory, both the UnSelectable boolean and string could both work together
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 05 Oct 2020, 03:38 Flattening an object that has an UnSelectable string does not remove the connector
Your plugin does not support it currently.
If your plugin supported the UnSelectable string, as in, if it exist, it would be locked.
Several earlier UnSeletable projects did in fact use the UnSelectable string
I believe you were the first to use a UnSelectable boolean
Seems in theory, both the UnSelectable boolean and string could both work together
Not seeing/understanding it and not really hearing anything to make me think it's all worth it just to protect the locked state of flattened meshes.
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: Unselectable script

Post by trueBlue »

There is two reasons why this should be supported with your new plugin and UnSelectable scripts.
1.) Flattening objects removes your selectionLocking node
2.) Backwards compatibility...
In the current Unofficial Update(s), your Workspace Layers 3's menuprocessor script has the following:
//copy selection locking node if does not exist
if(!Node.ConExists(thenode,"UnSelectable"))

I totally agree that your new way supporting Lights and Cameras is needed!
I also agree that exporting the UnSelectable attribute from the selectionLocking node is undesirable.

Seems simple really to add support for the above.
Clintons3dPlugin.rsx
Add
if(Node.ConExists(Node.Selection(), "UnSelectable") || Node.Exists(Node.Selection() + "/selectionLocking"))
{
System.Alert("One or the other exist!")
//Replace Alert with code here
}
Note:
I was not able to write/include the needed check for:
&& Node.Selection() + "/selectionLocking","UnSelectable") = true;
Additionally
You could add the selectionLocking node if it does not exist and the UnSelectable attribute exist

Lock script
Add one more line
Node.ConCreate(Node.Selection(), "UnSelectable", "string", 4);

UnLock and UnLockAll script
Add one more line
Node.ConRemove(Node.Selection(),"UnSelectable");
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

Flatten objects - still don't care

Workspace layers 3 - didn't know it's not working since I thought I made the last release compatible
From the last release
"supports old and new style locking - old exported connector, new exported node aspect"

Not sure what this refers to "I was not able to write/include the needed check for:
&& Node.Selection() + "/selectionLocking","UnSelectable") = true;"

Lock and Unlock still adding and removing connections that don't show on lights or cameras. So not sure what that solves.
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: Unselectable script

Post by trueBlue »

One other suggestion
RemoteCommand
Add check for the Selection locked widget
if(!Node.Exists("Widgets/Edit/Default context/Select/Selection locked widget"))
System.Alert("Widget based locking is Disabled")
//Replace Alert with code here
Activity.Run(System.ThisOwner() + "/ActivateWidgetLocking")
{
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Unselectable script

Post by trueBlue »

clintonman wrote: 05 Oct 2020, 15:36 Lock and Unlock still adding and removing connections that don't show on lights or cameras. So not sure what that solves.
if(Node.ConExists(Node.Selection(), "UnSelectable") || !Node.Exists(Node.Selection() + "/selectionLocking"))
{
Activity.Run(Space.CurrentScene() + "/unSelectable/lockIt")
}
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Unselectable script

Post by trueBlue »

clintonman wrote: 05 Oct 2020, 15:36 Workspace layers 3 - didn't know it's not working since I thought I made the last release compatible
From the last release
"supports old and new style locking - old exported connector, new exported node aspect"
Have not tested your new version
Seems like another reason to update your plugin to support "old exported connector" which it currently does not.
Backwards compatibility!
Your Workspace Layers has been out since Dec 2011
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 05 Oct 2020, 16:02 One other suggestion
RemoteCommand
Add check for the Selection locked widget
if(!Node.Exists("Widgets/Edit/Default context/Select/Selection locked widget"))
System.Alert("Widget based locking is Disabled")
//Replace Alert with code here
Activity.Run(System.ThisOwner() + "/ActivateWidgetLocking")
{
I'll add the similar code found in the lockit script to the RemoteCommand and RMB scripts.
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: Unselectable script

Post by clintonman »

trueBlue wrote: 05 Oct 2020, 16:22
clintonman wrote: 05 Oct 2020, 15:36 Lock and Unlock still adding and removing connections that don't show on lights or cameras. So not sure what that solves.
if(Node.ConExists(Node.Selection(), "UnSelectable") || !Node.Exists(Node.Selection() + "/selectionLocking"))
{
Activity.Run(Space.CurrentScene() + "/unSelectable/lockIt")
}
What does that mean in English?
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: Unselectable script

Post by clintonman »

trueBlue wrote: 05 Oct 2020, 16:43 ...
Seems like another reason to update your plugin to support "old exported connector" which it currently does not.
...
I thought it did.
From the website, "altered lock selection widget to look at the node and the node conn value as well as looking at the exported conn value"

Can you give me some steps so I can fix 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: Unselectable script

Post by trueBlue »

clintonman wrote: 05 Oct 2020, 16:56
trueBlue wrote: 05 Oct 2020, 16:43 ...
Seems like another reason to update your plugin to support "old exported connector" which it currently does not.
...
I thought it did.
From the website, "altered lock selection widget to look at the node and the node conn value as well as looking at the exported conn value"

Can you give me some steps so I can fix it?
Add a 3D Object
Create the UnSelectable string to that 3D object
Node.ConCreate(Node.Selection(), "UnSelectable", "string", 4);
Enable your plugin widget
It is still selectable in the 3D View
Again suggesting you add this to your plugin
if(Node.ConExists(thenode,"UnSelectable"))
User avatar
trueBlue
Captain
Posts: 5548
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Unselectable script

Post by trueBlue »

clintonman wrote: 05 Oct 2020, 16:54
trueBlue wrote: 05 Oct 2020, 16:22
clintonman wrote: 05 Oct 2020, 15:36 Lock and Unlock still adding and removing connections that don't show on lights or cameras. So not sure what that solves.
if(Node.ConExists(Node.Selection(), "UnSelectable") || !Node.Exists(Node.Selection() + "/selectionLocking"))
{
Activity.Run(Space.CurrentScene() + "/unSelectable/lockIt")
}
What does that mean in English?
Fix for a Flattened object
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 05 Oct 2020, 17:21
clintonman wrote: 05 Oct 2020, 16:56
trueBlue wrote: 05 Oct 2020, 16:43 ...
Seems like another reason to update your plugin to support "old exported connector" which it currently does not.
...
I thought it did.
From the website, "altered lock selection widget to look at the node and the node conn value as well as looking at the exported conn value"

Can you give me some steps so I can fix it?
Add a 3D Object
Create the UnSelectable string to that 3D object
Node.ConCreate(Node.Selection(), "UnSelectable", "string", 4);
Enable your plugin widget
It is still selectable in the 3D View
Again suggesting you add this to your plugin
if(Node.ConExists(thenode,"UnSelectable"))
So this is to make it compatible with the 2011 version of locking? If so I'm ok with breaking compatibility with something that old.
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: Unselectable script

Post by trueBlue »

clintonman wrote: 05 Oct 2020, 17:29
trueBlue wrote: 05 Oct 2020, 17:21
clintonman wrote: 05 Oct 2020, 16:56
I thought it did.
From the website, "altered lock selection widget to look at the node and the node conn value as well as looking at the exported conn value"

Can you give me some steps so I can fix it?
Add a 3D Object
Create the UnSelectable string to that 3D object
Node.ConCreate(Node.Selection(), "UnSelectable", "string", 4);
Enable your plugin widget
It is still selectable in the 3D View
Again suggesting you add this to your plugin
if(Node.ConExists(thenode,"UnSelectable"))
So this is to make it compatible with the 2011 version of locking? If so I'm ok with breaking compatibility with something that old.
Is there a problem adding this support (in Bold) to your plugin?
if(Node.ConExists(Node.Selection(), "UnSelectable") || Node.Exists(Node.Selection() + "/selectionLocking"))
{
System.Alert("One or the other exist!")
//Replace Alert with code here
}
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 05 Oct 2020, 17:37
clintonman wrote: 05 Oct 2020, 17:29
trueBlue wrote: 05 Oct 2020, 17:21
Add a 3D Object
Create the UnSelectable string to that 3D object
Node.ConCreate(Node.Selection(), "UnSelectable", "string", 4);
Enable your plugin widget
It is still selectable in the 3D View
Again suggesting you add this to your plugin
if(Node.ConExists(thenode,"UnSelectable"))
So this is to make it compatible with the 2011 version of locking? If so I'm ok with breaking compatibility with something that old.
Is there a problem adding this support (in Bold) to your plugin?
if(Node.ConExists(Node.Selection(), "UnSelectable") || Node.Exists(Node.Selection() + "/selectionLocking"))
{
System.Alert("One or the other exist!")
//Replace Alert with code here
}
Yes there is. making changes to a plugin is a massive pain in the butt. I need a clear explanation of what you're requesting. You said you want compatibility with old code, then give me new never before seen code, so it sounds like you're asking for something new. The code is also given out of context so I don't know where it lives or what it is supposed to accomplish. I need it to be 100% clear before I even think about touching the plugin code.
In English, no code, what exactly do you want the plugin code to do? You may have said so 10 or 20 posts back, don't be afraid to repeat yourself.
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: Unselectable script

Post by trueBlue »

Sorry did not realize the problems with making a plugin!

Plain and simple.
I am suggesting that your plugin support any objects that have an UnSelectable attribute, be none selectable for backwards compatibility.

There is two possibilities that can exist with older scenes that have 3D objects, lights, and cameras with Unselectable attributes.
This includes scenes that have your Workspace Layers.
One is a string and the other is a boolean.
UnSelectable Attributes.png
UnSelectable Attributes.png (12.42 KiB) Viewed 3060 times
I have tested both successfully with a script that checks for the UnSelectable attribute and it does not mater if it is a string or boolean.
As said, flattening an object removes your selectionLocking node but does not remove the UnSelectable attribute.
The reason I am suggesting a string, it does not interfere with your new way supporting lights and cameras and being able to check or uncheck.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

So you're asking for the plugin widget to treat an object that has an UnSelectable string connector/attribute as locked and if no connector exists then it's treated as unlocked?
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: Unselectable script

Post by trueBlue »

clintonman wrote: 05 Oct 2020, 19:34 So you're asking for the plugin widget to treat an object that has an UnSelectable string connector/attribute as locked and if no connector exists then it's treated as unlocked?
I do not know how your plugin works, but that sounds like what it should do additionally to what it does currently.
When I brought this up previously before your last plugin update, I suggested it worked like the Workspace Layers 3 did.
I would be really curious to see, if the UnSelectable string connector was created as "hidden", everything would still work.
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

trueBlue wrote: 05 Oct 2020, 22:42
clintonman wrote: 05 Oct 2020, 19:34 So you're asking for the plugin widget to treat an object that has an UnSelectable string connector/attribute as locked and if no connector exists then it's treated as unlocked?
I do not know how your plugin works, but that sounds like what it should do additionally to what it does currently.
When I brought this up previously before your last plugin update, I suggested it worked like the Workspace Layers 3 did.
I would be really curious to see, if the UnSelectable string connector was created as "hidden", everything would still work.
Yep, it will be in addition to what the plugin already does. This mod is pretty much for you since I don't expect to be using that part of it.
I think I can have the change in by tonight.
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: Unselectable script

Post by trueBlue »

Here is the script I used to test a hidden connector

Code: Select all

//Node.ConCreate(Node.Selection(), "UnSelectable", "string", 1);		//1 = hidden	4 = visible
//Node.ConRemove(Node.Selection(), "UnSelectable")
if(Node.ConExists(Node.Selection(), "UnSelectable")) {
System.Alert("Yep")
}
User avatar
clintonman
Captain
Posts: 5659
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California

Re: Unselectable script

Post by clintonman »

OK, change to the plugin is done. New plugin version 1638421. Good luck :bananathumb:

You can pick it up here:
http://clintons3d.com/plugins/truespace ... index.html
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: Unselectable script

Post by clintonman »

Update October 2020

updated the Unofficial Update backup node to match the new Unofficial Update release
bug: default locking node to a locked state
don't run if object is in point edit mode
will replace the old version of the script in the scene
new unlock button - the shortcuts of "L" and "U" can be assigned to the buttons
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: Unselectable script

Post by clintonman »

I just found a limitation of the locking widget.
If you place a locked object inside an unlocked group it will still be selectable.
I don't see any way around it. The command used in the plugin can see the top object, the group or another command can see the bottom object but then not be aware of the group.

So to lock objects inside of groups activate the "Use old script based locking" checkbox in the notes tab of the panel.
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: Unselectable script

Post by clintonman »

I found a solution to the group locking problem and it's working in an unreleased revision of the rsx plugin. I'll update this post when it is released.
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: Unselectable script

Post by clintonman »

Update to the plugin has been released.
Fixes the problem of locked children of groups being selectable.
To select a group that has some items locked you click on one of the unlocked members of the group.

The old plugin worked by looking at the top group item only, so it was possible to select locked children.
The new way is that the plugin looks at the bottom child and works it's way up the heirachy until it finds a lock or the scene level is reached. If it reaches the scene then it's not locked.

new plugin version v.1638424

http://clintons3d.com/plugins/truespace ... index.html
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: Unselectable script

Post by clintonman »

Update Aug 28 2021

Updates Edit/Default context/Select to support NURBS selection to control point mesh selection conversion
alt-click object no longer bypasses the NURBS selection to control point mesh selection conversion process
lock, unlock and unlock all coded for single undo
enable/disable single undo style code replaces clear history for widget modifications
updated the installer for latest toolbars - list from trueBlue
locking is applied to the NURBS node instead of it's control point mesh - matches the workspace layers 4 locking behavior

http://clintons3d.com/plugins/truespace ... table.html
Clinton Reese

http://clintons3d.com

Return to “Repositorium”