public PrepLairTurntable() { try { PluginMgrClient.init(); client = new MasterMgrClient(); plug = PluginMgrClient.getInstance(); } catch (PipelineException ex) { ex.printStackTrace(); } }
public void actionPerformed(ActionEvent e) { String com = e.getActionCommand(); if (com.equals("user")) { String user1 = userField.getSelected(); String view1 = viewField.getSelected(); viewField.setValues(areas.get(user1)); if (areas.get(user1).contains(view1)) viewField.setSelected(view1); try { w = new Wrapper(user1, viewField.getSelected(), toolsetField.getSelected(), mclient); } catch (PipelineException e1) { e1.printStackTrace(); System.exit(1); } } else if (com.equals("wrap")) { try { w = new Wrapper( userField.getSelected(), viewField.getSelected(), toolsetField.getSelected(), mclient); } catch (PipelineException e1) { e1.printStackTrace(); System.exit(1); } } else if (com.equals("proj")) { project = projectField.getSelected(); } else if (com.equals("add")) { list.add(assetChoiceBox()); diag.validate(); } else if (com.equals("type")) { JCollectionField eventSrc = (JCollectionField) e.getSource(); Collection<String> curList = getCorrectList(eventSrc.getSelected()); Box can = (Box) eventSrc.getParent(); JCollectionField oldList = ((JCollectionField) can.getComponent(2)); oldList.setValues(curList); JCollectionField newList = (JCollectionField) can.getComponent(4); newList.setValues(curList); } } // end actionPerformed
/** @param args */ public void run(String[] arg0) { try { boolean chosen = buildUpdateGUI(); if (!chosen) System.exit(0); if (getShotsUsingAssets()) if (confirmShotsToUpdate() == null) System.exit(0); processNodes(); System.err.println("DONE"); System.exit(0); } catch (PipelineException e) { e.printStackTrace(); } } // end run(String)
/** @param args */ public static void main(String[] args) { UpdateAssetGUI gui = new UpdateAssetGUI(); try { boolean chosen = gui.buildUpdateGUI(); if (!chosen) System.exit(0); if (gui.getShotsUsingAssets()) if (gui.confirmShotsToUpdate() == null) System.exit(0); gui.processNodes(); System.err.println("DONE"); System.exit(0); } catch (PipelineException e) { e.printStackTrace(); } } // end main(args)
public UpdateAssetGUI() { try { PluginMgrClient.init(); mclient = new MasterMgrClient(); queue = new QueueMgrClient(); plug = PluginMgrClient.getInstance(); log = LogMgr.getInstance(); pAssetManager = new TreeMap<String, AssetInfo>(); project = "lr"; charList = new TreeMap<String, String>(); setsList = new TreeMap<String, String>(); propsList = new TreeMap<String, String>(); potentialUpdates = new TreeSet<String>(); pSubstituteFields = new TreeMap<String, LinkedList<JBooleanField>>(); /* load the look-and-feel */ { try { SynthLookAndFeel synth = new SynthLookAndFeel(); synth.load( LookAndFeelLoader.class.getResourceAsStream("synth.xml"), LookAndFeelLoader.class); UIManager.setLookAndFeel(synth); } catch (java.text.ParseException ex) { log.log( LogMgr.Kind.Ops, LogMgr.Level.Severe, "Unable to parse the look-and-feel XML file (synth.xml):\n" + " " + ex.getMessage()); System.exit(1); } catch (UnsupportedLookAndFeelException ex) { log.log( LogMgr.Kind.Ops, LogMgr.Level.Severe, "Unable to load the Pipeline look-and-feel:\n" + " " + ex.getMessage()); System.exit(1); } } /* application wide UI settings */ { JPopupMenu.setDefaultLightWeightPopupEnabled(false); ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); } } catch (PipelineException ex) { ex.printStackTrace(); } // end try/catch } // end constructor
@Override public void run(String[] args) { try { TreeMap<String, LinkedList<String>> parsedArgs = argParser(args); if (!checkArgsAndSetParams(parsedArgs)) { return; } } catch (PipelineException ex) { System.err.println("There was a problem reading the arguments.\n" + ex.getMessage()); printHelp(); return; } for (String turntableName : turntables) { logLine("Doing turntable: " + turntableName); for (String passName : passes) { logLine("\tDoing pass: "******"\t\tDoing asset: " + as.assetName); LairTurntable tt = new LairTurntable(as, turntableName, passName); w = new Wrapper(user, view, toolset, client); logLine("\t\tFreezing all the textures"); getLatest(w, as.texGroup, over, froz); logLine("\t\tChecking out the final model scene"); getNewest(w, as.finalScene, keep, pFroz); getNewest(w, as.lr_finalScene, keep, pFroz); logLine("\t\tChecking out the shader scene."); getNewest(w, as.shdScene, keep, pFroz); logLine("\t\tChecking out the turntable scene."); getNewest(w, tt.turntableScene, keep, pFroz); logLine("\t\tChecking out the overRide scene."); getNewest(w, tt.ttCamOverMI, keep, pFroz); logLine("\t\tChecking out the options scene."); getNewest(w, tt.ttOptionsMI, keep, pFroz); logLine("\t\tChecking out the camera MI node."); getNewest(w, tt.ttCamMI, keep, pFroz); logLine("\t\tChecking out the light MI node."); getNewest(w, tt.ttLightMI, keep, pFroz); logLine("\t\tChecking out the shade MI node."); getNewest(w, tt.ttShadeMI, keep, pFroz); logLine("\t\tChecking out the geo MI node."); getNewest(w, tt.ttGeoMI, keep, pFroz); logLine("\t\tChecking out the images node."); getNewest(w, tt.ttImages, keep, pFroz); logLine("\t\tFixing the turntable node"); { NodeMod mod = client.getWorkingVersion(user, view, tt.turntableScene); if (toolset != null) mod.setToolset(toolset); client.modifyProperties(user, view, mod); } logLine("\t\tFixing the camera override node"); { NodeMod mod = client.getWorkingVersion(user, view, tt.ttCamOverMI); if (toolset != null) mod.setToolset(toolset); BaseAction act = mod.getAction(); act.setSingleParamValue("ImageWidth", 1280); act.setSingleParamValue("ImageHeight", 720); act.setSingleParamValue("AspectRatio", 1.777); act.setSingleParamValue("Aperture", 1.41732); act.setSingleParamValue("OverrideFocal", false); act.setSingleParamValue("OverrideClipping", false); mod.setAction(act); client.modifyProperties(user, view, mod); } logLine("\t\tFixing the camera node"); { NodeMod mod = client.getWorkingVersion(user, view, tt.ttCamMI); if (toolset != null) mod.setToolset(toolset); client.modifyProperties(user, view, mod); } logLine("\t\tFixing the light node"); { NodeMod mod = client.getWorkingVersion(user, view, tt.ttLightMI); if (toolset != null) mod.setToolset(toolset); client.modifyProperties(user, view, mod); } logLine("\t\tFixing the geo node"); { NodeMod mod = client.getWorkingVersion(user, view, tt.ttGeoMI); if (toolset != null) mod.setToolset(toolset); BaseAction act = mod.getAction(); act.setSingleParamValue("CustomText", true); mod.setAction(act); client.modifyProperties(user, view, mod); } logLine("\t\tFixing the shader node"); { NodeMod mod = client.getWorkingVersion(user, view, tt.ttShadeMI); if (toolset != null) mod.setToolset(toolset); BaseAction act = mod.getAction(); BaseAction act2 = LairConstants.actionMayaMiShader(); act2.setSingleParamValues(act); mod.setAction(act2); JobReqs req = mod.getJobRequirements(); req.addSelectionKey("MentalRay"); mod.setJobRequirements(req); mod.setExecutionMethod(ExecutionMethod.Parallel); mod.setBatchSize(100); client.modifyProperties(user, view, mod); } logLine("\t\tFixing the images node"); { NodeMod mod = client.getWorkingVersion(user, view, tt.ttImages); if (toolset != null) mod.setToolset(toolset); BaseAction act = mod.getAction(); act.setSingleParamValue("TexturePath", "$WORKING"); mod.setAction(act); JobReqs req = mod.getJobRequirements(); req.addSelectionKey("MentalRay"); mod.setJobRequirements(req); mod.setExecutionMethod(ExecutionMethod.Parallel); mod.setBatchSize(5); client.modifyProperties(user, view, mod); } logLine( "All Done. Remember to set your export set on the mod node " + "if you want to export a custom part of the body"); } catch (PipelineException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } } }