十一、Manipulators

本文详细介绍了Maya中操纵器(Manipulators)的功能与使用方法,包括自由点三面操纵器(FreePointTriadManip)和方向操纵器(DirectionManip)。此外还探讨了如何通过MPxManipContainer创建操纵器容器,并定义从操纵器到属性的关联。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. Manipulators是可以用三维进行绘制的的节点,可以将用户行为值化,对其他节点的属性进行modify。

2. 属性值可以通过Channel Box 和Graph Editor进行修改。同其他的dg节点不一样,manipulator直接修改属性值,而不通过plug。

3.可以用以下几种方法是用manipulator:

Create a manipulator on any node in the current scene at any time.

Create and assign a manipulator for a specific type of object.

Create a context tool and associate the manipulator to the context tool. Whenever the context tool is active, the manipulator becomes active and ready for use.

 

4. 所有的manipulator的function set都是从MFnManip3D派生而来。

(1)FreePointTriadManip: 

 

The FreePointTriadManip provides a point that can be moved anywhere. It has axes for constrained x, y, and z movement and obeys grid snapping, point snapping, and curve snapping.

(2)DirectionManip:

.....详情见document

 

 

5 Manipulator Containers:

(1)

通过MPxManipContainer创建Manipulator container. 

可以将base manipulators加入到container。

定义从manipulator到attribute的联系。

(2)必要的几个方法:

creator(), initialize(), createChildren(), connectToDependNode()

你也可以通过重写draw函数来自定义manipulator的绘制。

(3)initialize()

静态函数需要注册的。进行一些必要的初始化。

(4)createChildren()

base manipulator加到container里面是通过这个函数的,例子:

MStatus moveManip::createChildren()
{
    ...
    
    fDistanceManip = addDistanceManip(manipName, distanceName);
    fFreePointManip = addFreePointTriadManip(pointManipName,  pointName);

    ...        
}

The MPxManipContainer class provides a set of member functions to add individual base manipulators, most of them are named as addXYZManip, where XYZ represents the manipulator name

 

转载于:https://www.cnblogs.com/bubbler/p/5176628.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值