PDA

View Full Version : Ref modes


so_hi
11-17-2002, 11:03 PM
Hello all

I have been searching for the scripts for these commands

http://members.shaw.ca/murkworks/content/images/refmodes.gif


so I can make them into hotkeys.

I also would settle for a tool bar with them as buttons.

I posted this on Xsi base already and got something close
but not quite.

here is the scripts if anyone would like to debug them.

Dim l_pickedstr
ActivateRaycastPolySelTool
PickElement "Point", "Pick Point Reference",,l_pickedstr
SetTransientReferencePlane l_pickedstr


Dim l_pickedstr
ActivateRaycastPolySelTool
PickElement "Edge", "Pick Edge Reference",,l_pickedstr
SetTransientReferencePlane l_pickedstr

Dim l_pickedstr
ActivateRaycastPolySelTool
PickElement "Polygon", "Pick Polygon Reference",,l_pickedstr
SetTransientReferencePlane l_pickedstr

The problem with the scripts is it switches your selection to the
type of reference selection. Example: I have a point selected,
I want to ref a poly I run the poly ref script and the picking
is fine but, it changes my selection to my previously poly selection.

I thought it had to do with line "ActivateRaycastPolySelTool "
it sets to the poly component selection mask, but I am
confused on what command to use.

Any help on this would be greatly appreiciated.

Thanks in advance.

ggg
11-17-2002, 11:29 PM
'transform pick point ref tool,
'dragndrop one of these. hope it helps/works, graham,
'--------------
set selected = GetValue( "SelectionList" )
set myinitiallyselectedobject = getvalue(selected(0))

'your script here
ActivateRaycastPolySelTool
PickElement "Point", "Pick Point Reference",,l_pickedstr
SetTransientReferencePlane l_pickedstr

selectobj myinitiallyselectedobject
SetUserPref "3D_TRANSFO_REFERENTIAL_CHANGED", 3
'---------------

or

'transform pick edge ref tool
'--------------
set selected = GetValue( "SelectionList" )
set myinitiallyselectedobject = getvalue(selected(0))

'your script here
ActivateRaycastPolySelTool
PickElement "Edge", "Pick Edge Reference",,l_pickedstr
SetTransientReferencePlane l_pickedstr


selectobj myinitiallyselectedobject
SetUserPref "3D_TRANSFO_REFERENTIAL_CHANGED", 3
'---------------

or

'transform pick poly ref tool
'--------------
set selected = GetValue( "SelectionList" )
set myinitiallyselectedobject = getvalue(selected(0))

'your script here
Dim l_pickedstr
ActivateRaycastPolySelTool
PickElement "Polygon", "Pick Polygon Reference",,l_pickedstr
SetTransientReferencePlane l_pickedstr


selectobj myinitiallyselectedobject
SetUserPref "3D_TRANSFO_REFERENTIAL_CHANGED", 3
'---------------

added: and to be clean I should dim some stuff at top of each

so_hi
11-17-2002, 11:42 PM
Thanks Graham

That addition is really close. Don't get me wrong it
works. The one minor detail that is basically insiginificant
is you lose your selection in the other component mode,
it is replaced with your reference selection. I can live with that
though.

Thanks again. :thumbsup:

E.

ggg
11-17-2002, 11:54 PM
too fast :rolleyes: this below will do multi selection, wasn't thinking, you don't need to be specifc about your initial selection item

'transform pick poly ref
'hope it helps, graham
'--------------
set selected = GetValue( "SelectionList" )

'put your script here
Dim l_pickedstr
ActivateRaycastPolySelTool
PickElement "Polygon", "Pick Polygon Reference",,l_pickedstr
SetTransientReferencePlane l_pickedstr


selectobj selected
SetUserPref "3D_TRANSFO_REFERENTIAL_CHANGED", 3
'---------------

'transform pick edge ref tool
'--------------
set selected = GetValue( "SelectionList" )

'your script here
ActivateRaycastPolySelTool
PickElement "Edge", "Pick Edge Reference",,l_pickedstr
SetTransientReferencePlane l_pickedstr


selectobj selected
SetUserPref "3D_TRANSFO_REFERENTIAL_CHANGED", 3
'---------------

etc

so_hi
11-18-2002, 12:02 AM
That does it.

There are some goofy display issues but it
seems to work fine.

I think you need a few of these.

:bowdown: :bowdown: :bowdown: :bowdown: :bowdown: :bowdown:

Thanks Again, uh again?

E.

CGTalk Moderation
01-13-2006, 09:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.