private boolean checkArgsAndSetParams(TreeMap<String, LinkedList<String>> parsedArgs) { if (parsedArgs.containsKey("help")) { printHelp(); return false; } else if (parsedArgs.containsKey("version")) { printVersion(); return false; } try { user = getStringValue("user", true, parsedArgs); view = getStringValue("view", true, parsedArgs); toolset = getStringValue("toolset", false, parsedArgs); turntables = getStringValues("tt", true, parsedArgs); passes = getStringValues("pass", true, parsedArgs); assets = getAssetValues("asset", true, parsedArgs); { Boolean temp = getBooleanValue("verbose", false, parsedArgs); if (temp == null) verbose = false; else verbose = temp; } } catch (PipelineException ex) { System.err.println(ex.getMessage()); printHelp(); return false; } if (parsedArgs.size() > 0) { printExtraArgs(parsedArgs); return false; } return true; }
public PrepLairTurntable() { try { PluginMgrClient.init(); client = new MasterMgrClient(); plug = PluginMgrClient.getInstance(); } catch (PipelineException ex) { ex.printStackTrace(); } }
/** @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() { UIMaster master = UIMaster.getInstance(); MasterMgrClient client = master.acquireMasterMgrClient(); try { MappedSet<String, VersionID> versions = pArchives.get(pIndex); String archiveName = null; String msg = ("Archiving Volume (" + (pIndex + 1) + " of " + pArchives.size() + ")..."); long opID = master.beginDialogOp(msg); master.setDialogOpCancelClient(opID, client); long monitorID = client.addMonitor(new DialogOpMonitor(opID)); try { archiveName = client.archive(pPrefix, versions, pArchiver, pToolset); } catch (PipelineException ex) { showErrorDialog( "Error:", ex.getMessage() + "\n\n" + "Archive operation aborted early without creating " + "(" + (pArchives.size() - pIndex) + " of " + pArchives.size() + ") archive " + "volumes!"); return; } finally { master.endDialogOp(opID, "Archived."); client.removeMonitor(monitorID); } SwingUtilities.invokeLater(new RemoveTask(versions)); ManualArchiveConfirmTask task = new ManualArchiveConfirmTask( pParent, archiveName, pIndex + 1, pPrefix, pArchives, pToolset, pArchiver); SwingUtilities.invokeLater(task); } finally { master.releaseMasterMgrClient(client); } }
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
@Override public void run() { UIMaster master = UIMaster.getInstance(); MasterMgrClient client = master.acquireMasterMgrClient(); try { DoubleMap<String, VersionID, Long> versionSizes = null; { long opID = master.beginDialogOp("Assigning Versions to Archives..."); long monitorID = client.addMonitor(new DialogOpMonitor(opID)); try { versionSizes = client.getArchivedSizes(pVersions); } catch (PipelineException ex) { showErrorDialog(ex); } finally { master.endDialogOp(opID, "Versions Assigned."); client.removeMonitor(monitorID); } } /* assign the maximum number of versions to each archive volume without exceeding its capacity */ TreeMap<Integer, MappedSet<String, VersionID>> archives = new TreeMap<Integer, MappedSet<String, VersionID>>(); if (versionSizes != null) { long capacity = pArchiver.getCapacity(); int idx = 0; long total = 0L; boolean done = false; DoubleMap<String, VersionID, Long> skippedVersionSizes = new DoubleMap<String, VersionID, Long>(); while (!done) { for (String name : versionSizes.keySet()) { for (VersionID vid : versionSizes.keySet(name)) { Long size = versionSizes.get(name, vid); if ((total + size) >= capacity) { /* the version is too big to fit by itself in a volume */ if (total == 0L) { showErrorDialog( "Error:", "The version (" + vid + ") of node (" + name + ") was larger than " + "the capacity of an entire archive volume! The capacity of the " + "archive volume must be increased to at least " + "(" + formatLong(size) + ") in order to archive this version."); return; } skippedVersionSizes.put(name, vid, size); } /* the version fits, add it to this volume */ else { MappedSet<String, VersionID> versions = archives.get(idx); if (versions == null) { versions = new MappedSet<String, VersionID>(); archives.put(idx, versions); } versions.put(name, vid); total += size; } } } /* some versions wouldn't fit in the current volume, create a new volume and try again... */ if (!skippedVersionSizes.isEmpty()) { idx++; total = 0L; versionSizes = skippedVersionSizes; skippedVersionSizes = new DoubleMap<String, VersionID, Long>(); } else { if (total < pMinSize) { if (idx == 0) { showErrorDialog( "Error:", "The total size (" + formatLong(total) + ") of all versions selected " + "for archiving was less than the minimum archive volume size " + "(" + formatLong(pMinSize) + ")! Either select enough versions to " + "meet this minimum size or specify a smaller minimum size to create " + "an archive volume."); return; } else { archives.remove(idx); } } break; } } } /* perform the archive operations */ if (!archives.isEmpty()) { if (pArchiver.isManual()) { ManualArchiveConfirmTask task = new ManualArchiveConfirmTask( pParent, null, 0, pPrefix, archives, pToolset, pArchiver); SwingUtilities.invokeLater(task); } else { long opID = master.beginDialogOp(); master.setDialogOpCancelClient(opID, client); long monitorID = client.addMonitor(new DialogOpMonitor(opID)); int lastIdx = 0; try { for (Integer idx : archives.keySet()) { master.updateDialogOp( opID, "Archiving Volume (" + (idx + 1) + " of " + archives.size() + ")..."); lastIdx = idx; client.archive(pPrefix, archives.get(idx), pArchiver, pToolset); } } catch (PipelineException ex) { showErrorDialog( "Error:", ex.getMessage() + "\n\n" + "Archive operation aborted early without creating " + "(" + (archives.size() - lastIdx) + " of " + archives.size() + ") archive " + "volumes!"); return; } finally { master.endDialogOp(opID, "Archived."); client.removeMonitor(monitorID); } RemoveAllTask task = new RemoveAllTask(); SwingUtilities.invokeLater(task); } // else } // if(!archives.isEmpty()) { } finally { master.releaseMasterMgrClient(client); } }
/** @param args */ public static void main(String[] args) { String user = "******"; String view = "build"; String toolset = "csg_rev18"; MasterMgrClient client = new MasterMgrClient(); Wrapper w = null; String project = "lr"; try { w = new Wrapper(user, view, toolset, client); PluginMgrClient.init(); } catch (PipelineException e1) { e1.printStackTrace(); } String baseModel = "/projects/lr/assets/prop/asylianHelmet/asylianHelmet"; String finalizeMel = "/projects/lr/assets/tools/mel/finalize-character"; int pass = 3; LinkedList<String> toAdd = new LinkedList<String>(); for (int i = 2; i <= 10; i++) { toAdd.add("asylianHelmet" + i); } if (pass == 1) { try { SonyAsset baseAsset = SonyConstants.stringToAsset(w, baseModel); Globals.getNewest( w, baseAsset.finalScene, CheckOutMode.OverwriteAll, CheckOutMethod.AllFrozen); Globals.getNewest( w, baseAsset.lr_finalScene, CheckOutMode.OverwriteAll, CheckOutMethod.AllFrozen); AssetType baseType = baseAsset.assetType; for (String name : toAdd) { TreeSet<String> addedNodes = new TreeSet<String>(); try { SonyAsset as = new SonyAsset(project, name, baseType); log(as.texGroup + " : "); if (!Globals.doesNodeExists(w, as.texGroup)) { logLine("Building"); NodeMod mod = Globals.registerNode(w, as.texGroup, null, Plugins.editorKWrite(w)); addedNodes.add(as.texGroup); BaseAction act = Plugins.actionListSources(w); mod.setAction(act); doReqs(mod); client.modifyProperties(user, view, mod); } else logLine("Already Exists"); log(as.matScene + " : "); if (!Globals.doesNodeExists(w, as.matScene)) { logLine("Building"); NodeMod mod = Globals.registerNode(w, as.matScene, "ma", Plugins.editorMaya(w)); addedNodes.add(as.matScene); BaseAction act = Plugins.actionMayaReference(w); Globals.referenceNode(w, as.matScene, baseAsset.rigScene, act, REF, "rig"); client.link(user, view, as.matScene, as.texGroup, REF, LINKALL, null); mod.setAction(act); doReqs(mod); client.modifyProperties(user, view, mod); } else logLine("Already Exists"); log(as.finalScene + " : "); if (!Globals.doesNodeExists(w, as.finalScene)) { logLine("Building"); NodeMod mod = Globals.registerNode(w, as.finalScene, "ma", Plugins.editorMaya(w)); addedNodes.add(as.finalScene); BaseAction act = Plugins.actionMayaImport(w); Globals.referenceNode(w, as.finalScene, as.matScene, act, DEP, "mat"); client.link(user, view, as.finalScene, finalizeMel, DEP, LINKALL, null); act.setSingleParamValue("ModelMEL", finalizeMel); mod.setAction(act); doReqs(mod); client.modifyProperties(user, view, mod); } else logLine("Already Exists"); log(as.lr_matScene + " : "); if (!Globals.doesNodeExists(w, as.lr_matScene)) { logLine("Building"); NodeMod mod = Globals.registerNode(w, as.lr_matScene, "ma", Plugins.editorMaya(w)); addedNodes.add(as.lr_matScene); BaseAction act = Plugins.actionMayaReference(w); Globals.referenceNode(w, as.lr_matScene, baseAsset.lr_rigScene, act, REF, "rig"); mod.setAction(act); doReqs(mod); client.modifyProperties(user, view, mod); } else logLine("Already Exists"); log(as.lr_finalScene + " : "); if (!Globals.doesNodeExists(w, as.lr_finalScene)) { logLine("Building"); NodeMod mod = Globals.registerNode(w, as.lr_finalScene, "ma", Plugins.editorMaya(w)); addedNodes.add(as.lr_finalScene); BaseAction act = Plugins.actionMayaImport(w); Globals.referenceNode(w, as.lr_finalScene, as.lr_matScene, act, DEP, "mat"); client.link(user, view, as.lr_finalScene, finalizeMel, DEP, LINKALL, null); act.setSingleParamValue("ModelMEL", finalizeMel); mod.setAction(act); doReqs(mod); client.modifyProperties(user, view, mod); } else logLine("Already Exists"); try { client.submitJobs(user, view, as.finalScene, null); client.submitJobs(user, view, as.lr_finalScene, null); } catch (PipelineException ex) { ex.printStackTrace(); } } catch (PipelineException ex) { try { Globals.releaseNodes(w, addedNodes); } catch (PipelineException e) { e.printStackTrace(); } ex.printStackTrace(); return; } } } catch (PipelineException e) { e.printStackTrace(); } } else if (pass == 2) { for (String name : toAdd) { try { logLine(name); SonyAsset baseAsset = SonyConstants.stringToAsset(w, baseModel); AssetType baseType = baseAsset.assetType; SonyAsset as = new SonyAsset(project, name, baseType); Globals.disableAction(w, as.matScene); Globals.disableAction(w, as.lr_matScene); } catch (PipelineException e) { e.printStackTrace(); } } } else if (pass == 3) { for (String name : toAdd) { try { logLine(name); SonyAsset baseAsset = SonyConstants.stringToAsset(w, baseModel); AssetType baseType = baseAsset.assetType; SonyAsset as = new SonyAsset(project, name, baseType); NodeID nodeID = new NodeID(user, view, as.finalScene); client.checkIn( nodeID, "Inital model tree built by the BuildDerivedModels tool. Built off the " + baseModel + " model", VersionID.Level.Minor); nodeID = new NodeID(user, view, as.lr_finalScene); client.checkIn( nodeID, "Inital model tree built by the BuildDerivedModels tool. Built off the " + baseModel + " model", VersionID.Level.Minor); } catch (PipelineException e) { e.printStackTrace(); } } } }
@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(); } } } } }
private boolean dylanate( MasterMgrClient mclient, String switchName, DoubleMap<String, String, TreeSet<VersionID>> plugs) throws PipelineException { err.println("\nProcessing: " + switchName); String animName = null; { NodeMod switchMod = null; try { switchMod = mclient.getWorkingVersion(pUser, pView, switchName); } catch (PipelineException e) { mclient.checkOut(pUser, pView, switchName, null, keep, pFroz); switchMod = mclient.getWorkingVersion(pUser, pView, switchName); } TreeSet<String> switchSrcs = new TreeSet<String>(switchMod.getSourceNames()); for (String src : switchSrcs) { if (src.matches(animPattern)) { animName = src; err.println("Found anim node: " + src); mclient.checkOut(pUser, pView, src, null, over, frozU); continue; } // end if mclient.checkOut(pUser, pView, src, null, over, frozU); LinkMod lMod = switchMod.getSource(src); LinkPolicy rel = lMod.getPolicy(); System.err.println(src + ": " + rel); if (!rel.equals(REF)) { System.err.println("umm"); lMod.setPolicy(REF); switchMod.setSource(lMod); mclient.modifyProperties(pUser, pView, switchMod); } } // end for err.println("anim node: " + animName); mclient.modifyProperties(pUser, pView, switchMod); if (animName == null) throw new PipelineException("This switch node does not have an associated anim node"); } err.println("Checked out the anim and switch nodes"); String actionName = null; VersionID ttVer = null; boolean toCache = false; /*change the action setting on the Switch node*/ { NodeMod switchMod = mclient.getWorkingVersion(pUser, pView, switchName); Path p = new Path(switchName); Path syfRoot = new Path(p.getParentPath().getParentPath(), "syf"); System.err.println("Going to look for caches in: " + syfRoot); ArrayList<String> syfDirs = getChildrenDirs(mclient, syfRoot.toString()); for (String dir : syfDirs) { System.err.println(dir); Path dPath = new Path(syfRoot, dir); ArrayList<String> simDir = getChildrenNodes(mclient, dPath.toString()); for (String pCache : simDir) { Path cPath = new Path(dPath, pCache); if (cPath.toString().matches(cltPattern)) { System.err.println("\t" + cPath.toString()); try { mclient.checkOut(pUser, pView, cPath.toString(), null, over, froz); mclient.lock(pUser, pView, cPath.toString(), null); mclient.link(pUser, pView, switchMod.getName(), cPath.toString(), DEP, LINKALL, null); } catch (PipelineException e) { e.printStackTrace(); } toCache = true; } } } { BaseAction action = switchMod.getAction(); if (!switchMod.getToolset().equals(pToolset)) { switchMod.setToolset(pToolset); mclient.modifyProperties(pUser, pView, switchMod); } if (!toCache) { actionName = modRep; } else { actionName = modRep + "Syflex"; } ttVer = plugs.get("SCEA", actionName).last(); if ((action == null) || (!action.getName().equals(actionName)) || (!action.getVersionID().equals(ttVer))) { System.err.println( "Action name is incorrect - the switch node " + switchName + " doesn't have a " + actionName + "Action"); action = plug.newAction(actionName, ttVer, "SCEA"); action.setSingleParamValue("Source", animName); action.setSingleParamValue("Response", "Ignore"); if (toCache) action.setSingleParamValue(aApplyCache, true); switchMod.setAction(action); mclient.modifyProperties(pUser, pView, switchMod); } else { if (!action.getSingleParamValue("Response").equals("Ignore")) { // action = plug.newAction(actionName, ttVer, "SCEA"); // action.setSingleParamValue("Source", animName); action.setSingleParamValue("Response", "Ignore"); // if(toCache) // action.setSingleParamValue(aApplyCache, true); switchMod.setAction(action); mclient.modifyProperties(pUser, pView, switchMod); } // end if } // end else } } { /*-check out and lock the animation sources-*/ NodeMod animMod = mclient.getWorkingVersion(pUser, pView, animName); Set<String> animSrcs = animMod.getSourceNames(); for (String src : animSrcs) { if (src.matches(loresPattern)) { pLoresSrcs.add(src); err.println("Adding lores src " + src); } mclient.checkOut(pUser, pView, src, null, keep, pFroz); } // end for err.println("lores:" + pLoresSrcs); } /*-sync the animation assets with the switch assets.*/ // also remove unnecessary hires models { NodeMod switchMod = mclient.getWorkingVersion(pUser, pView, switchName); for (String src : switchMod.getSourceNames()) { if (src.matches(hiresPattern)) { err.println("Found hires source " + src); if (pLoresSrcs.contains(src + "_lr")) { pHiresSrcs.add(src); err.println("The hires source matched the anim node."); } else { err.println("Gotta remove " + src); } // end else } // end if } // end for } // add necessary hires models for (String lores : pLoresSrcs) { String hr = lores.replace("_lr", ""); err.println("Looking at lores source " + lores + " which matches " + hr); if (!pHiresSrcs.contains(hr)) { err.println("Gotta add " + hr + " to " + switchName); pHiresSrcs.add(hr); } } { NodeMod switchMod = mclient.getWorkingVersion(pUser, pView, switchName); TreeSet<String> switchSrcs = new TreeSet<String>(switchMod.getSourceNames()); err.println("Final hiRes list:" + pHiresSrcs + "\n"); err.println("switch now has:\n\t" + switchSrcs + "\n"); err.println("Looking for things to add."); for (String src : pHiresSrcs) { if ((src.matches(hiresPattern) && (!switchSrcs.contains(src)))) { err.print("Linking "); mclient.checkOut(pUser, pView, src, null, over, frozU); mclient.link(pUser, pView, pPrimary, src, REF, LINKALL, null); switchSrcs.add(src); } err.println("src from hiRes list: " + src); } } { NodeMod switchMod = mclient.getWorkingVersion(pUser, pView, switchName); TreeSet<String> switchSrcs = new TreeSet<String>(switchMod.getSourceNames()); err.println("switch now has:\n\t" + switchSrcs + "\n"); for (String src : switchSrcs) { if ((src.matches(hiresPattern) && (!pHiresSrcs.contains(src)))) { err.print("Unlinking "); mclient.unlink(pUser, pView, pPrimary, src); } err.println("src from switch node list: " + src); } } /*queue the switch node*/ mclient.submitJobs(pUser, pView, switchName, null); return false; }