Mesh Operations (Easier Mesh Replacement)

Add-on: Mesh Operations
Creator and developer: Ali Soltanian Fard Jahromi

When I used Blender I realized something that had been slowing down my workflow. The issue which was slowing down my workflow was the inability to replace meshes. There was no way to directly replace a mesh. To replace a mesh I would have had to delete my current mesh and then add a new mesh through a series of menus which was drastically slow. To solve the issue, I modified Blender’s programming to account for this. I added a feature that I call, “Mesh Operations” to quickly replace a selected mesh. The feature automatically deletes the mesh and adds a new mesh in a matter of seconds, completely eliminating the need for you to go through the process.
I have been using this for the past week and it has let me complete my projects faster. I made the add-on available for free on my website. Just make sure to credit me as the creator/developer and add my website if you are going to distribute it anywhere else.
Please see my video explaining my add-on:
https://www.youtube.com/watch?v=UwXbmd_gdfQ
Also you can see my article about it on my website:
https://alisoltanian.com/2020/08/11/easier-mesh-replacement-blender-add-on/

3 Likes

Hey Ali, apologies for not replying sooner.

It’s great that you’ve come up with your own add-on to solve your workflow issue! I’ve tested it and it works as you described. I can see a lot of potential for being able to quickly replace objects.

Firstly, some questions for you:

  • How does it fit into your workflow? Can you give an example of when you use it?
  • Do you have much experience with working with Python in Blender?
  • Do you plan on adding any other features?

I will give some feedback/suggestions on ways the current version could be improved, if you were interested in developing it further. I hope you will take them as constructive/positive ideas and not as a negative criticism of your work so far.

  • I would note that it is important to be clear about the distinction between a Mesh and an Object. I note this distinction as some of my feedback specifically relates to it. (I do not mean to be pedantic)

Perhaps you already know this, but I will explain briefly: An Object does not contain the Mesh/geometry data (the “Mesh data-block”), but instead contains a “reference” to it. If you look in the “Object Data Properties” tab in the Properties window, you will see the name of the Mesh at the top. Many Objects can reference a single Mesh, like when you use “Duplicate Linked”, both Objects reference the same Mesh. So when you edit one, all the duplicates also change, as they share the same Mesh data.

  • I think replacing the word “Mesh” with “Object” would be more accurate (like, “Replace Object with Sphere”)

  • I noticed that if you try to use the buttons while in Edit Mode, it causes an error message (because you cannot delete an Object while you are editing it). My suggestion here would be to check whether we are in Edit Mode or Object Mode and either:
    – Disable the buttons while in Edit Mode or
    – if in Edit Mode, only replace the Mesh and not the entire Object. (here you could keep the “Replace Mesh With…” wording)

  • If multiple Objects are selected, pressing the buttons will delete/replace all of the selected Objects with a single new Object. Is this intended? My suggestion would be to either:
    – Replace only the Active Object or
    – Replace all selected the Objects with new Objects. Being able to replace multiple Objects with one button press would be a great speed increase!

  • In your code, you could use descriptive names for your functions/operators. For example, “SimpleOperator” doesn’t describe what the operator does in a meaningful way. A better name might be something like “DeleteSelectedObject”. This is good programming habit, it helps other programmers to understand what your functions do.

Lastly I will offer some ideas/suggestions for new features that could be useful in a future version:

  • You could add a “Edit Last Operation” popup that allows the user to modify the settings of the new Object (like the options you get when adding a Sphere). That would allow for specifying the size and the subdivisions.

  • You could copy the rotation, scale, and location of the old Object to the new Object. That would save time and not require having to re-position the new Object to match the old one. You could even calculate the “bounding box” size of the old Object and scale the new Object to match.

  • You could also add calc_uvs=True to your bpy.ops.mesh.primitive_* functions, so that the Mesh will automatically be UV unwrapped and ready for texturing when it is created. This will save time later.

  • I note that you said that you found using the popup menus to be slow, but many users work only in the 3D View. Personally I would find it slower to have to open the Properties window and find the Object Properties tab, and then click a button. My suggestion here would be to add the operators to either the Object menu (in the 3D View header) or in the Object Context Menu, or in a tab at the side of the 3D View. Of course, you could add them to all these places, but it might be best to choose just one.

  • You could add keyboard shortcuts. These would be much quicker than menus or buttons!

I hope that feedback is useful. :+1:

1 Like

Hi Phocomelus,

Thanks a lot for your constructive suggestions. It’s great and I will definitely be using it to improve my add-on.

I use my add-on for when I am doing archivis and sculpting. An example is when I want to use a specific object for sculpting and I click on the wrong object, so then I use the add-on to replace the object with my desired object. Also, when I am doing archivis I use it for making furniture. When I want to change some furniture I use the add-on to replace the object so I don’t have to delete it and add a new one.

Yes, I am planning to make future features.

In terms of experience, that depends. I am 12 years old and have been working with blender for 1 and a half years. I completed an online professional certificate in python programming from the Georgia Institute of Technology (in Atlanta, US but I live in New Zealand), the rest I just picked up myself. Generally I use blender for game development and animation/film making.

Ali

1 Like