脚本与 Python API

MQFace · 面

本页目录
  1. 属性
  2. 方法
  3. getCoord(index)
  4. setCoord(index, coord)
  5. getChannelCoord(index, channel)
  6. setChannelCoord(index, channel, coord)
  7. getColor(index)
  8. setColor(index, color)
  9. getAlpha(index)
  10. setAlpha(index, alpha)
  11. getEdgeCrease(index)
  12. setEdgeCrease(index, crease)

MQFace 保存对象中一个面的信息。

属性#

读取(get) 写入(set) 类型 名称 说明
x long id 唯一 ID
x int numVertex 顶点数量
x list<int> index 顶点索引列表
x list<MQCoordinate> coord UV 坐标列表
x list<MQColor> color 顶点颜色列表
x list<float> alpha 顶点 Alpha 值列表
x list<float> crease 边折痕列表
[0] 无折痕
[1] crease
x x int material 材质索引
x x int select 选择状态
[0] 未选中
[1] 已选中

方法#

成员 说明
getCoord 获取顶点的 UV 坐标。
setCoord 设置顶点的 UV 坐标。
getChannelCoord 获取顶点在指定通道中的 UV 坐标。
setChannelCoord 设置顶点在指定通道中的 UV 坐标。
getColor 获取顶点颜色。
setColor 设置顶点颜色。
getAlpha 获取顶点的 Alpha 值。
setAlpha 设置顶点的 Alpha 值。
getEdgeCrease 获取边折痕。
setEdgeCrease 设置边折痕。

getCoord(index)#

获取顶点的 UV 坐标。

参数:
int index - 顶点索引
返回值:
MQCoordinate - 坐标

setCoord(index, coord)#

设置顶点的 UV 坐标。

参数:
int index - 顶点索引
MQCoordinate coord - 坐标

getChannelCoord(index, channel)#

获取顶点在指定通道中的 UV 坐标。

参数:
int index - 顶点索引
int channel - UV 通道 ID
返回值:
MQCoordinate - 坐标

setChannelCoord(index, channel, coord)#

设置顶点在指定通道中的 UV 坐标。

参数:
int index - 顶点索引
int channel - UV 通道 ID
MQCoordinate coord - 坐标

getColor(index)#

获取顶点颜色。

参数:
int index - 顶点索引
返回值:
MQColor - 顶点颜色

setColor(index, color)#

设置顶点颜色。

参数:
int index - 顶点索引
MQColor color - 顶点颜色

getAlpha(index)#

获取顶点的 Alpha 值。

参数:
int index - 顶点索引
返回值:
float - Alpha 值

setAlpha(index, alpha)#

设置顶点的 Alpha 值。

参数:
int index - 顶点索引
float alpha - Alpha 值

getEdgeCrease(index)#

获取边折痕。

参数:
int index - 顶点索引
返回值:
float - 边折痕
[0] 无折痕
[1] 有折痕

setEdgeCrease(index, crease)#

设置边折痕。

参数:
int index - 顶点索引
float crease - 边折痕
[0] 无折痕
[1] 有折痕
输入关键词,查找手册中的内容。