how to query typed text in node's name filed in outliner

how to query typed text in node's name filed in outliner

batarg
Advocate Advocate
445 Views
4 Replies
Message 1 of 5

how to query typed text in node's name filed in outliner

batarg
Advocate
Advocate

how to query typed text for node's name in outliner?

or maybe better solution is to find the callback that sends name after enter is pressed to `rename` command?

 

main goal is to make custom renaming in outliner

0 Likes
446 Views
4 Replies
Replies (4)
Message 2 of 5

Kahylan
Advisor
Advisor

The renaming itself is done using the rename command:

 

https://help.autodesk.com/cloudhelp/2022/ENU/Maya-Tech-Docs/Commands/rename.html

 

Searching for the name to rename is normally done using the ls command, it depends on what criteria you need for renaming.

 

https://help.autodesk.com/cloudhelp/2022/ENU/Maya-Tech-Docs/Commands/ls.html

 

I hope this helps!

0 Likes
Message 3 of 5

batarg
Advocate
Advocate

@Kahylan thank you for your time, but not exactly what im asked for.

the rename (mel) command is executed afterwards, i need to hook that process entirely before rename is executed.

the outlinerEditor function has no flag for enterCommandScript like other ui elements does (eg. textField, button, etc)

0 Likes
Message 4 of 5

Kahylan
Advisor
Advisor

Yes, thats because the Outliner is a display Editor, like the node editor or the Hypershade, meant to give you an overlook over all the nodes in the scene. Thats why I told you about the ls command, since everything you see in the Outliner are nodes that can be listed with it.

If you tell me what exactly you need to do I might be able to help you further.

0 Likes
Message 5 of 5

batarg
Advocate
Advocate

i have a script that helps me rename objects with number or char incrementing, eg:

```

upperArm_L_##_jnt

>>

upperArm_L_03_jnt

or

feather@@_01_jnt

>>

featherAA..featherZZ_01_jnt

```

but i want to do it more naturally using the existing ecosystem(outliner)

 

im vey glad that devs gived us customizeble DASH commands, that helps to do complex things with simple moves, so i want to extend that language to renaming process

0 Likes