Give border render coordinates a sane default, so enabling border in the

render properties shows the render border in the 3d view.
This commit is contained in:
2010-02-02 17:28:53 +00:00
parent d20397661f
commit 942e1fc6a8
2 changed files with 19 additions and 3 deletions

View File

@@ -367,6 +367,11 @@ Scene *add_scene(char *name)
sce->r.cineonblack= 95;
sce->r.cineonwhite= 685;
sce->r.cineongamma= 1.7f;
sce->r.border.xmin= 0.0f;
sce->r.border.ymin= 0.0f;
sce->r.border.xmax= 1.0f;
sce->r.border.ymax= 1.0f;
sce->toolsettings = MEM_callocN(sizeof(struct ToolSettings),"Tool Settings Struct");
sce->toolsettings->cornertype=1;

View File

@@ -10654,9 +10654,20 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
/* put 2.50 compatibility code here until next subversion bump */
//{
//}
{
Scene *sce;
/* initialize to sane default so toggling on border shows something */
for(sce = main->scene.first; sce; sce = sce->id.next) {
if(sce->r.border.xmin == 0.0f && sce->r.border.ymin == 0.0f &&
sce->r.border.xmax == 0.0f && sce->r.border.ymax == 0.0f) {
sce->r.border.xmin= 0.0f;
sce->r.border.ymin= 0.0f;
sce->r.border.xmax= 1.0f;
sce->r.border.ymax= 1.0f;
}
}
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */