Skip to content

How to add scene skeletons with python scripting #24

@pabloviera15

Description

@pabloviera15

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions