Unselectable script

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

Re: Unselectable script

Post by clintonman »

lockMod01.jpg
lockMod01.jpg (43.41 KiB) Viewed 2801 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: 5208
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: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

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: 5422
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: 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: 5208
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: 5422
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: 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 164 times
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: 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: 5208
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: 5208
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: 5422
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: 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
Post Reply