Unselectable script

free scripts, plugins, models, textures
User avatar
trueBlue
Captain
Posts: 2878
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?f=31&t=5536
It has been updated with your code and with my modifications

clintonman
Captain
Posts: 3453
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:
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

clintonman
Captain
Posts: 3453
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:
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?f=31&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

clintonman
Captain
Posts: 3453
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

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
unSelectable.RsObj
(49.89 KiB) Downloaded 6 times
Clinton Reese

http://clintons3d.com

User avatar
trueBlue
Captain
Posts: 2878
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
unSelectable.RsObj
(49.26 KiB) Downloaded 3 times

clintonman
Captain
Posts: 3453
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

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

clintonman
Captain
Posts: 3453
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

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: 2878
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

clintonman
Captain
Posts: 3453
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:
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: 2878
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.

Post Reply