Exemplo n.º 1
0
        public override void writer(MFileObject file, string optionsString, MPxFileTranslator.FileAccessMode mode)
        {
            string       fullName = file.fullName;
            StreamWriter sWriter  = new StreamWriter(fullName);

            sWriter.Write("# Simple text file of custom node information" + Environment.NewLine);

            MItDependencyNodes iterator = new MItDependencyNodes();

            while (!iterator.isDone)
            {
                MObject obj = iterator.thisNode;
                try
                {
                    MFnDependencyNode dnFn     = new MFnDependencyNode(obj);
                    MPxNode           userNode = dnFn.userNode;
                    if (userNode != null)
                    {
                        sWriter.Write("# custom node: " + dnFn.name + Environment.NewLine);
                    }
                }
                catch (System.Exception)
                {
                }

                iterator.next();
            }
            sWriter.Close();

            return;
        }
Exemplo n.º 2
0
        // -------------------------
        // ----------- UI ----------
        // -------------------------

        public static void UpdateCheckBox(CheckBox checkBox, MPxNode node, string propertyName)
        {
            if (checkBox.CheckState != CheckState.Indeterminate)
            {
                // TODO find function
                //node.setUserPropBool(propertyName, checkBox.CheckState == CheckState.Checked);
            }
        }