I run an operator in the console, but the operator properties are not shown in Tool Panel. enter image description here

enter image description here

However, if I run the operator from search, the properties will be shown up. enter image description here enter image description here

How to show operator properties when running operator in scripts or console?


1 Answer 1


That is called the Redo Panel. Built in operators executed from the command line won't automatically show up here. You would need to make your own operator class with an execute function that has its own properties that are used in executing the operator.

import bpy
from bpy.props import IntProperty, FloatProperty

class BoxOperator(bpy.types.Operator):
    """example of making a box"""
    bl_idname = "object.box_operator"
    bl_label = "Simple Box Operator"
    bl_options = {"REGISTER","UNDO"}

    x_location = FloatProperty()

    def execute(self, context):
        bpy.ops.mesh.primitive_cube_add(enter_editmode=False, location=(self.x_location, 0, 0))
        return {'FINISHED'}

def register():

def unregister():

if __name__ == "__main__":

    # test call

Executing this as a script will work. However, if you register this class and run it from the python console, you will still not get a redo panel. You would need to enter all of this line by line into the python console or execute the operator from the 3d view.

  • $\begingroup$ The panel won't show up if I run the operator in the console. $\endgroup$ Jun 13, 2019 at 16:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .