Unselectable script

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

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: 5213
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: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

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: 5213
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: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

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: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

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: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

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: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

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: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

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: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

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
Post Reply