popUpMenu mel notes: "dagObjectHit"

Lately a lot of questions on other forums have been posted centered around
creating custom popUpMenu’s in mel that reflect objects/components under cursor.

The solution for some has been to manually edit maya’s internal files :eek:
Namely dagMenuProc.mel.

This seems pretty drastic. I wonder if anyone here does as much?
( acceptable practice?? )

I have tried to come up with some alternative solutions that “may”
perhaps be useful to some.
I hope u guys don’t mind if I compile them here?
Also, looking for feedback ( similar solutions? logic errors on my part? )

Begin:

you will not find “dagObjectHit” in the mel command documentation however you can find all the flags for it in quick help.
additionally
ls -preSelectHilite
is helpful for contextual component cursor query

a template fer both:

// cly_contextualCursorHit_template.mel
{
	if( `popupMenu -exists cly_contextualTrash` ) {
		deleteUI cly_contextualTrash;
	}
	popupMenu 
		-alt 1 
		-button 3
		-mm 1 
		-p viewPanes 
		-pmc ( "string $bob[] = `ls -preSelectHilite`;"+ // ls return of pre-select hilite under cursor
			"if (`popupMenu -e -exists cly_contextualTrash`) {"+
			    "popupMenu -e -deleteAllItems cly_contextualTrash;"+ 
			    " setParent -menu cly_contextualTrash;"+
			    "if ( `dagObjectHit`)"+    // dag object Hit returns int if cursor is over an object
				 "menuItem -label \"object under cursor\";"+
			    "else"+
				  " menuItem -label \"no object under cursor\";"+
			    "if ( size( $bob ) ) "+
				 " for ( $b in $bob ) "+
					  "menuItem"+
						  "-label $b; }" )
	cly_contextualTrash;
}
// end

after executing the above code:
alt + rightclick on object and components
builds dynamic popUp that reflects object and component status under cursor

result

More pop-up menu Fun…
different methods are needed to return “object under the cursor” depending on the panel.

First in the model panels:

How is the $object argument passed to dagMenuProc.mel ?!
This is a bit tricky!

The only procedure that uses dagMenuProc is buildObjectMenuItemsNow.mel.
And it only “seems” to execute it in only one place in the code…

if NOT! dagObjectHit -mn “theMenuNameHere” then the last object currently
selected is $object. So dagmenuProc ( in “theMenuNameHere”, with $object represented )

This works as expected ( if no cursor is over an object but at least 1 object is selected…
Then the last selected object is represented in the dagMenu pop up )

Where then, is dagMenuProc executed for cursor over unselected object?

ENTER, the enigmatic dark shadowy command known as dagObjectHit to save the day (sorta) once again…

Although dagObjectHit only returns int. When used with the -menu flag
It executes dagMenuProc and passes as arguments both the menu string provided in the flag and the object under the cursor as well!

for instance:


// with our cursor over polyMesh1...
dagObjectHit -mn "cly_contextualTrash", ;
// results in:
// dagMenuProc("cly_contextualTrash", "polyMesh1");

dagObjectHit is only used once in all internal Maya scripts…
( our buildObjectMenuItemsNow.mel example above)

 if (!`dagObjectHit -mn $parentName`)

despite the logical !not operator this dagObjectHit query is what actually
executes cursor/object represented popUp menu builds.

Why this isn’t a fully documented command that returns object query as a string is beyond me? May be some danger lurking here?
Let’s not start celebrating jes yet tho…

For our uses, this code:

 
dagObjectHit -mn "ourCustomMenu"

will simply use the dagMenuProc menu builder to build “our” menu!
( the dagMenuBuild is appended to our menu so far )

Which is fine, if that is what we want… ( to extend Maya’s default model Menu Pop Ups )
However if we want unadultered popUpMenu’s, yet keep the dagObjectHit’s passed $object
We will have to do a little hacking:

Don’t rewrite an internal mel file…
pillage dagMenuProc results instead, then -deleteAllItems to restore yer menu:

 /*
cly_objectHitMenuTemplate.mel v0.2
Roger Klado was here
because no one else will do it fer me
April 15, 2009 ( should be dom war-ing instead )

RogerKlado@gmail.com ( Klado/Claydough/cly_  )

A template for setting up object aware view pane pop-up menus
*/

