I have a model that I want to split all the connected tris into individual trigons. This is for a tutorial that I am working on demonstrating the remove doubles feature and working around mesh that have shapekeys and flipped normals.
If I select a face and press Y that face splits from the connecting tris use the python function
bpy.ops.mesh.split()
I thought this would be easy simply by walking through the polygons, selecting them and calling the split function.
So I put the model into Edit mode tried this code…
(meshes is defined as the context selected mesh object and the object is in edit mode)
for obj in meshes:
for sel in obj.data.polygons:
sel.select = True
bpy.ops.mesh.split()
sel.select = False
The code runs without error, but nothing splits.
I don’t want to separate by polys and rejoin as the model is very large.
So you want to basically just split every face (edge) in your model? Maybe edge split modifier with “split angel” set to 0 could help?
Edit : As someone said below there is a actually “edge split” tool (ctrl+e > edge split). I never used it, i always used “V” hotkey (rip vertices) to split some edges.
And i think nothing splits because that’s not how this operator supposed to work. It should split boundary edge loop of your current selection from the rest of the model , so when you select the whole model it can’t split itself from itself, if that’s what you were trying to do. (i don’t know anything about coding, so i can’t tell what your code was supposed to do, so i could be wrong)
Oh, i knew your name looked familiar, just remembered where i saw it. I watched couple of your tutorials, thank you! They are very detailed and informative.
If you’re ok doing splitting with UI operators and not with Python then Ctrl+E > Edge Split is what you want (or indeed Edge Split modifier though it needs to be applied). In 2.8 the command should be in the same menu as in 2.79.