actorpivots1

The script should be run with the selected geometry of the actor (who does not know to do that, press Spacebar + Right mouse button on the actor Hips geometry model). The output will be a set of cubes with the name and position of the relevant part of the actor.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from pyfbsdk import*

# model list for selected objects

modelList = FBModelList()

FBGetSelectedModels( modelList )

# get current actor (MUST be setUp)

lActor = FBApplication().CurrentActor

for obj in modelList:

  newName = obj.Name

  newName = newName.replace( "ActorBodyMesh", "skeleton" )

  lCubeHead = FBModelCube( newName )

  lCubeHead.Show = True

  # get global position of each object

  pos = FBVector3d()

  obj.GetVector( pos )

  lCubeHead.SetVector( pos )

  del( newName, lCubeHead, pos, obj )

# cleanup

del( lActor, modelList )
How to… Extract actor pivots
Tagged on:             

Leave a Reply

Your email address will not be published. Required fields are marked *