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

    how to list output module templates


      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 Level 5

          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.



          1 person found this helpful
          • 2. Re: how to list output module templates
            RickGreb Level 1

            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 Level 3

              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?