3 Replies Latest reply: Feb 19, 2015 6:23 PM by A. Cobb RSS

    how to list output module templates

    RickGreb Community Member

      I cant seem to get the list of output modules templates, without having a comp in the render queue and getting the template array by looking in:  app.project.renderQueue.item(1).outputModules[1].templates.

      I want to populate a DropDownList with these values prior to adding anything to the renderQueue if possible.

        • 1. Re: how to list output module templates
          Dan Ebberts Community Member

          That's how I've done it in the past: create dummy comp, add it to RQ, harvest OM names, deleter RQ entry, delete comp.



          • 2. Re: how to list output module templates
            RickGreb Community Member

            Cool, thanks Dan, the way you mentioned is more than likley the way I'm going to go about it now. 

            I was hoping that I missed something in the documentation and there was a more direct way but this will work great.

            • 3. Re: how to list output module templates
              A. Cobb Community Member

              There is a less kludgy way to do this for Output modules:


              function getOutputModuleTemplateNames()
                var currentOMName;
                var OMStringsPrefSection = "Output Module Spec Strings Section v28";
                var OMStringsKeyPrefix = "Output Module Spec Strings Name ";
                var hiddenPrefixRE = /_HIDDEN/;
                var OMList = new Array();
                for(var i = 0; app.preferences.havePref(OMStringsPrefSection, OMStringsKeyPrefix+i, PREFType.PREF_Type_MACHINE_INDEPENDENT_OUTPUT); i++)
                currentOMName = app.preferences.getPrefAsString(OMStringsPrefSection, OMStringsKeyPrefix+i, PREFType.PREF_Type_MACHINE_INDEPENDENT_OUTPUT);
                if(currentOMName.match(hiddenPrefixRE)==null) OMList.push(currentOMName);
                return OMList;


              My problem is I'd like to do this for Render Settings templates, too, but they aren't stored as individual keys in the preferences, but rather as some chunk of encoded data that can't be retrieved (as far as I can tell) using app.preferences.getPrefAsString().


              Is there any way, short of reading in the preference file itself, which seems clunky and not at all future-proof, to get access to settings like this?