Commit e7681517 authored by Campbell Barton's avatar Campbell Barton
Browse files

Prefer get_rna_type() since it doesn't leak memory

parent b8c9542f
......@@ -43,7 +43,7 @@ def get_py_class_from_op(opname):
opid = opname.split(".")
opmod = getattr(bpy.ops, opid[0])
op = getattr(opmod, opid[1])
id = op.get_rna().bl_rna.identifier
id = op.get_rna_type().identifier
# C operators won't be added
return getattr(bpy.types, id, None)
......
......@@ -2357,7 +2357,7 @@ class AddPresetPaperModel(bl_operators.presets.AddPresetBase, bpy.types.Operator
@property
def preset_values(self):
op = bpy.ops.export_mesh.paper_model
properties = op.get_rna().bl_rna.properties.items()
properties = op.get_rna_type().properties.items()
blacklist = bpy.types.Operator.bl_rna.properties.keys()
return [
"op.{}".format(prop_id) for (prop_id, prop) in properties
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment