Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-27 10:15:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-03-27 10:15:55 +0400
commit9b19c564ef9e41f8892b0174196cb0e41e9d2d30 (patch)
treece76cb1435f6114b6baf401c816f54e3619eae27 /release/scripts
parent50a06eccff48a2029fa085dc8459246ff8c6394e (diff)
fix for 'View Docs' with inherited properties, eg: "Object.name", is inherited and needs to open the URL of "ID.name".
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/startup/bl_operators/wm.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index df51af25b02..bb5f3a3a2a9 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -617,6 +617,15 @@ class WM_OT_doc_view(bpy.types.Operator):
url = '%s/bpy.ops.%s.html#bpy.ops.%s.%s' % \
(self._prefix, class_name, class_name, class_prop)
else:
+
+ # detect if this is a inherited member and use that name instead
+ rna_parent = getattr(bpy.types, class_name).bl_rna
+ rna_prop = rna_parent.properties[class_prop]
+ rna_parent = rna_parent.base
+ while rna_parent and rna_prop == rna_parent.properties.get(class_prop):
+ class_name = rna_parent.identifier
+ rna_parent = rna_parent.base
+
# It so happens that epydoc nests these, not sphinx
# class_name_full = self._nested_class_string(class_name)
url = '%s/bpy.types.%s.html#bpy.types.%s.%s' % \