BipedPlus API (Beta) / API Reference / Scene

build()

下载 Markdown

完整构建,和界面上的 Build 做同一件事。空场景也可以,会一并创建 Biped。结束后返回 rig。失败则抛出 RuntimeError。

签名

api.build(**params) -> rig

常用写法:

rig = api.build(height_cm=170, engine_type="unreal")

没写的参数用下面的默认值。

参数 默认 说明
engine_type "unreal" "unreal" 或 "unity"
biped_style "human" Biped 样式
height_cm 170 身高,厘米。小于等于 0 是 ValueError。True/False 是 TypeError
spine_count 3 脊柱
neck_count 1 脖子
leg_links 3 腿链接。4 是反向关节。双膝始终是 3
arm_twist_seg 3 手臂分段 1 到 5
leg_twist_seg 3 腿分段。双膝只能是 2、3、5
fingers 5 手指数量
finger_links 3 手指关节数
double_knee False 双膝。True 时 knee_type 必须是 "None"
hip_type "None" 髋部附加
tail_type "None" 尾巴
knee_type "None" 小腿修正。和双膝一起开会 ValueError
elbow_type "None" 肘部修正
upperarm_type "None" 上臂修正
prop_1 prop_2 prop_3 False 道具。必须是 True/False
create_rig_info True 创建 INFO 节点
com 无 场景里已有两个以上 Biped 时的名字

开关只能是 True 或 False。表里没有的名字会 TypeError。反向关节用 leg_links=4。没有 horse_link 这个参数。

已有两个以上 Biped

场景里已经有两个以上 Biped 时,传入 com="Bip001" 这样的名字,或先选中要用的 Biped 再调用。两样都没有会 ValueError。

双膝

rig = api.build(height_cm=170, leg_twist_seg=5, double_knee=True)

leg_twist_seg 只能是 2、3、5。4 会在构建中途停下。

示例

from os_bipedPlus import openAPI

api = openAPI()
rig = api.build(height_cm=165, engine_type="unity", spine_count=4)
print(rig.com)

💬

Need help with the API?

Open a support ticket or join the community discussion.

联系支持