global proc cly_objectHitMenuTemplate()
{
	if( `popupMenu -exists cly_contextualTrash` ) {
		deleteUI cly_contextualTrash;
	}
	popupMenu 
		-alt 1 
		-button 3
		-mm 1 
		-p viewPanes 
		-pmc ( "string $bob[] = `ls -preSelectHilite`;"+ // ls return of pre-select hilite under cursor
		"if (`popupMenu -e -exists cly_contextualTrash`) {"+
			"popupMenu -e -deleteAllItems cly_contextualTrash;"+ 
			" setParent -menu cly_contextualTrash;"+
			"if ( `dagObjectHit`)"+	// dag object Hit returns int if cursor is over an object
				"menuItem -label `cly_dagMenuRape`;"+
			"else"+
				 " menuItem -label \"no object under cursor\";"+
			"if ( size( $bob ) ) "+
				 " for ( $b in $bob ) "+
			 		"menuItem"+
						 "-label $b; }" )
	cly_contextualTrash;
}
//________________________________________________________________________________________
// end

global proc string cly_dagMenuRape()
{
	dagObjectHit -mn "cly_contextualTrash";

	string $popsChildren[] = `popupMenu -q -itemArray cly_contextualTrash`; 
	string $objectMenuItem = `menuItem -q -l $popsChildren[0]`;
	string $dotFreeObject[];
	tokenize $objectMenuItem "." $dotFreeObject;
	
	// we have had our way with dagMenuProc. call her a cab...
	popupMenu -e -deleteAllItems cly_contextualTrash;
	
	return $dotFreeObject[0];
}
// end: insert applause here...

result

The above code werks for all objects ( joints etc… ) in the model panels.

We have to use different logic for the hypergraph however.
Thankfully this is a lot easier.
The hypergraph command can query object nodes under the cursor with the -feedbackNode flag.

fer instance hyperGraphPanel1:

 /*
cly_objectHitHyperGraphMenuTemplate.mel v0.1
Roger Klado was here
because no one else will do it fer me
April 15, 2009 ( should be dom war-ing instead )
RogerKlado@gmail.com ( Klado/Claydough/cly_  )

A template for setting up object aware view pane pop-up menus
*/
global proc cly_objectHitHyperGraphMenuTemplate()
{	
	if( `popupMenu -exists cly_contextualTrash2` ) {
		deleteUI cly_contextualTrash2;
	}
	popupMenu 
		-alt 1 
		-button 3
		-mm 1 
		-p "hyperGraphPanel1HyperGraphEd"
		-pmc "cly_hyperFeedBack"
	cly_contextualTrash2;
}

global proc cly_hyperFeedBack()
{
	if (`popupMenu -e -exists cly_contextualTrash2`) {
		popupMenu -e -deleteAllItems cly_contextualTrash2;
		string $feedBackNode = `hyperGraph -query -feedbackNode "hyperGraphPanel1HyperGraphEd"`;
		// optionally tokenize
		string $tokenizedFeedBackNode[];				// *this line for short names 
		tokenize $feedBackNode "|" $tokenizedFeedBackNode;	// 		" 
		setParent -menu cly_contextualTrash2;
			//menuItem -label $feedBackNode;	// *uncomment this line for long names 
			// *this line for short names
			menuItem -label $tokenizedFeedBackNode[size($tokenizedFeedBackNode) - 1];  
	 }
}
// end

The objects are returned with short names here. Use the long name method included to solve for naming clashes.

result

have I missed anything?

// end

Damn…that’s freakin sweet.

I wish they had an easy way to hook into that function instead of modifying the Autodesk code. You can do some similar things by modifying the BuildHypergraphNodeMenuItems.mel file - it is similar to the dagMenuProc.mel

For example, in that file at around line 282, after the “Reload Image File” menuItem, I find it very convenient to add:


menuItem 
	-label "Open File Externally" 
	-command ("system(toNativePath(\"shell " + $texName + "\") )");
	   

int $isFileThere = `filetest -f (toNativePath($texName))`;
string $explorerCommand;

if($isFileThere)
   {
   $texName = substituteAllString( $texName, "/", "//") ;
   $explorerCommand = "system(\"shell explorer /e,/select," + toNativePath($texName) + "\")"; 
   }
else
   {
   $texName = substituteAllString( $texName, "/", "//") ;
   $texName = `match "^.*[/\\]" $texName`;

   $explorerCommand = "system(\"shell explorer /e," + toNativePath($texName) + "\")";
   }
		 

menuItem 
	-label "Open in Explorer" 
	-command $explorerCommand;
   
menuItem -divider true;

This adds “Open File Externally” and “Open in Explorer” right-click menu items to textures in the Hypergraph/Hypershade. Super useful for jumping around an art tree, and having PSD and DDS files quickly available in a real viewer is immensely helpful.

If you have custom node types for game assets, or a unique custom attribute, and a command-line asset viewer, it’s just as easy to have “Quick Game Preview” menuitems as well!

(Also, this is Maya 7 – the original file may be different in later versions…)

=== Edited – accidentally said Alias instead of Autodesk… oopsie! Habits…

[QUOTE=ObsidianPC;3072]I wish they had an easy way to hook into that function instead of modifying the Autodesk code.[/QUOTE]

Can’t you do sort of an “overload” where you copy the file to a location on your script path and edit that version instead of the version in the Maya<xxxx>/scripts tree? I’ve done this sort of thing for years and it seems to work pretty well. I find it works best if you copy the whole MEL file instead of just breaking out a specific proc just so you know the rest of the functionality is intact…

yeah, that is the way that is recommended seth.
the problem is that when you do that, and you have custom ones, you need to check what is added new to those files on each release and then merge in your changes…
Frustrating that autodesk won’t just expose all the marking menus to be made with the MM internal tools , and alllow for custom rt click as well.

Max is way better at UI customization and storage compared with maya.

oh and I like the use for the stuff at the top of the thread… very nice, could get some handy use out of that stuff for making FK objects pickable through the mesh with out having to see the joints or ctrls maybe, guess its good they finally added preselect highlighting in .

/steals…

In one of my previous tools, I ran a scriptJob to evaluate changes to skinweights, on a per vertex basis. That was painfully slow, so hopefully I can adapt this workaround to suit my purposes.

Nice one, Roger.

i made a custom one for us here that GREATLY improves skinning workflows… i meant to talk about it in my 3Dec presentation last dec and show some cool stuff, but i ran out of time.

i’ll try to remember to post something this weekend on what i was going to show.

-josh

I have hacked around with the default Maya modelling marking menu because I really hated the default behaviour (I don’t want ANYTHING related to specific objects if I don’t right-click on the object itself!) … but I just did that for myself in my Maya install folder and kept a backup of the original.

I hadn’t considered duplicating the file and having it load from the user scripts folder, I will try that out next week! I have had a few people at work asking for changes to stuff that is all Maya built-in scripted popup menus but before now I have held off since I don’t want to mess around with any built-in procedures.

you can just put your modified version in the shared/network script path (assuming you have something like that setup), and give them a tool/menu that will toggle between the custom menu and the default one. sometimes i want to turn mine off, so in our rigging tools we have a button that does just that.

thanks for the feedback. nice to see some have a use for as much.

some more pop-up menu notes:
( maybe not as useful, but for completeness sake… )

shelfButton popUpMenus can be helpful for a generic script distribution ui.
( packing as much functionality in as less ui real estate as possible/reasonable )

Searching and restoring shelfButtons by annotation rather then labels
may be safer. As users are more likely to change labels.

pop up Menus can then be restored on subsequent Maya start-ups from userSetup.mel

A template for contextual shelfButtons:

dynamically create a menu of top level dag objects,
whose members optionally consists of submenus.
Hide/Show toggle cmd fer example functionality…

/*
cly_shelfButtonPopUpHide.mel

Roger Klado was here
because no one else will do it fer me
February 19, 2009 ( poppa )
RogerKlado@gmail.com ( Klado/Claydough/cly_  )

a template for shelfButton popUpMenus
*/
	
global proc cly_shelfButtonPopUpHide( string $parent )
{ 
	if ( `control -exists $parent` ) {	// then create a popupMenu for menuItems // control UI are received with a unique long pathname
		string $uniqueMenu = "cly_hideMenu_"+ $parent;
		// unique-ness is established by using UI's path. Assure UI name is legal by stripping "|"
		while ( $uniqueMenu != ( $uniqueMenu = `substitute "|" $uniqueMenu "_"` ) ); // thanks to Byran Ewert! mel How-to #34

		if ( `popupMenu -exists $uniqueMenu` )
			deleteUI $uniqueMenu;
			
		popupMenu
			-parent $parent
			-button 3
			-postMenuCommand ( "cly_dynHideMenuItems \""+ $parent+ "\"" )
			-allowOptionBoxes true
			$uniqueMenu;
	}
}

