Subdivision smooth operator option after call from script

Hi, I create addon where last called operator is bpy.ops.mesh.subdivide
I want user to be able to setup the subdivide operator, but when I call this, subdivision is performed but there is no options for it. For example by F6 shortcut.

Here is my execute function of my operator where I want to call the subdivision operator

def execute(self,context):
        print ('select and smooth...')
        SelectRing()
        bpy.ops.mesh.subdivide(smoothness=1)
        return {'FINISHED'}

And Im using

    bl_options = {'REGISTER', 'UNDO'}

in my operator class

Kindly asking for help, how to call operator subdivision smooth from script with options :o

You can’t make the Redo panel work for operators called inside of operators, nor can you redo macros. You could add the relevant properties to the wrapping operator however, and pass them on to the sub-operator.

You might also invoke an operator in your operator, granted this operator shows a popup. But call order of ops isn’t considered:

import bpy

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"
    bl_options = {'REGISTER', 'UNDO'}

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def invoke(self, context, event):
        #bpy.ops.ed.undo_push(message="moop")
        bpy.ops.transform.translate(value=(1,0,0))
        bpy.ops.object.move_to_layer('INVOKE_DEFAULT', layers=[True]+[False]*19)
        return {'FINISHED'}

    
def register():
    bpy.utils.register_class(SimpleOperator)

def unregister():
    bpy.utils.unregister_class(SimpleOperator)


if __name__ == "__main__":
    register()


Translate and move to layer will be executed like if run in parallel, not after another.

Thank you for your reply, I would better not call the operator at all in this case. I have another question if there is a modal operator to detect if user clicked on edge. If not I think about solution that I would detect left click with modal operator event_type : ‘SELECTMOUSE’ and then I will compare current number of selected edges with previously stored list of selected edges. If lenght of lists will be different then it looks that user clicked on edge :slight_smile: It is tricky, but should work…, in spite of speed

There are no such callbacks and workarounds are rather expansive.