So I was trying to find the best way to get the names of every parent of an object (so if you had a object parented under a group the group could be further nested under others).
Off the top of my head, two ideas I have would be:
- use listRelative to find the parent, and then recursion to continue up the chain of parents saving each to a list
- get the ‘fullPath’ or ‘long’ name of the current object with say the ls command and parse the string for the names
What do you think is the best method or do you have another even better method?
thanks