global proc cly_dynHideMenuItems( string $parent )
{
	if ( `control -exists $parent` ) {	
		//
		string $uniqueMenu = "cly_hideMenu_"+ $parent;
		// unique-ness is established by using UI's path. Assure UI name is legal by stripping "|"
		while ( $uniqueMenu != ( $uniqueMenu = `substitute "|" $uniqueMenu "_"` ) ); // thanks to Byran Ewert! mel How-to #34
		//

		popupMenu -e -deleteAllItems $uniqueMenu;	

		setParent -menu $uniqueMenu;
		// dynamic popup menu items begin
		//______________________________________________________________________	
 
		string $topTransforms[] = `ls -as`;
		
		for ( $t in $topTransforms ) {
			$tv = $t+ ".visibility";
			string $cmd = "setAttr "+ $tv+ " ( ! `getAttr "+ $tv+ " ` );";
			
			int $sm = 0;
			string $dagTransforms[] = {};
			$dagTransforms = `ls -dag -tr $t`;
			if ( size( $dagTransforms ) > 1  )
				$sm = 1;
			menuItem 
				-label $t
				-subMenu $sm
				-command $cmd;
			
			if ( size( $dagTransforms ) > 1  ) {			
				for ( $d in $dagTransforms ) {			
					$dv = $d+ ".visibility";
					string $cmd = "setAttr "+ $dv+ " ( ! `getAttr "+ $dv+ " ` );";

					menuItem 
						-label $d
						-command $cmd ;
					if ( $d == $dagTransforms[0]  )
						menuItem -divider true;
				}
				setParent -menu $uniqueMenu;
			}
		}
	}
}
// end ( insert applause here )

userSeup.mel code to restore popUpMenus on subsequent Maya start ups:

// supporting userSetup.mel annotaion search source code

// add the following lines to your userSetup.mel for cly_shelfButtonPopUpHide shelfButton pop-Up menu rebuild:
// if no userSetup.mel exists in your scriptDirectory... then simply rename this file to userSetup.mel and place it in your scripts directory
{
	string $controlUI[] = `lsUI -long -ctl`;
	for ( $b in $controlUI ) {
		// query fer annotation instead of label ( users change labels )
		string $annoCheck = `control -q -annotation $b`;
		if ( $annoCheck == "cly hide shelf button" ) {
			string $popUpMenuChildren[] = `control -q -popupMenuArray $b`;
			if ( size( $popUpMenuChildren )   )
				deleteUI $popUpMenuChildren;
			cly_shelfButtonPopUpHide $b;
		}
	}
}
//end

pimpage of usage:
cly_pivotReflectionModeling.mel

Searching annotation by control allows end user to easily customize the menu usage to any “other” control type preferred
( simply by annotating their control with the same )

[RIGHT].[/RIGHT]

nice work, i’m gonna have to give this a whirl…

So far, i’ve just been copying the various scripts that build the menus into my user directories (like bClark suggested) so I can add my own entries.

I’ve have been waiting for some free time to abstract my custom items from the source files so they can be easily ported… thanks for sharing your findings, it’ll be a great help

Hey there,

Right click shelf menu’s are awesome.

We use these all the time to great effect thanks to a mr macaronikazoo.

You can also attach marking menu’s to shelf icons using the right click as well.

I’ve set this up for a lot of the zooTools and the keyframing marking menus.

Very convenient…

Dave

fail…

the userSetup.mel code to re-establish shelfButton popUp menus will fail if the tablayout is not visible.
( the lsUI control search will fail )

if the shelf is not visible toggle it open

	int $visible = 1;
	if ( ! `isUIComponentVisible "Shelf"` ) { 
		// dependent on internal maya scripts
		$visible = 0;
		toggleUIComponentVisibility "Shelf";
	}

updated userSetup code template:

// supporting userSetup.mel annotaion search source code

// add the following lines to your userSetup.mel for cly_shelfButtonPopUpHide shelfButton pop-Up menu rebuild:
// if no userSetup.mel exists in your scriptDirectory... then simply rename this file to userSetup.mel and place it in your scripts directory
{
	int $visible = 1;
	if ( ! `isUIComponentVisible "Shelf"` ) { 
		// dependent on internal maya scripts
		$visible = 0;
		toggleUIComponentVisibility "Shelf";
	}
	string $controlUI[] = `lsUI -long -ctl`;
	for ( $b in $controlUI ) {
		// query fer annotation instead of label ( users change labels )
		string $annoCheck = `control -q -annotation $b`;
		if ( $annoCheck == "cly hide shelf button" ) {
			string $popUpMenuChildren[] = `control -q -popupMenuArray $b`;
			if ( size( $popUpMenuChildren )   )
				deleteUI $popUpMenuChildren;
			cly_shelfButtonPopUpHide $b;
		}
	}
	if ( !$visible  ) { 
		// dependent on internal maya scripts
		toggleUIComponentVisibility "Shelf"; // reset visibility preference
	}
}
//end

