Hotkeys for referances

Discussions regarding modelling with SOFTIMAGE©
Post Reply
Talik
Posts: 56
Joined: 09 May 2017, 11:13
Skype: nihao00042

Hotkeys for referances

Post by Talik » 12 May 2017, 13:09

Hello.
I want to make hotkeys for these selecting tools. Pick point/edge/polygon referance. Probably I will need to make a script button for it. When I use these tools there is in no code in script editor to make a script button.
Attachments
Скриншот 2017-05-12 13.48.28.png
Скриншот 2017-05-12 13.48.28.png (14.85 KiB) Viewed 1823 times

User avatar
mc_axe
Posts: 415
Joined: 12 Mar 2013, 18:44

Re: Hotkeys for referances

Post by mc_axe » 12 May 2017, 18:48

Im no good in scripting so i cant write the script exactly, but you need a script that:
Enables pick session (stores selected object and selected point )

and then applies

SetTransientReferencePlane("selected object.selected point");

User avatar
Grubber
Posts: 165
Joined: 22 Jun 2009, 21:11
Location: Vilnius, Lithuania

Re: Hotkeys for referances

Post by Grubber » 12 May 2017, 20:47

I am no good with scripting too, but these jscripts are working for me:

Code: Select all

var selectPoint = PickElement( "point", "Select point", "Select point" );
var point = selectPoint.Value("PickedElement");
SetTransientReferencePlane(point);

Code: Select all

var selectEdge = PickElement( "edge", "Select edge", "Select edge" );
var edge = selectEdge.Value("PickedElement");
SetTransientReferencePlane(edge);

Code: Select all

var selectPolygon = PickElement( "polygon", "Select polygon", "Select polygon" );
var polygon = selectPolygon.Value("PickedElement");
SetTransientReferencePlane(polygon);
Would be nice to set component manipulation mode to Ref via script as well. Maybe someone knows how to do it.

CYTE
Posts: 33
Joined: 05 Sep 2015, 07:55

Re: Hotkeys for referances

Post by CYTE » 13 May 2017, 19:26

You can set Transform to Reference with:

Application.SetTransformRefMode(3)

This is the python script version.
Cheers
CYTE

Talik
Posts: 56
Joined: 09 May 2017, 11:13
Skype: nihao00042

Re: Hotkeys for referances

Post by Talik » 13 May 2017, 20:07

Thank you guys! You're amasing!

How to pick these tools on screenshot? For easier use I need an ability to pick referance after selecting polygons/edges/points that I want to transform.

User avatar
Grubber
Posts: 165
Joined: 22 Jun 2009, 21:11
Location: Vilnius, Lithuania

Re: Hotkeys for referances

Post by Grubber » 14 May 2017, 08:47

CYTE wrote:You can set Transform to Reference with:

Application.SetTransformRefMode(3)

This is the python script version.
Cheers
CYTE
I found JScript version of this:

Code: Select all

SetUserPref("3D_TRANSFO_REFERENTIAL_CHANGED", 3);

Talik
Posts: 56
Joined: 09 May 2017, 11:13
Skype: nihao00042

Re: Hotkeys for referances

Post by Talik » 03 Sep 2017, 12:15

Guys thanks for replies. I need exactly these buttons for purpose. The difference is that these buttons have a picker to pick point/edge/poly referance. I can select polies edges or points and set the transformation axes after. Very handy.
Attachments
Скриншот 2017-09-03 13.06.14.jpg
Скриншот 2017-09-03 13.06.14.jpg (58.89 KiB) Viewed 1301 times

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests