10、DG

1.DG是dependency graph,我认为是依赖图,和DAG(有向无环图)的区别:DAG用来作场景管理,每一个node表明的不是tranform就是shape,有父子关系。node

DG是表明了每一个实体节点之间的相互关系,经过plug,从output到input,再在每一个DG节点中,对数据进行存储和计算,这样一种数据结构。数据结构

Dependency graph nodes are used for almost everything in Maya such as model creation, deformation, animation, simulation, and audio processing.app

Most objects in Maya are dependency graph nodes, or networks of nodes (several nodes connected together). For example, DAG nodes are dependency graph nodes, and shaders are networks of nodes.动画

When dependency graph nodes are connected together they can affect DAG nodes and thus affect what is rendered.ui

2. this

例子:lua

如图的DAG hierarchy包含了一个DG节点time, transform1, transform2, transform3,sphere是DAG节点,一样也是DG节点。spa

transform3的scale x, y, z,被time驱动。即time的输出,连接到transform3的输入,当动画播放的时候,sphere的两个实体,会变化。code

 

3,dirty的传导机制,当一个dg节点的输入变化的时候,他的输出被mark成dirty,而后他链接到的属性被mark成dirty,一直传导。orm

例如refresh,系统要walk down DAG,对每一个DAG节点进行检查,看是否须要re-evaluate(by checking if any plugs on it are dirty).

 

4. Node states.

MPxNode::state

 

5. Base dependency node classes:

(1)MPxNode: include ::compute()

(2)MPxLocatorNode: 让你能够在场景中绘制三维图形,能够用于定义没有shape的实体在空间中的位置。例如灯光。

(3)MPxGeometryFilter: 能够接受一个geometry shape做为输入,而后deform它。

          ::deform(),  ::accessoryAttribute(), ::accessoryNodeSetup().

MPxDeformerNode:The MPxDeformerNode class specializes MPxGeometryFilter to handle per-vertex weight lists.

MPxBlendShape: MPxSkinCluster

6.MPxIkSolverNode:  ::doSolve()

7.MPxFieldNode:  lets you define your own dynamic field to affect other geometry in the scene.  动态场???不理解啊

8.MPxEmitterNode: Emitters are nodes which emit particles in to a Maya scene. 粒子发射器。MPxFluidEmitterNode

9.MPxSpringNode: 弹簧节点 ::applySpringLaw()

10.MPxObjectSet: 

11.MPxHwShaderNode:allows the creation of user-defined hwShaders.

12.MPxTransform: allows the creation of user defined transform nodes. They are designed to be an extension of the standard Maya transform node and include all of the normal transform attributes. 

13. MPxImagePlane:allows the creation of new types of image plane nodes. 

14.MPxParticleAttributeMapperNode:

15.MPxConstrait:

16. MPxManipulatorNode/MPxManipContainer: viewport当中的与用户交互用。鼠标事件的处理。

17.MPxSurfaceShape/MPxComponentShape: If you need to create a new kind of shape primitive, you will need to create a new class that derives from MPxSurfaceShape orMPxComponentShape, which will be used to represent instances of your geometry within the scene hierarchy and the dependency graph. 

18. MPxAssembly:

19.MPxCameraSet:Maya treats custom nodes that you derive from this class like the built-in cameraSet node. You can derive a new class fromMPxCameraSet if you need to customize the way Maya handles your camera layers for stereo viewing.

20. MPxMotionPathNode:  if you need to customize the way that Maya evaluates the input animation curve in order to computes and apply new position and orientation values to an animated object moving along a path.See the class description and the motionPathNode/motionPathNode.cpp example for details.

21. MPxPolyTrg: This is the base class for nodes that define a custom face triangulation algorithm for meshes.

22. MPxThreadedDeviceNode/MPxClientDeviceNode: 

相关文章
相关标签/搜索