Replies a virtue! I will continueSKF进口轴承SKF进口轴承SKF进口轴承

I’m sorry if I’m being a bit slow on this one, but how do you implement this little nugget of gold. Do I need to create a scriptNode to hold your code and then add something to the dagmenuproc file. Or do I avoid dagmenuproc all together and approach the problem from somewhere else?

Mike.

[QUOTE=wywait;4263]Do I need to create a scriptNode to hold your code ?
[/QUOTE]

no scriptnode needed… jes a pop up menu parented to the view panes ( alt/button 3 in the example )
optionally source the code/script fer yer popUp in userSetup.mel to apply at startup.

[QUOTE=wywait;4263]and then add something to the dagmenuproc file?[/QUOTE]

no, you do not have to touch Maya’s internal mel scripts.
Yer popUp menu can have this “object under cursor functionality” by using the dagObjectHit command.

dagObjectHit -mn "yourCustomMenu"

snip…
dagObjectHit -mn “ourCustomMenu”

will simply use the dagMenuProc menu builder to build “our” menu!
( the dagMenuBuild is appended to our menu so far )

Which is fine, if that is what we want… ( to extend Maya’s default model Menu Pop Ups )
However if we want unadultered popUpMenu’s, yet keep the dagObjectHit’s passed $object
We will have to do a little hacking:
snip…
( a hack that doesn’t involve editing maya’s internal scripts! )

See the cly_objectHitMenuTemplate template fer example…
In which the proc, “cly_dagMenuRape” simply tokenizes the desired object result from
the dagMenuProc menu build.
( the menu built as a result of using the dagObjectHit -menu flag
( …when called with a -menu flag, dagObjectHit also executes dagMenuProc ) )

// we have had our way with dagMenuProc. call her a cab...

This…is…awesome!

I know, a bit late in the game, but gotta give you props for this. :slight_smile:

Hey this is great! Thanks heaps…

I have a tools subfolder folder called scriptMod where I store modified versions of,e.g dagMenuProc. These are sourced by our main tools plugins, thereby providing mod UI stuff to the art teams without the danger associated with editing core scripts.

Cross posting more object hit notes here. Fer[sic] completeness sake:
and a modifier revision:
most folk r using the alt rmb fer scale navigation in Maya. Now that the Roger is
alt rmb-n’ wit zSwitcher…
tis time to free the key and un-scramble my brain’s viewport. ( new hot key is ctl-mmb ) ( alt-ctl-rmb/mmb/lmb is also an option/s )

For duplicate objects with the same name…
The following template provides an alternative solution for returning “object under cursor”.

Instead of “Query/Rebuild” from a dagObjectHit’s popUpMenu ( cly_objectHitMenuTemplate.mel v0.2 )
a command echo strategy is used to ensure that “unique” long object names are returned.

From 3 poly mesh sphere’s, all with the same name “pSphere1”…
A long object name template that returns both the long and short name of the “object under cursor”.

Delete/Re-Source any previously installed/Sourced ( cly_objectHitMenuTemplate.mel v0.2 ) templates,
And optionally in userSetup.mel add…

cly_objectHitMenuTemplate;

/*
cly_objectHitMenuTemplate.mel v0.4
Roger Klado was here
because no one else will do it fer me
Jan 17, 2011 ( God's basement vacation )

RogerKlado@gmail.com ( Klado/Claydough/cly_  )

A template for setting up long named object aware view pane pop-up menus

most folk r using the alt rmb fer scale navigation in Maya. Now that the Roger is 
alt rmb-n' wit zSwitcher...
tis time to free the key and un-scamble my brain's viewport. ( new hot key is ctl-mmb ) ( alt-ctl-rmb/mmb/lmb is also an option/s )

*/

global proc cly_objectHitMenuTemplate()
{
	if( `popupMenu -exists cly_contextualTrash` ) {
		deleteUI cly_contextualTrash;
	}
	popupMenu 
		//-alt 1 
		-ctl 1
		-button 2
		-mm 1 
		-p viewPanes 
		-pmc ( "string $bob[] = `ls -preSelectHilite`; "+ // ls return of pre-select hilite under cursor
		"if (`popupMenu -e -exists cly_contextualTrash`) { "+
			"popupMenu -e -deleteAllItems cly_contextualTrash; "+ 
			"setParent -menu cly_contextualTrash; "+
			"if ( `dagObjectHit`){"+  // dag object Hit returns int if cursor is over an object
				"string $cursorObjectSet[] = {}; "+
				"$cursorObjectSet = `cly_dagMenuRape`; "+
				"menuItem -label $cursorObjectSet[0] ; "+
				"menuItem -label $cursorObjectSet[1] ; "+

				// pre selection hilite menu begin
				"if ( size( $bob ) )  "+
					" for ( $b in $bob ) "+
						"menuItem "+
							"-label $b; "+
				// pre selection hilite menu end

				// Return needs the echo outside of the proc. Command echo is cleaned up here 
				"if ( `window -exists clyInvisibleEcho` ) "+ 
					"deleteUI clyInvisibleEcho; "+
			"} "+
			"else "+
				"menuItem -label \"no object under cursor dude\"; "+	 
		 "}" )
	cly_contextualTrash;
}
//________________________________________________________________________________________
// end




global proc string[] cly_dagMenuRape()
{
	//begin

	// assure history state is echoable ( therefore recordable ) during the popupMenu
	int $echoState = 1;
	if ( `window -exists clyInvisibleEcho` )
	deleteUI clyInvisibleEcho;
	window -vis 0 clyInvisibleEcho;
		 columnLayout;
	cmdScrollFieldReporter cly_echo;
	if ( !`cmdScrollFieldReporter -q -echoAllCommands "cly_echo"` ) {
		$echoState = 0;
		cmdScrollFieldReporter -e -echoAllCommands 1 "cly_echo";
	}

	// temp file
	scriptEditorInfo -historyFilename "cly_tempHistoryLog.txt" -writeHistory true;
	//record history to temp file
	dagObjectHit -mn "cly_contextualTrash"; 	 // result of
	scriptEditorInfo -writeHistory false;
	string $historyRecordAddy = `scriptEditorInfo -query -historyFilename`; // directory 

	// "r"ead history record
	$fileId =`fopen $historyRecordAddy "r"`;	 // dagObjectHit return as int Id

	string $dagHitGitPath[] = {};
	string $dagHitArguments = `fgetword $fileId "\""`;
	while ( size( $dagHitArguments ) > 0 ) {
		$dagHitArguments = `fgetword $fileId "\"" `;
		// argument assigned address [2] contains short mame
		$dagHitGitPath[size($dagHitGitPath)] = $dagHitArguments;
	}
	fclose $fileId;
	/* 
	$fileId =`fopen $historyRecordAddy "r"`;
	string $historyRecorded=`fread $fileId $historyRecorded`; // dagObjectHit return as string
	fclose $fileId;
	*/

	if ( $echoState == 0 ) {		 // then restore to the original state
		cmdScrollFieldReporter -e -echoAllCommands 0 "cly_echo";
	}

	//clean
	sysFile -delete $historyRecordAddy;
	// Once again, we have had our way with dagMenuProc. ( she's history ) call her a cab...
	popupMenu -e -deleteAllItems cly_contextualTrash;

	string $cly_objPathReturns[] = {};
	string $tokenizedLongPath[];	// find short names 
	tokenize $dagHitGitPath[2] "|" $tokenizedLongPath; // " 
	$cly_objPathReturns[0]= $tokenizedLongPath[size($tokenizedLongPath) - 1]; 
	$cly_objPathReturns[1]= $dagHitGitPath[2];

	return $cly_objPathReturns;
}
// end: insert applause here...


perhaps query the menu labels ( object names as labels ) in the
-pmc command flags to actually build some commands/functionality?

( hopefully )
That might be useful to someone… without any gotchas.

:zzz: did I miss sumthin??
If so, please fill in any holes and thanks in advance!

Originally Posted by ClayDough:
did I miss sumthin??
If so, please fill in any holes and thanks in advance!

You sure did chief… “long name” component pre-selection hilite menuItems
couldn’t find their menus.
Now is fixed.

pre-SelectHilite component Returned With Long Path ( Non-unique Object Names )

.