通过Python设置Vicon流设备

2024-06-25 23:00:37 发布

您现在位置:Python中文网/ 问答频道 /正文

我想在Motionbuilder 2017中使用python设置Vicon流媒体设备。在

Vicon Stream Device | Download Page

from pyfbsdk import*

app = FBApplication()
scene = FBSystem().Scene

# Find the device
viconStreamingDevice = FBCreateObject( 'Browsing/Templates/Devices','Vicon Stream Device', "Vicon Stream Device")

# Import the device to the current file
scene.Devices.append(viconStreamingDevice)

# Execute the Device?
# ...

当我从“资源浏览器”中单击\拖动设备到场景中时,它会正常工作。如果我使用上面的python脚本,设备会出现在场景中,但是不能正常工作。下面的图片显示了当我选择设备时导航器的样子。在

Vicon Stream Device | Click\Drag Into Scene

Vicon Stream Device | Python Script

设备信息丢失,“模型绑定:”变灰。此外,场景变得非常脆弱,运行脚本后很快就会崩溃。在

单击\拖动和使用上面的python脚本有什么区别?有没有办法使用python将Vicon流媒体设备导入Motionbuilder?在


回答下面的信息(基于Paul Boots的建议)

最后我手动初始化了这个设备,并将它连接到我打开的一个Vicon Shogun会话。我将设备设为离线并保存了文件。我需要在我的设备下面的代码合并到我的设备。在

^{pr2}$

Tags: the脚本信息streamdownloaddevice场景scene