summaryrefslogtreecommitdiffstats
path: root/tools/trackeditor/code/nodes/NU.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/trackeditor/code/nodes/NU.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/trackeditor/code/nodes/NU.h b/tools/trackeditor/code/nodes/NU.h
new file mode 100644
index 0000000..d43db8f
--- /dev/null
+++ b/tools/trackeditor/code/nodes/NU.h
@@ -0,0 +1,34 @@
+#include "precompiled/PCH.h"
+
+#ifndef NODE_UTIL_H
+#define NODE_UTIL_H
+
+namespace NODE_UTIL
+{
+ inline void DisableAttributes( MObject& node, bool justY = true )
+ {
+ MFnDagNode fnDagNode( node );
+
+ MObject parent = fnDagNode.parent( 0 );
+ MFnDependencyNode fnParent( parent );
+
+ if ( justY )
+ {
+ MPlug ptyPlug = fnParent.findPlug( MString( "translateY" ) );
+ ptyPlug.setLocked( true );
+ }
+ else
+ {
+ MPlug ptPlug = fnParent.findPlug( MString( "translate" ) );
+ ptPlug.setLocked( true );
+ }
+
+ MPlug spPlug = fnParent.findPlug( MString( "scale" ) );
+ spPlug.setLocked( true );
+
+ MPlug rpPlug = fnParent.findPlug( MString( "rotate" ) );
+ rpPlug.setLocked( true );
+ }
+}
+
+#endif \ No newline at end of file