I tried to extend my own Operator but it doesn't work.
What am I doing wrong?
If I add this operator I get "Test"
class OperatorX(bpy.types.Operator):
bl_idname = "test.x"
bl_label = "Test X"
strprop = bpy.props.StringProperty(default = "Test")
def execute(self, context):
print(self.strprop)
return {'FINISHED'}
Then I add the next operator extends the first.
class OperatorY(OperatorX):
bl_idname = "test.y"
bl_label = "Test Y"
def execute(self, context):
print(self.strprop)
return {'FINISHED'}
If I call OperatorX I get:
bpy_class_call: unable to get python class for rna struct 'TEST_OT_x'
And if I call OperatorY I get:
(<built-in function StringProperty>, {'attr': 'strprop', 'default': 'Test'})
I need a few operators with the same properties but different execution. How to solve it?
Florian