0
$\begingroup$

Knowledgeable people of the internet!

I’m working on a script, that at some point, using bmesh module and being in Edit Mode, creates verts and edges which are then used to generate a mesh via convex_hull method. For the question I have it’s irrelevant why I do that – the result is what I expected it to do. The thing is I want to take the part of the mesh created that way and separate it from the object as a new object with different name, so I could select it by name later. I do that with object.new method. It works, but the new object created from selected part of mesh is located at the center point while I would like it to appear exactly where it was when it was a part of the mesh in Edit Mode (like ops.separate does) and I’m having some difficulties trying to achieve that.

To make a clear example - if I had a cube, selected 2 of it’s faces in Edit Mode and wanted to separate it as another object named „faces”, located at the same place where it was before – how would I do that with Python?
I've seen similar questions but I failed to find a direct answer. If there is any, just point it to me, please.

As it is recommended not to post any comments not related directly to the subject – in advance, Thank you very much to anyone who has some advice on this!

$\endgroup$
  • $\begingroup$ Sounds like the script has created new mesh in global coordinates. Instead, simply copy mesh in local coordinates and assign the copy object the matrix world of original. $\endgroup$ – batFINGER Dec 12 '18 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.