Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add scene skeletons with python scripting #24

Open
pabloviera15 opened this issue Feb 14, 2022 · 1 comment
Open

How to add scene skeletons with python scripting #24

pabloviera15 opened this issue Feb 14, 2022 · 1 comment

Comments

@pabloviera15
Copy link

pabloviera15 commented Feb 14, 2022

Hello,

Mobu 2022 scenes are being corrupted when saved with "UE - LiveLink", so we are trying to automate the device adding process to save the scenes without the device and easily add it with one click in the scene when needed.

We're trying to automate the streamed object list in Mobu using python2. For each MoCap shooting we have a list of skeletal meshes that are driven by "Optitrack LiveLink" on my Mobu scene, we would like to automate the process of adding the retargeted skeletal meshes to the "UE - LiveLink" device.

We've managed to create a "UE - LiveLink" device via scripting and add it to the scene having the device stored as a variable but haven't been able to add any skeletal mesh as a new object using python, could you please help me find the right function to achieve this? We've been trying to use this function " PropertyAdd( (FBComponent)arg1, (FBProperty)arg2) " but no luck so far.

Here's our code:
#Import required libraries
import pyfbsdk as fb
from pyfbsdk import FBSystem, FBDevice

#Create Live Link device and add to the scene
UeLL = FBCreateObject("Browsing/Templates/Devices","UE - LiveLink", "UE - LiveLink")
fb.FBSystem().Scene.Devices.append(UeLL)

#Here are some of my attempts to add an scene skeleton to the device
#michael is the name of the skeleton in the scene that I'm trying to add
objRig1 = pyfbsdk.FBFindModelByLabelName("michael")
UeLL.PropertyAdd(objRig1.Components, UeLL.PropertyList[1])
UeLL.PropertyAdd(objRig1, 1)
UeLL.PropertyAdd(objRig1, FBModelSkeleton)

I hope someone can help me with this, have a nice one!

P. C.

@klateralus
Copy link

It looks like LiveLink Device doesn't have a python support at all and it should be implemented. I've checked the documentation for this git and sounds doable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants