Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
blender
blender-addons
Commits
e7681517
Commit
e7681517
authored
Sep 13, 2018
by
Campbell Barton
Browse files
Prefer get_rna_type() since it doesn't leak memory
parent
b8c9542f
Changes
2
Hide whitespace changes
Inline
Side-by-side
development_edit_operator.py
View file @
e7681517
...
...
@@ -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
)
...
...
io_export_paper_model.py
View file @
e7681517
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment