Fix bpy.context.copy() including evaluated_depsgraph_get

This commit is contained in:
Campbell Barton
2023-12-08 22:15:52 +11:00
parent 048ccbe4d2
commit 91319641eb
+11 -3
View File
@@ -87,12 +87,20 @@ class Context(StructRNA):
new_context = {}
generic_attrs = (
*StructRNA.__dict__.keys(),
"bl_rna", "rna_type", "copy",
"bl_rna",
"rna_type",
"copy",
)
function_types = {BuiltinMethodType, bpy_types.bpy_func}
for attr in dir(self):
if not (attr.startswith("_") or attr in generic_attrs):
if attr.startswith("_"):
continue
if attr in generic_attrs:
continue
value = getattr(self, attr)
if type(value) != BuiltinMethodType:
if type(value) in function_types:
continue
new_context[attr] = value
return new_context