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: