Better yet!
( for returning long names; a straightforward solution from cgtalk, credit: Vincenzo )
I tryed the method suggested by claydough. It worked great but there is something missing: if we use the object name returned by default markingMenu Maya proc, deleting all menuItems but the “objectName…” one, we do not get the full pathname of the object. Hence we cannot pass it to commands because it will fail if more than one object has the same name.
What I found is to query the command associated with the “Select” menuItem, that returns a string of type ("select -r " + $objectFullPathname). Then I tokenize and use that for passing arguments to other procs.
Hope this is useful…
vincenzo
haven’t been able to try yet hopefully soon.