diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-04-27 15:37:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-04-27 15:37:57 +0400 |
commit | db18b47be53d997e95f7f0d3ba796c0b1b4133b5 (patch) | |
tree | eaeeccc64c8cd523f2d5428646da992e608cc59f /source/blender/include/blendef.h | |
parent | bc059cb8b2b8b09553e4d02b4bcccd67ff73d8fd (diff) |
fix for own error when trying to fix python command line crash,
was calling screenmain() before executing the python script which meant it was never executed (therefore no crash :) )
Moved screenmain() back to the the end of main() and added a TESTBASELIB_BGMODE which checks for G.vd and uses the scene layer if its not there. Of course python should not be running stuff that uses G.vd :/
Also made python scripts stay attached to screens when LOAD UI is disabled. This means you can load a new blend file and the python console can stay open, has been tested for a while in the apricot branch.
Diffstat (limited to 'source/blender/include/blendef.h')
-rw-r--r-- | source/blender/include/blendef.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/include/blendef.h b/source/blender/include/blendef.h index 93e3aaf03dd..a798224b35b 100644 --- a/source/blender/include/blendef.h +++ b/source/blender/include/blendef.h @@ -96,6 +96,10 @@ #define TESTBASE(base) ( ((base)->flag & SELECT) && ((base)->lay & G.vd->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) ) #define TESTBASELIB(base) ( ((base)->flag & SELECT) && ((base)->lay & G.vd->lay) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0)) + +/* This is a TESTBASELIB that can work without a 3D view */ +#define TESTBASELIB_BGMODE(base) ( ((base)->flag & SELECT) && ((base)->lay & (G.vd ? G.vd->lay : G.scene->lay)) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0)) + #define BASE_SELECTABLE(base) ((base->lay & G.vd->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0) #define FIRSTBASE G.scene->base.first #define LASTBASE G.scene->base.last |