Origin Widgets
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Origin Widgets
Origin indicator on the far left edge of the cube.
This was originally developed to make the workspace NURBS edges a little bit more like handles.
Use the ctrl button plus LMB or RMB on the widget cubes to scale from the origin instead of the center of the selection or object.
PE widget - ctrl + LMB the center sphere to set the origin to the selection.
Installation is not permanent.
The scripts have no safety checks for multiple runs - only run them one time.
Reset default context to remove the changes.
This was originally developed to make the workspace NURBS edges a little bit more like handles.
Use the ctrl button plus LMB or RMB on the widget cubes to scale from the origin instead of the center of the selection or object.
PE widget - ctrl + LMB the center sphere to set the origin to the selection.
Installation is not permanent.
The scripts have no safety checks for multiple runs - only run them one time.
Reset default context to remove the changes.
- Attachments
-
- PE Widget Updater06.RsObj
- (44.83 KiB) Downloaded 171 times
-
- Object Nav Widget Updater05.RsObj
- (40.23 KiB) Downloaded 200 times
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Origin Widgets
Cool, I was wondering if the other widgets could have this Mesh Origin indicator
One little caveat...
When you MMB + Drag the widget's Sphere that moves the widget, the Mesh Origin indicator moves with it
One little caveat...
When you MMB + Drag the widget's Sphere that moves the widget, the Mesh Origin indicator moves with it
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Origin Widgets
trueBlue wrote: 25 Jul 2021, 22:16 Cool, I was wondering if the other widgets could have this Mesh Origin indicator
One little caveat...
When you MMB + Drag the widget's Sphere that moves the widget, the Mesh Origin indicator moves with it
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Origin Widgets
I tried to implement the Ctrl + LMB gesture in the Centered Object Navigation Widget/Boxes minus the Origin object
It is not working
Does it it not support this?
It is not working
Does it it not support this?
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Origin Widgets
It works with lmb and rmb already.trueBlue wrote: 26 Jul 2021, 00:16 I tried to implement the Ctrl + LMB gesture in the Centered Object Navigation Widget/Boxes minus the Origin object
It is not working
Does it it not support this?
Edit: hm maybe something is happening, it does the scale without the ctrl...
Nope it's ok, must have been something else.
Reset default context
made sure the centered nav widget was active
ran the script and it works as expected
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Origin Widgets
Thank you, that did it!clintonman wrote: 26 Jul 2021, 00:27It works with lmb and rmb already.trueBlue wrote: 26 Jul 2021, 00:16 I tried to implement the Ctrl + LMB gesture in the Centered Object Navigation Widget/Boxes minus the Origin object
It is not working
Does it it not support this?
Edit: hm maybe something is happening, it does the scale without the ctrl...
Nope it's ok, must have been something else.
Reset default context
made sure the centered nav widget was active
ran the script and it works as expected
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Origin Widgets
Origin
Exported the Visible aspect of the Static widget controller Mesh Origin
Add
Hide | Show Origin
Exported the Visible aspect of the Static widget controller Mesh Origin
Add
Hide | Show Origin
Code: Select all
if(Node.ConExists("/Widgets/Select/Default object navigation widget/Origin", "Visible")) {
RsTool.ToggleValue("/Widgets/Select/Default object navigation widget/Origin/Visible")
}
if(Node.ConExists("/Widgets/Edit/Point edit widget/Origin", "Visible")) {
RsTool.ToggleValue("/Widgets/Edit/Point edit widget/Origin/Visible")
}
RsTool.Arrow();-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Origin Widgets
Very nice, what does the RsTool.Arrow() do?trueBlue wrote: 26 Jul 2021, 02:07 Origin
Exported the Visible aspect of the Static widget controller
Mesh Origin.png
Mesh Origin
Add
Hide | Show OriginCode: Select all
if(Node.ConExists("/Widgets/Select/Default object navigation widget/Origin", "Visible")) { RsTool.ToggleValue("/Widgets/Select/Default object navigation widget/Origin/Visible") } if(Node.ConExists("/Widgets/Edit/Point edit widget/Origin", "Visible")) { RsTool.ToggleValue("/Widgets/Edit/Point edit widget/Origin/Visible") } RsTool.Arrow();
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Origin Widgets
That is the Object tool command
I used it to refresh the obj widget
I used it to refresh the obj widget
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Origin Widgets
I think I'll skip that part of it.trueBlue wrote: 26 Jul 2021, 03:50 That is the Object tool command
I used it to refresh the obj widget
If you have a group member selected it will be deselected and the group will be selected.
It also exits pe mode.
Maybe you can use
Widgets.ActivateDefaultWidget(); for object
to refresh the widgets
Edit: just did a test and it works. Updates the widget without losing/changing selection. It just needs to only be run in object mode, not pe mode. Nothing needed for pe widget since it updates as soon as you make a new selection.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Origin Widgets
I improved the Show | Hide Origin 'Indicator' scriptclintonman wrote: 26 Jul 2021, 05:04I think I'll skip that part of it.trueBlue wrote: 26 Jul 2021, 03:50 That is the Object tool command
I used it to refresh the obj widget
If you have a group member selected it will be deselected and the group will be selected.
It also exits pe mode.
Maybe you can use
Widgets.ActivateDefaultWidget(); for object
to refresh the widgets
Edit: just did a test and it works. Updates the widget without losing/changing selection. It just needs to only be run in object mode, not pe mode. Nothing needed for pe widget since it updates as soon as you make a new selection.
Can you try this and see if it is a keeper?
Code: Select all
var util = System.CreateDO("Clintons3D Package/Utility functions");
if(Node.ConExists("/Widgets/Select/Default object navigation widget/Origin", "Visible")) {
RsTool.ToggleValue("/Widgets/Select/Default object navigation widget/Origin/Visible")
if(Node.ConExists("/Widgets/Select/Default object navigation widgetONW1/Origin", "Visible"))
RsTool.ToggleValue("/Widgets/Select/Default object navigation widgetONW1/Origin/Visible")
if(Node.ConExists("/Widgets/Select/Default object navigation widgetONW2/Origin", "Visible"))
RsTool.ToggleValue("/Widgets/Select/Default object navigation widgetONW2/Origin/Visible")
if(Node.ConExists("/Widgets/Select/Default object navigation widgetONW3/Origin", "Visible"))
RsTool.ToggleValue("/Widgets/Select/Default object navigation widgetONW3/Origin/Visible")
if(Node.ConExists("/Widgets/Select/Default object navigation widgetONW4/Origin", "Visible"))
RsTool.ToggleValue("/Widgets/Select/Default object navigation widgetONW4/Origin/Visible")
if(!Node.ConExists(Node.Selection(), "Selection"))
Widgets.ActivateDefaultWidget()
}
if(Node.ConExists("/Widgets/Edit/Point edit widget/Origin", "Visible")) {
RsTool.ToggleValue("/Widgets/Edit/Point edit widget/Origin/Visible")
if(Node.ConExists("/Widgets/Edit/Point edit mode widgetPEW1/Origin", "Visible"))
RsTool.ToggleValue("/Widgets/Edit/Point edit mode widgetPEW1/Origin/Visible")
if(Node.ConExists("/Widgets/Edit/Point edit mode widgetPEW2/Origin", "Visible"))
RsTool.ToggleValue("/Widgets/Edit/Point edit mode widgetPEW2/Origin/Visible")
if(Node.ConExists("/Widgets/Edit/Point edit mode widgetPEW3/Origin", "Visible"))
RsTool.ToggleValue("/Widgets/Edit/Point edit mode widgetPEW3/Origin/Visible")
}
if(Node.Value("/Widgets/Edit/Point edit widget/Origin", "Visible") == true) {
util.SetStatusMessage("Origin indicator is Visible", 5000);
if(Node.ConExists(Node.Selection(), "Selection"))
MeshModifiers.InvertSelection('');
MeshModifiers.PeDeselect('');
}
if(Node.Value("/Widgets/Edit/Point edit widget/Origin", "Visible") == false) {
util.SetStatusMessage("Origin indicator is Hidden", 5000);
MeshModifiers.InvertSelection('');
MeshModifiers.PeDeselect('')
}
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Origin Widgets
This one only toggles the active widgets and sets the non-active widgets.trueBlue wrote: 07 Aug 2021, 23:03I improved the Show | Hide Origin 'Indicator' scriptclintonman wrote: 26 Jul 2021, 05:04I think I'll skip that part of it.trueBlue wrote: 26 Jul 2021, 03:50 That is the Object tool command
I used it to refresh the obj widget
If you have a group member selected it will be deselected and the group will be selected.
It also exits pe mode.
Maybe you can use
Widgets.ActivateDefaultWidget(); for object
to refresh the widgets
Edit: just did a test and it works. Updates the widget without losing/changing selection. It just needs to only be run in object mode, not pe mode. Nothing needed for pe widget since it updates as soon as you make a new selection.
Can you try this and see if it is a keeper?One thing though, since this script toggles the "Visible" attribute, all widgets have to be initially in the same stateCode: Select all
var util = System.CreateDO("Clintons3D Package/Utility functions"); if(Node.ConExists("/Widgets/Select/Default object navigation widget/Origin", "Visible")) { RsTool.ToggleValue("/Widgets/Select/Default object navigation widget/Origin/Visible") if(Node.ConExists("/Widgets/Select/Default object navigation widgetONW1/Origin", "Visible")) RsTool.ToggleValue("/Widgets/Select/Default object navigation widgetONW1/Origin/Visible") if(Node.ConExists("/Widgets/Select/Default object navigation widgetONW2/Origin", "Visible")) RsTool.ToggleValue("/Widgets/Select/Default object navigation widgetONW2/Origin/Visible") if(Node.ConExists("/Widgets/Select/Default object navigation widgetONW3/Origin", "Visible")) RsTool.ToggleValue("/Widgets/Select/Default object navigation widgetONW3/Origin/Visible") if(Node.ConExists("/Widgets/Select/Default object navigation widgetONW4/Origin", "Visible")) RsTool.ToggleValue("/Widgets/Select/Default object navigation widgetONW4/Origin/Visible") if(!Node.ConExists(Node.Selection(), "Selection")) Widgets.ActivateDefaultWidget() } if(Node.ConExists("/Widgets/Edit/Point edit widget/Origin", "Visible")) { RsTool.ToggleValue("/Widgets/Edit/Point edit widget/Origin/Visible") if(Node.ConExists("/Widgets/Edit/Point edit mode widgetPEW1/Origin", "Visible")) RsTool.ToggleValue("/Widgets/Edit/Point edit mode widgetPEW1/Origin/Visible") if(Node.ConExists("/Widgets/Edit/Point edit mode widgetPEW2/Origin", "Visible")) RsTool.ToggleValue("/Widgets/Edit/Point edit mode widgetPEW2/Origin/Visible") if(Node.ConExists("/Widgets/Edit/Point edit mode widgetPEW3/Origin", "Visible")) RsTool.ToggleValue("/Widgets/Edit/Point edit mode widgetPEW3/Origin/Visible") } if(Node.Value("/Widgets/Edit/Point edit widget/Origin", "Visible") == true) { util.SetStatusMessage("Origin indicator is Visible", 5000); if(Node.ConExists(Node.Selection(), "Selection")) MeshModifiers.InvertSelection(''); MeshModifiers.PeDeselect(''); } if(Node.Value("/Widgets/Edit/Point edit widget/Origin", "Visible") == false) { util.SetStatusMessage("Origin indicator is Hidden", 5000); MeshModifiers.InvertSelection(''); MeshModifiers.PeDeselect('') }
Does not lose point edit selection.
Reduced time of the point edit widget message. This doesn't work well and I don't think it's even needed really, but 5 seconds was too long for an instantaneous change and if you run it too often(spamming it to turn off and on constantly) only the "hidden" message shows.
Code: Select all
// Execute
// Called to execute the command
function Execute(params)
{
var util = System.CreateDO("Clintons3D Package/Utility functions");
if (Node.ConExists("/Widgets/Select/Default object navigation widget/Origin", "Visible")) {
var isVisible = !Node.Value("/Widgets/Select/Default object navigation widget/Origin", "Visible");
RsTool.ToggleValue("/Widgets/Select/Default object navigation widget/Origin/Visible")
if (Node.ConExists("/Widgets/Select/Default object navigation widgetONW1/Origin", "Visible"))
// RsTool.ToggleValue("/Widgets/Select/Default object navigation widgetONW1/Origin/Visible")
util.SetNodeValueInt("/Widgets/Select/Default object navigation widgetONW1/Origin", "Visible", isVisible);
if (Node.ConExists("/Widgets/Select/Default object navigation widgetONW2/Origin", "Visible"))
// RsTool.ToggleValue("/Widgets/Select/Default object navigation widgetONW2/Origin/Visible")
util.SetNodeValueInt("/Widgets/Select/Default object navigation widgetONW2/Origin", "Visible", isVisible);
if (Node.ConExists("/Widgets/Select/Default object navigation widgetONW3/Origin", "Visible"))
// RsTool.ToggleValue("/Widgets/Select/Default object navigation widgetONW3/Origin/Visible")
util.SetNodeValueInt("/Widgets/Select/Default object navigation widgetONW3/Origin", "Visible", isVisible);
if (Node.ConExists("/Widgets/Select/Default object navigation widgetONW4/Origin", "Visible"))
// RsTool.ToggleValue("/Widgets/Select/Default object navigation widgetONW4/Origin/Visible")
util.SetNodeValueInt("/Widgets/Select/Default object navigation widgetONW4/Origin", "Visible", isVisible);
if (!Node.ConExists(Node.Selection(), "Selection"))
Widgets.ActivateDefaultWidget();
}
if (Node.ConExists("/Widgets/Edit/Point edit widget/Origin", "Visible")) {
isVisible = !Node.Value("/Widgets/Edit/Point edit widget/Origin", "Visible");
RsTool.ToggleValue("/Widgets/Edit/Point edit widget/Origin/Visible")
if (Node.ConExists("/Widgets/Edit/Point edit mode widgetPEW1/Origin", "Visible"))
// RsTool.ToggleValue("/Widgets/Edit/Point edit mode widgetPEW1/Origin/Visible")
util.SetNodeValueInt("/Widgets/Edit/Point edit mode widgetPEW1/Origin", "Visible", isVisible);
if (Node.ConExists("/Widgets/Edit/Point edit mode widgetPEW2/Origin", "Visible"))
// RsTool.ToggleValue("/Widgets/Edit/Point edit mode widgetPEW2/Origin/Visible")
util.SetNodeValueInt("/Widgets/Edit/Point edit mode widgetPEW2/Origin", "Visible", isVisible);
if (Node.ConExists("/Widgets/Edit/Point edit mode widgetPEW3/Origin", "Visible"))
// RsTool.ToggleValue("/Widgets/Edit/Point edit mode widgetPEW3/Origin/Visible")
util.SetNodeValueInt("/Widgets/Edit/Point edit mode widgetPEW3/Origin", "Visible", isVisible);
if (Node.ConExists(Node.Selection(), "Selection")){
MeshModifiers.InvertSelection('');
MeshModifiers.InvertSelection('');
}
if (Node.Value("/Widgets/Edit/Point edit widget/Origin", "Visible") == true) {
// util.SetStatusMessage("Origin indicator is Visible", 5000);
util.SetStatusMessage("Origin indicator is Visible", 2000);
// if (Node.ConExists(Node.Selection(), "Selection"))
// MeshModifiers.InvertSelection('');
// MeshModifiers.PeDeselect('');
}
if (Node.Value("/Widgets/Edit/Point edit widget/Origin", "Visible") == false) {
// util.SetStatusMessage("Origin indicator is Hidden", 5000);
util.SetStatusMessage("Origin indicator is Hidden", 2000);
// MeshModifiers.InvertSelection('');
// MeshModifiers.PeDeselect('')
}
}
}-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Origin Widgets
Much better!
Probably do not need the status message when showing the Origin indicator
Probably do not need the status message when showing the Origin indicator
Code: Select all
//util.SetStatusMessage("Origin indicator is Visible", 2000);

