[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31844] trunk/blender/release/scripts/ui/ space_userpref.py: fix for addons UI with recent rna changes,

Campbell Barton ideasman42 at gmail.com
Thu Sep 9 16:22:10 CEST 2010


Revision: 31844
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31844
Author:   campbellbarton
Date:     2010-09-09 16:22:03 +0200 (Thu, 09 Sep 2010)

Log Message:
-----------
fix for addons UI with recent rna changes,
also moved temp properties from the scene into the window manager since they are not saved there.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_userpref.py

Modified: trunk/blender/release/scripts/ui/space_userpref.py
===================================================================
--- trunk/blender/release/scripts/ui/space_userpref.py	2010-09-09 13:58:38 UTC (rev 31843)
+++ trunk/blender/release/scripts/ui/space_userpref.py	2010-09-09 14:22:03 UTC (rev 31844)
@@ -912,20 +912,20 @@
 
         cats = ["All", "Enabled", "Disabled"] + sorted(cats)
 
-        bpy.types.Scene.EnumProperty(items=[(cat, cat, cat + " addons") for cat in cats],
-            name="Category", attr="addon_filter", description="Filter add-ons by category")
-        bpy.types.Scene.StringProperty(name="Search", attr="addon_search",
-            description="Search within the selected filter")
+        # use window manager ID since it wont be saved with the file
+        # defining every draw is stupid *FIXME*
+        bpy.types.WindowManager.addon_filter = bpy.props.EnumProperty(items=[(cat, cat, cat + " addons") for cat in cats], name="Category", description="Filter add-ons by category")
+        bpy.types.WindowManager.addon_search = bpy.props.StringProperty(name="Search", description="Search within the selected filter")
 
         split = layout.split(percentage=0.2)
         col = split.column()
-        col.prop(context.scene, "addon_filter", text="Filter", expand=True)
-        col.prop(context.scene, "addon_search", text="", icon='VIEWZOOM')
+        col.prop(context.window_manager, "addon_filter", text="Filter", expand=True)
+        col.prop(context.window_manager, "addon_search", text="", icon='VIEWZOOM')
 
         col = split.column()
 
-        filter = context.scene.addon_filter
-        search = context.scene.addon_search.lower()
+        filter = context.window_manager.addon_filter
+        search = context.window_manager.addon_search.lower()
 
         for mod, info in addons:
             module_name = mod.__name__





More information about the Bf-blender-cvs mailing list