[Bf-blender-cvs] [f2d5c539660] master: Fix accessing online manual for PropertyGroups
Campbell Barton
noreply at git.blender.org
Fri Jun 5 10:22:21 CEST 2020
Commit: f2d5c539660c2c817b0dba3012ba6f31c8251f0a
Author: Campbell Barton
Date: Fri Jun 5 18:06:44 2020 +1000
Branches: master
https://developer.blender.org/rBf2d5c539660c2c817b0dba3012ba6f31c8251f0a
Fix accessing online manual for PropertyGroups
Alternate fix for the issue raised in D7837
===================================================================
M release/scripts/startup/bl_operators/wm.py
===================================================================
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 633118c3b2e..4c4736cd669 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1016,10 +1016,15 @@ def _wm_doc_get_id(doc_id, do_url=True, url_prefix=""):
else:
rna = "bpy.ops.%s.%s" % (class_name, class_prop)
else:
- # an RNA setting, common case
- rna_class = getattr(bpy.types, class_name)
+ # An RNA setting, common case.
- # detect if this is a inherited member and use that name instead
+ # Check the built-in RNA types.
+ rna_class = getattr(bpy.types, class_name, None)
+ if rna_class is None:
+ # Check class for dynamically registered types.
+ rna_class = bpy.types.PropertyGroup.bl_rna_get_subclass_py(class_name)
+
+ # Detect if this is a inherited member and use that name instead.
rna_parent = rna_class.bl_rna
rna_prop = rna_parent.properties.get(class_prop)
if rna_prop:
More information about the Bf-blender-cvs
mailing list