Unselectable script

free scripts, plugins, models, textures
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: 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: 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: 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: 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: 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: 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: 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: 5208
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: 5208
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: 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: 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: 5208
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: 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: 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: 5208
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 2420 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.
Post Reply