[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3438] trunk/py/scripts/addons/modules/ rna_wiki_reference.py: use a tuple rather then a dict()

Campbell Barton ideasman42 at gmail.com
Fri Jun 1 23:29:57 CEST 2012


Revision: 3438
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3438
Author:   campbellbarton
Date:     2012-06-01 21:29:57 +0000 (Fri, 01 Jun 2012)
Log Message:
-----------
use a tuple rather then a dict()

Modified Paths:
--------------
    trunk/py/scripts/addons/modules/rna_wiki_reference.py

Modified: trunk/py/scripts/addons/modules/rna_wiki_reference.py
===================================================================
--- trunk/py/scripts/addons/modules/rna_wiki_reference.py	2012-06-01 20:39:32 UTC (rev 3437)
+++ trunk/py/scripts/addons/modules/rna_wiki_reference.py	2012-06-01 21:29:57 UTC (rev 3438)
@@ -5,13 +5,14 @@
 
 url_manual_prefix = "http://wiki.blender.org/index.php/Doc:2.6/Manual/"
 
-# the key is infact a regex mapping '.*' means anything.
-url_manual_mapping = {
-    "bpy.types.ArmatureModifier.*": "Modifiers/Deform/Armature",
-    "bpy.types.SmoothModifier.*": "Modifiers/Deform/Smooth",
-    "bpy.types.SubsurfModifier.*":  "Modifiers/Generate/Subsurf",
+# - The first item is a regex mapping '.*' means anything.
+# - Expressions are evaluated top down (include catch-all expressions last).
+url_manual_mapping = (
+    ("bpy.types.ArmatureModifier.*", "Modifiers/Deform/Armature"),
+    ("bpy.types.SmoothModifier.*", "Modifiers/Deform/Smooth"),
+    ("bpy.types.SubsurfModifier.*", "Modifiers/Generate/Subsurf"),
     
-    "bpy.types.Material.diffuse.*":  "Materials/Properties/Diffuse_Shaders",
-}
+    ("bpy.types.Material.diffuse.*", "Materials/Properties/Diffuse_Shaders"),
+)
 
 # may have 'url_reference_mapping'... etc later



More information about the Bf-extensions-cvs mailing list