Esempio n. 1
0
    @Override
    public void initPhase() throws PipelineException {
      /* initialize builder parameters from source images node information */
      setParamValue(new ParamMapping(DeliverNamer.aDeliverable), pSourcePrefix);
      setParamValue(new ParamMapping(aNotes), pSourceVersion.getMessage());
      setParamValue(new ParamMapping(aClientVersion), pSourceVersion.getVersionID().toString());
      setParamValue(new ParamMapping(aClientShotName), pSourcePrefix);

      /* replace placeholder parameters with the names of the available
      slate script, format script and codec settings nodes */
      {
        Path path = pProjectNamer.getSlateNukeScriptsParentPath();
        ArrayList<String> pnames = findChildNodeNames(path);
        if ((pnames == null) || pnames.isEmpty())
          throw new PipelineException(
              "Unable to find any slate creation Nuke script nodes in (" + path + ")!");

        UtilityParam param =
            new EnumUtilityParam(
                aSlateScript,
                "Select the master slate creation Nuke script to use.",
                pnames.get(0),
                pnames);
        replaceParam(param);
      }

      {
        Path path = pProjectNamer.getFormatNukeScriptsParentPath();
        ArrayList<String> pnames = findChildNodeNames(path);
        if ((pnames == null) || pnames.isEmpty())
          throw new PipelineException(
              "Unable to find any image formatting Nuke script nodes in (" + path + ")!");

        UtilityParam param =
            new EnumUtilityParam(
                aFormatScript,
                "Select final image formatting Nuke script to use.",
                pnames.get(0),
                pnames);
        replaceParam(param);
      }

      {
        Path path = pProjectNamer.getQtCodecSettingsParentPath();
        ArrayList<String> pnames = findChildNodeNames(path);
        if ((pnames == null) || pnames.isEmpty())
          throw new PipelineException(
              "Unable to find any QuickTime codec settings nodes in (" + path + ")!");

        UtilityParam param =
            new EnumUtilityParam(
                aCodecSettings,
                "Select the QuickTime codec settings to encode the final movie.",
                pnames.get(0),
                pnames);
        replaceParam(param);
      }
    }