I was wondering if it is possible to activate the 'Split' tool in python. I'd like to make a script that loops through the selected objects polygons and splits them, creating an object with all its faces separated from each other. Is this possible? If not, is there a work-around? If none of this is possible, then could one make a script where it selects a face of an object, and selects the next face when the user presses the Y key (the hotkey for 'Split')? Thanks for any help in advance.
However, the functionality you want to create is already in blender, with CtrlE> Edge split, or
Note that you could also create and apply an Edge split modifier, however it's probably easier to use the
As for selecting the "next face", you can select a face by setting its
select value to
bpy.context.object.data.polygons.select = True will select the face with an index of
0 in the active object.
Note that you have to be in object mode for this to work:
The mesh data is accessed in object mode and intended for compact storage, for more flexible mesh editing from python see
You can set the mode with the
mode_set operator, e.g.
How you define the "next face" is up to you, as AFAIK there is no absolute definition of which face should be the "next" one.