[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11154] trunk/blender/source/blender/src/ drawimage.c: "Render to image editor" to render to Buttons Window as the last alternative:
Juho Vepsalainen
bebraw at gmail.com
Tue Jul 3 13:39:37 CEST 2007
Revision: 11154
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11154
Author: bebraw
Date: 2007-07-03 13:39:36 +0200 (Tue, 03 Jul 2007)
Log Message:
-----------
"Render to image editor" to render to Buttons Window as the last alternative:
"Render to image editor" renders to Buttons Window only if no other suitable
windows are available. Other window types are prioritized before Buttons
Window.
Modified Paths:
--------------
trunk/blender/source/blender/src/drawimage.c
Modified: trunk/blender/source/blender/src/drawimage.c
===================================================================
--- trunk/blender/source/blender/src/drawimage.c 2007-07-03 07:39:17 UTC (rev 11153)
+++ trunk/blender/source/blender/src/drawimage.c 2007-07-03 11:39:36 UTC (rev 11154)
@@ -2105,20 +2105,31 @@
}
}
+/* returns biggest area that is not uv/image editor. Note that it uses buttons */
+/* window as the last possible alternative. */
static ScrArea *biggest_non_image_area(void)
{
ScrArea *sa, *big= NULL;
- int size, maxsize= 0;
+ int size, maxsize= 0, bwmaxsize= 0;
+ short foundwin= 0;
for(sa= G.curscreen->areabase.first; sa; sa= sa->next) {
- if(sa->spacetype!=SPACE_IMAGE) {
+ if(sa->winx > 10 && sa->winy > 10) {
size= sa->winx*sa->winy;
- if(sa->winx > 10 && sa->winy > 10 && size > maxsize) {
+ if(sa->spacetype == SPACE_BUTS) {
+ if(foundwin == 0 && size > bwmaxsize) {
+ bwmaxsize= size;
+ big= sa;
+ }
+ }
+ else if(sa->spacetype != SPACE_IMAGE && size > maxsize) {
maxsize= size;
big= sa;
+ foundwin= 1;
}
}
}
+
return big;
}
More information about the Bf-blender-cvs
mailing list