Shortcut to Rename Mesh data block with Object data block in one go

F2 is a very useful shortcut rename Object datablock/s.

Is there a shortcut to rename the Mesh datablock along with the Object datablock when we rename the Object?

  • spikeyxxx replied

    CTRL+F2 for batch renaming Objects is even more useful.

    As far as I know there is no shortcut to rename Mesh Data together with the Object Data, but that should be super easy to make in an addon. (I know very little Python and have never written an addon, but I feel confident that even I could write an addon that could do that...)

    Personally, I don't care what the Mesh Data is called, but some people do.

  • syboots replied

    Good to know there is no such shortcut.

    You are absolutely right. Pythong is a beauty under the Hood. That also explains why large projects create custom add-ons with it and python scripting is a pre-requesite skill for people working in large projects, or so she told me.

    There is a youtube video that shows the importance of properly naming Mesh data with Object data in large projects. It shows a technique of modifying mesh that is rotated in its local axis, without resetting its local rotation with ALT+R. I can't find the link, else could have posted.

  • spikeyxxx replied

    I can imagine an addon that goes through all Objects and then renames the Mesh Datablock of each Object to the Object name.

    The code inside the loop would be something like:

    There is an introduction to Python scripting by Bassam Kudali here on CGCookie, that explains how to make a batch rename script (CTRL+F2 didn't exist then) and how to make that into an operator. That knowledge should be enough to make the wanted addon.

    I can imagine that it would be useful in large projects, so if you want I could see if I can write it.

    But I am convinced, that that modifying rotated mesh technique is independent of the name of the Mesh Data...

  • syboots replied

    Cool. Python scripting course will be very useful

    And Yes you are right. Rotated modifying rotated mesh technique according to my notes is independent of the name of the Mesh Data. But when trying to choose the mesh from the long list of improperly named Mesh list is a nightmare according to the person who created the video. I will update the link to the video when I find it.

  • spikeyxxx replied

    The only problem I see, is when you have linked data:

    How would you rename that?

  • syboots replied

    If its linked data, wouldn't it update to the same name when one is changed ?

    Here is the video about  using Mesh data: https://www.youtube.com/watch?v=lGkWPc7Z6IU 

    ( Dunno why the algorithm does a great job pushing down useful videos like this outside everyone's filter bubbles. )

  • spikeyxxx replied

    Nice video!

    Say you have a bunch of spheres, called Sphere.000, Sphere.001,... which all use a  Mesh Data called Sphere, then change them into cubes, by linking the Object Data of a Cube, then they would still be called Sphere.000, Sphere.001,..., but the name of the Mesh Datablock would be called Cube or something like that...