Let’s say that I have an operator, it does uses some complex things in many contexts, but in the end, the last operator is left open to be edited by the user.
Though I think that I will have eventually call the custom draw method, I want to avoid that if possible.
https://docs.blender.org/api/current/bpy.types.Operator.html
Definitely I am interested to see if there is some technique to do this thing in an easier way.
import bpy
class SimpleOperator(bpy.types.Operator):
bl_idname = "mesh.simple_operator"
bl_label = "Simple Mesh Operator"
def execute(self, context):
print('doing some operations first')
print('now subdividing')
# this should open it's own dialog -- not of this operator
bpy.ops.mesh.subdivide(smoothness=0)
return {'FINISHED'}
def register():
bpy.utils.register_class(SimpleOperator)
def unregister():
bpy.utils.unregister_class(SimpleOperator)
if __name__ == "__main__":
try:unregister()
except:pass
register()