[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4155] contrib/py/scripts/addons/ space_view3d_quickPrefs.py: Fixed issues with loading a new file or opening a file
Sean Olson
seanolson at gmail.com
Thu Jan 10 02:30:38 CET 2013
Revision: 4155
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4155
Author: liquidape
Date: 2013-01-10 01:30:35 +0000 (Thu, 10 Jan 2013)
Log Message:
-----------
Fixed issues with loading a new file or opening a file
Modified Paths:
--------------
contrib/py/scripts/addons/space_view3d_quickPrefs.py
Modified: contrib/py/scripts/addons/space_view3d_quickPrefs.py
===================================================================
--- contrib/py/scripts/addons/space_view3d_quickPrefs.py 2013-01-09 01:38:37 UTC (rev 4154)
+++ contrib/py/scripts/addons/space_view3d_quickPrefs.py 2013-01-10 01:30:35 UTC (rev 4155)
@@ -614,12 +614,10 @@
else: #the folder is not empty
print('quickprefs: loading preset folder')
gllightpreset_loadpresets(1) #go ahead and load it
- else:
- pass
- #print('quickprefs: loading from bpy')
+ #print('quickprefs: loading from bpy')
#This function scans for changes of the index of the selected preset and updates the selection if needed
-#@persistent
+ at persistent
def gllightpreset_scan(context):
global lastindex
if debug==0:
@@ -628,7 +626,7 @@
gllightpreset_select()
#This function loads all the presets from a given folder (stored in bpy)
-#@persistent
+ at persistent
def gllightpreset_loadpresets(context):
gllightpreset_importall()
bpy.context.scene['gllightpreset_index']=0
@@ -934,9 +932,11 @@
def unregister(cls):
del bpy.types.Scene.quickprefs
+ at persistent
def setup(s):
#let the fun begin!
gllightpreset_chooseLoadLocation(1)
+ gllightpreset_scan(bpy.context)
def register():
#aliases
@@ -948,10 +948,9 @@
bpy.utils.register_class(SCENE_OT_gllightpreset)
bpy.utils.register_class(quickprefproperties)
- #handlers
- #handler.load_post.append(gllightpreset_chooseLoadLocation) #was crashing blender on new file load - comment for now
- handler.scene_update_pre.append(gllightpreset_scan)
+ #handler.scene_update_pre.append(gllightpreset_scan)
handler.scene_update_pre.append(setup)
+ #handler.load_post.append(setup) #was crashing blender on new file load - comment for now
More information about the Bf-extensions-cvs
mailing list