Key Pivot Tool

Plugins linking to this thread: (hide)

Key Pivot ToolAuthor: Constantine Tarasenkov
SI has a pivot transformations that can be keyed without using a Center operator. The awkward thing for me is that this is done by changing the parameters values from the ppg window and translation of the pivot happens relatively to local transformation matrix of the object. So I wrote this handy little script that allow you to just pick a position in space that would be a new pivot center of the current frame.

For usage details and downloads, see the si-community thread linked below.

local backup: keyPivotTool.zip

Post Reply
iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Key Pivot Tool

Post by iamVFX » 08 Mar 2012, 23:22

SI has a pivot transformations that can be keyed without using a Center operator. The awkward thing for me is that this is done by changing the parameters values from the ppg window and translation of the pivot happens relatively to local transformation matrix of the object. So I wrote this handy little script that allow you to just pick a position in space that would be a new pivot center of the current frame

Code: Select all

xsi = Application

frame = xsi.GetValue("PlayControl.Current")

pivot = xsi.PickPosition("Set new pivot position and key it", "Remove key on the current frame")

if pivot[0] == 1:

	v3 = XSIMath.CreateVector3(pivot[1],pivot[2],pivot[3])
	m4x4 = XSIMath.CreateMatrix4()
	obj = xsi.Selection[0]
	obj.Kinematics.Global.Transform.GetMatrix4(m4x4)

	m4x4.Invert(m4x4)

	v3.MulByMatrix4InPlace(m4x4)

	x, y, z = 0, 0, 0
	x, y, z = v3.Get(x, y, z)

	xsi.SetValue("*.kine.local.pposx", x)
	xsi.SetValue("*.kine.local.pposy", y)
	xsi.SetValue("*.kine.local.pposz", z)
	xsi.SavePivotKey(["*"], "siTrn", frame)
	xsi.RotationTool()

elif pivot[0] == 2:
	try:
		xsi.RemoveKey("*.kine.local.pposx,*.kine.local.pposy,*.kine.local.pposz,*.kine.local.pcposx,*.kine.local.pcposy,*.kine.local.pcposz", frame)
	except:
		pass

User avatar
myara
Posts: 403
Joined: 28 Sep 2011, 10:33

Re: Key Pivot Tool

Post by myara » 23 Mar 2012, 07:48

Softimage has an unbinded command in the Keyboard Mapping that let's you move the pivot.

It's called Edit Transform Tool Pivot in the Transform Tool group.

There is also a Transform Tool Pivot(alternate), but It seems to do the same.
M.Yara
Character Modeler | Softimage Generalist (sort of)

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: Key Pivot Tool

Post by iamVFX » 23 Mar 2012, 17:13

Edit Transform Tool Pivot is a temporary way to move pivot position (same as holding ALT button). My script works directly with pivot kinematic values under local transforms of the object and key them for animation purposes (imagine a rolling cube, for example, which changes its point of rotation with time)

User avatar
myara
Posts: 403
Joined: 28 Sep 2011, 10:33

Re: Key Pivot Tool

Post by myara » 24 Mar 2012, 09:01

Oh , now I get it!!
Nice tool !
M.Yara
Character Modeler | Softimage Generalist (sort of)

Haimund
Posts: 29
Joined: 29 Mar 2013, 01:24

Re: Key Pivot Tool

Post by Haimund » 06 Jun 2014, 08:11

Hi, this is a great tool. But why it applies to everything in the scene?
Can you help??

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests