I'm writing an operator for which it is crucial that every time it gets called all the properties are set to their default values.

The ops.object.delete has 1 param. use_global. It is always false, no matter what the user put in last time it got called. I would like to replicate exactly that.

(For example: I want to modify delta scale. The default val for my_factor is 1, so nothing happens until the user alters that number. If the user calls the operator again, it will have stored whatever number the user has used last, however I want it to always start with 1.)

  • 1
    $\begingroup$ if someone wants an answer adding a condition, like if the operator is running on a new object -> default value, else previous value, I posted an answer there. because the moderator thought it was off of topic. but thks for the question it was exactly what I needed. and just adding a condition to this... blenderartists.org/t/… $\endgroup$ Commented Aug 17, 2021 at 14:43

2 Answers 2


Add 'SKIP_SAVE' to the blender property option set.

When defining properties for the operator, any with 'SKIP_SAVE' in their property definition options set, will (like the name suggests) not be saved, and revert to their default value the next time the operator is invoked.

    scale_factor = bpy.props.FloatProperty(name="Scale Factor", 
  • $\begingroup$ Also a nice approach, also in my case simpler. Thank you. $\endgroup$ Commented Nov 10, 2017 at 20:42
  • $\begingroup$ Your answer has helped me A LOT. Many thanks! $\endgroup$
    – Yaroslav
    Commented Apr 10 at 14:44

Add an invoke method to your operator and reset your property.

import bpy

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

    d_loc = bpy.props.FloatProperty(name="Delta Location", default=1)

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

    def execute(self, context):        
        delta_vector = (self.d_loc, self.d_loc, self.d_loc)
        context.active_object.delta_location = delta_vector
        return {'FINISHED'}

    def invoke(self, context, event):
        self.d_loc = 1.0
        return self.execute(context)

def register():

def unregister():

if __name__ == "__main__":

    bpy.ops.object.simple_operator() # test call

Example based on Python > Templates > Operator Simple.

What do operator methods do?

  • $\begingroup$ Thank you very much, works like a charm. Just to be clear invoke() is what happens the 1. time you execute the operator and execute is what happens everytime you change a value? $\endgroup$ Commented Nov 10, 2017 at 9:51

You must log in to answer this question.

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