[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4231] contrib/py/scripts/addons/ oscurart_tools: Add overrides status in panel
Eugenio Pignataro
info at oscurart.com.ar
Sun Feb 3 19:25:17 CET 2013
Revision: 4231
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4231
Author: oscurart
Date: 2013-02-03 18:25:17 +0000 (Sun, 03 Feb 2013)
Log Message:
-----------
Add overrides status in panel
Modified Paths:
--------------
contrib/py/scripts/addons/oscurart_tools/__init__.py
contrib/py/scripts/addons/oscurart_tools/oscurart_overrides.py
Modified: contrib/py/scripts/addons/oscurart_tools/__init__.py
===================================================================
--- contrib/py/scripts/addons/oscurart_tools/__init__.py 2013-02-03 06:13:49 UTC (rev 4230)
+++ contrib/py/scripts/addons/oscurart_tools/__init__.py 2013-02-03 18:25:17 UTC (rev 4231)
@@ -248,7 +248,8 @@
col.label(text="Example: [[Group,Material]]")
col.prop(bpy.context.scene, '["OVERRIDE"]', text="")
col.operator("render.check_overrides", text="Check List", icon="ZOOM_ALL")
- col.operator("render.overrides_on", text="On / Off", icon="QUIT")
+ col.operator("render.overrides_on", text="On / Off", icon="QUIT")
+ col.label(text=str("OVERRIDES: ON" if bpy.use_overrides else "OVERRIDES: OFF"))
boxcol=layout.box().column(align=1)
boxcol.label(text="Danger Zone")
Modified: contrib/py/scripts/addons/oscurart_tools/oscurart_overrides.py
===================================================================
--- contrib/py/scripts/addons/oscurart_tools/oscurart_overrides.py 2013-02-03 06:13:49 UTC (rev 4230)
+++ contrib/py/scripts/addons/oscurart_tools/oscurart_overrides.py 2013-02-03 18:25:17 UTC (rev 4231)
@@ -80,7 +80,7 @@
DefOscRestoreOverrides(self)
return {'FINISHED'}
-OVERRIDESSTATUS = False
+bpy.use_overrides = False
class OscOverridesOn(bpy.types.Operator):
bl_idname = "render.overrides_on"
@@ -88,18 +88,15 @@
bl_options = {"REGISTER", "UNDO"}
def execute (self, context):
-
- global OVERRIDESSTATUS
-
- if OVERRIDESSTATUS == False:
+ if bpy.use_overrides == False:
bpy.app.handlers.render_pre.append(DefOscApplyOverrides)
bpy.app.handlers.render_post.append(DefOscRestoreOverrides)
- OVERRIDESSTATUS = True
+ bpy.use_overrides = True
print("Overrides on!")
else:
bpy.app.handlers.render_pre.remove(DefOscApplyOverrides)
bpy.app.handlers.render_post.remove(DefOscRestoreOverrides)
- OVERRIDESSTATUS = False
+ bpy.use_overrides = False
print("Overrides off!")
return {'FINISHED'}
More information about the Bf-extensions-cvs
mailing list