|
Tell us what you think of the site.
|
Autodesk Media & Entertainment User Community
|
Autodesk® 3ds Max®
|
|
Autodesk® Maya®
|
|
Autodesk® Softimage®
|
|
Autodesk® MotionBuilder®
|
|
Autodesk® Mudbox™
|
|
Autodesk® ImageModeler™
|
|
Autodesk® Sketchbook® Pro
|
|
Autodesk® Smoke on Mac®
|
|
Hi,
I’m having the most difficult time trying to map an optical set to an actor. Currently i create a new actor in the scene and then when i try to call
actor = FBActor("newbie") actor.MarkerSet.AddMarker(FBBodyNodeId.kFBHipsNodeId, pNode)
it states that their is no member “AddMarker” but there clearly is in the documentation. So i’m basically wondering how i tie the optical set into a marker set then apply the marker set to the actor.
any help is very appreciated,
|
|
|
|
so now i have a marker set created but how do i use FBTVector within the SetMarkerTOffset function...can python access this......I keep getting “FBTVector not defined” when using the following call
markerSet.SetMarkerTOffset(FBBodyNodeId.kFBRightCollarNodeId,0,FBTVector.pTOffset)
|
|
|
|
I would like to add that i know the some of the classes such as the FBTVector can be easily implemented in OR using FBVector3d* but how do i do the equivalent in python?
Thanks again,
|
|
|
|
I am little lazy today (after all its saturday, and in my country 8 pm), and do not want to reproduce all of your FBActor work. Can you check with FBVector4d ? BTW. You make a big mistake, becouse FBTVector is not a FBVector3d!! It’s 4d. So in your function call should look:
markerSet.SetMarkerTOffset(FBBodyNodeId.kFBRightCollarNodeId,0,FBVector4d(0,0,0,0))
Hope will work.
|
|
|
|
ok, thanks. Yeah, as you can see i’m new to this as well as programming in general. It is strange because i get this error and it refers to it as just a FBVector4 which i can’t seem to reference in python and FBVector4d doesn’t seem to be compatible.
“SetMarkerTOffset(class PYFBSDK::FBMarkerSet_Wrapper, enum FBBodyNodeId, int, FBVector4<double>*
Thanks again
|
|
|
|
No problem that you are learning, we all are, so sorry if I was offensive.
Back to your problem. Must say that I am missing something here, or maybe it’s lack of knowledge. Found a workaround for you by direct setting property value. Here is a code:
from pyfbsdk import FBActor, FBMarkerSet, FBModelMarker, FBBodyNodeId, FBVector3d
lActor = FBActor('MyActor') lMarkerSet = FBMarkerSet('MySet') lActor.MarkerSet = lMarkerSet
lModel = FBModelMarker('MyMarker') lModel.Show=True
lMarkerSet.AddMarker(FBBodyNodeId.kFBHipsNodeId,lModel)
#Can't find a way to use this...maybe someone found???
#lMarkerSet.SetMarkerTOffset(FBBodyNodeId.kFBHipsNodeId,0,_missing_FBTVector_)
#Workaround lMarkerSet.PropertyList.Find('Hips1.TOffset').Data = FBVector3d(10,10,50)
# Cleanup. del( lActor, lMarkerSet, lModel ) del( FBActor, FBMarkerSet, FBModelMarker, FBBodyNodeId, FBVector3d )
Hope will help.
|
|
|
|
Great thank you, but i guess i may have not explained exactly what i want to accomplish. In everyday use when i drag an optical node to an actors body node it adds it to the marker set then continues to calculate the current offset. The current offset from the actor T-pose is what i’m trying to get, if i don’t it appears as though the actor doesn’t bind to the optical set correctly. The workaround is great for setting the values...thanks very much. But i would like to get the initial offset of the actor and marker set then apply it like shown in the workaround.
I tried using OR to access HFBTVector and i believe i’m missing something with the syntax.
FBVector4d* _myVec_ cannot read location
FBTVector* doesn’t exist
FBVector4d simply incompatible
Thanks again,
|
|
|
|
I still not sure what you want to do. Can you provide a sample scene with a steps to show me what values you want to read/write?
Also I am little confused on how you want to do this - using python or ORSDK? It is becouse there are no problems with FBTVector in ORSDK.
BTW. I saw you questions in ORSDK, what is the reason of moving to python?
Cheers
|
|
|
|
I’ve also been trying to do this. I’ve managed to write a script that creates an actor and assigns existing models as markers to the Actor. It works in MB 2009, but doesn’t seem to work now in 2011.
This is the error I get:
Traceback (most recent call last):
File "", line 80, in actorbutton1
lMarkerSet.AddMarker(FBBodyNodeId.kFBHipsNodeId,lModel1) Boost.Python.ArgumentError: Python argument types in
FBMarkerSet.AddMarker(FBMarkerSet, FBBodyNodeId, FBModelMarker) did not match C++ signature:
AddMarker(class PYFBSDK::FBMarkerSet_Wrapper {lvalue}, enum ORSDK2011::FBSkeletonNodeId)
AddMarker(class PYFBSDK::FBMarkerSet_Wrapper {lvalue}, enum ORSDK2011::FBSkeletonNodeId, class PYFBSDK::FBModel_Wrapper * __ptr64)
AddMarker(class PYFBSDK::FBMarkerSet_Wrapper {lvalue}, enum ORSDK2011::FBSkeletonNodeId, class PYFBSDK::FBModel_Wrapper * __ptr64, bool)
I’m not sure what has changed between 2009 and 2011 that would stop this working, but unfortunately that error means nothing to me! Any help would be much appreciated
All views/opinions expressed here are my own and do not necessarily reflect those of my company or anyone else in the world
|
|
|
|