diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_blender.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_global.h | 32 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 3 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 39 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.h | 1 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 8 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 38 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 22 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 82 |
10 files changed, 182 insertions, 48 deletions
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 4fe1eec55c0..42ee11587a7 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -43,7 +43,7 @@ struct bContext; struct ReportList; #define BLENDER_VERSION 250 -#define BLENDER_SUBVERSION 1 +#define BLENDER_SUBVERSION 2 #define BLENDER_MINVERSION 250 #define BLENDER_MINSUBVERSION 0 diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index 7ce616c37c9..6323258ff43 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -126,26 +126,26 @@ typedef struct Global { #define G_AUTOPACK (1 << 0) #define G_FILE_COMPRESS (1 << 1) #define G_FILE_AUTOPLAY (1 << 2) -#define G_FILE_ENABLE_ALL_FRAMES (1 << 3) -#define G_FILE_SHOW_DEBUG_PROPS (1 << 4) -#define G_FILE_SHOW_FRAMERATE (1 << 5) -#define G_FILE_SHOW_PROFILE (1 << 6) +#define G_FILE_ENABLE_ALL_FRAMES (1 << 3) /* deprecated */ +#define G_FILE_SHOW_DEBUG_PROPS (1 << 4) /* deprecated */ +#define G_FILE_SHOW_FRAMERATE (1 << 5) /* deprecated */ +#define G_FILE_SHOW_PROFILE (1 << 6) /* deprecated */ #define G_FILE_LOCK (1 << 7) #define G_FILE_SIGN (1 << 8) #define G_FIle_PUBLISH (1 << 9) #define G_FILE_NO_UI (1 << 10) -#define G_FILE_GAME_TO_IPO (1 << 11) -#define G_FILE_GAME_MAT (1 << 12) -#define G_FILE_DISPLAY_LISTS (1 << 13) -#define G_FILE_SHOW_PHYSICS (1 << 14) -#define G_FILE_GAME_MAT_GLSL (1 << 15) -#define G_FILE_GLSL_NO_LIGHTS (1 << 16) -#define G_FILE_GLSL_NO_SHADERS (1 << 17) -#define G_FILE_GLSL_NO_SHADOWS (1 << 18) -#define G_FILE_GLSL_NO_RAMPS (1 << 19) -#define G_FILE_GLSL_NO_NODES (1 << 20) -#define G_FILE_GLSL_NO_EXTRA_TEX (1 << 21) -#define G_FILE_IGNORE_DEPRECATION_WARNINGS (1 << 22) +#define G_FILE_GAME_TO_IPO (1 << 11) /* deprecated */ +#define G_FILE_GAME_MAT (1 << 12) /* deprecated */ +#define G_FILE_DISPLAY_LISTS (1 << 13) /* deprecated */ +#define G_FILE_SHOW_PHYSICS (1 << 14) /* deprecated */ +#define G_FILE_GAME_MAT_GLSL (1 << 15) /* deprecated */ +#define G_FILE_GLSL_NO_LIGHTS (1 << 16) /* deprecated */ +#define G_FILE_GLSL_NO_SHADERS (1 << 17) /* deprecated */ +#define G_FILE_GLSL_NO_SHADOWS (1 << 18) /* deprecated */ +#define G_FILE_GLSL_NO_RAMPS (1 << 19) /* deprecated */ +#define G_FILE_GLSL_NO_NODES (1 << 20) /* deprecated */ +#define G_FILE_GLSL_NO_EXTRA_TEX (1 << 21) /* deprecated */ +#define G_FILE_IGNORE_DEPRECATION_WARNINGS (1 << 22) /* deprecated */ /* G.windowstate */ #define G_WINDOWSTATE_USERDEF 0 diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 8488d7ab247..2a8fd765386 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -442,6 +442,9 @@ Scene *add_scene(char *name) sce->gm.physubstep = 1; sce->gm.maxphystep = 5; + sce->gm.flag = GAME_DISPLAY_LISTS; + sce->gm.matmode = GAME_MAT_MULTITEX; + return sce; } diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 61f6cb8b44c..779a898bd6a 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5345,6 +5345,9 @@ static BHead *read_global(BlendFileData *bfd, FileData *fd, BHead *bhead) bfd->curscene= fg->curscene; MEM_freeN(fg); + + fd->globalf= bfd->globalf; + fd->fileflags= bfd->fileflags; return blo_nextbhead(fd, bhead); } @@ -9560,6 +9563,42 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } + if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 2)) { + Scene *sce; + + for(sce = main->scene.first; sce; sce = sce->id.next) { + if(fd->fileflags & G_FILE_ENABLE_ALL_FRAMES) + sce->gm.flag |= GAME_ENABLE_ALL_FRAMES; + if(fd->fileflags & G_FILE_SHOW_DEBUG_PROPS) + sce->gm.flag |= GAME_SHOW_DEBUG_PROPS; + if(fd->fileflags & G_FILE_SHOW_FRAMERATE) + sce->gm.flag |= GAME_SHOW_FRAMERATE; + if(fd->fileflags & G_FILE_SHOW_PHYSICS) + sce->gm.flag |= GAME_SHOW_PHYSICS; + if(fd->fileflags & G_FILE_GLSL_NO_SHADOWS) + sce->gm.flag |= GAME_GLSL_NO_SHADOWS; + if(fd->fileflags & G_FILE_GLSL_NO_SHADERS) + sce->gm.flag |= GAME_GLSL_NO_SHADERS; + if(fd->fileflags & G_FILE_GLSL_NO_RAMPS) + sce->gm.flag |= GAME_GLSL_NO_RAMPS; + if(fd->fileflags & G_FILE_GLSL_NO_NODES) + sce->gm.flag |= GAME_GLSL_NO_NODES; + if(fd->fileflags & G_FILE_GLSL_NO_EXTRA_TEX) + sce->gm.flag |= GAME_GLSL_NO_EXTRA_TEX; + if(fd->fileflags & G_FILE_IGNORE_DEPRECATION_WARNINGS) + sce->gm.flag |= GAME_IGNORE_DEPRECATION_WARNINGS; + + if(fd->fileflags & G_FILE_GAME_MAT_GLSL) + sce->gm.matmode= GAME_MAT_GLSL; + else if(fd->fileflags & G_FILE_GAME_MAT) + sce->gm.matmode= GAME_MAT_MULTITEX; + else + sce->gm.matmode= GAME_MAT_TEXFACE; + + sce->gm.flag |= GAME_DISPLAY_LISTS; + } + } + /* put 2.50 compatibility code here until next subversion bump */ { } diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h index f0e00b75b67..e39fefa8205 100644 --- a/source/blender/blenloader/intern/readfile.h +++ b/source/blender/blenloader/intern/readfile.h @@ -69,6 +69,7 @@ typedef struct FileData { int fileversion; int id_name_offs; /* used to retrieve ID names from (bhead+1) */ + int globalf, fileflags; /* for do_versions patching */ struct OldNewMap *datamap; struct OldNewMap *globmap; diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index cb07796ed67..466b55ba862 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -216,8 +216,7 @@ int draw_glsl_material(Scene *scene, Object *ob, View3D *v3d, int dt) if(ob==OBACT && (ob && ob->mode & OB_MODE_WEIGHT_PAINT)) return 0; - return ((G.fileflags & G_FILE_GAME_MAT) && - (G.fileflags & G_FILE_GAME_MAT_GLSL) && (dt >= OB_SHADED)); + return (scene->gm.matmode == GAME_MAT_GLSL) && (dt >= OB_SHADED); } static int check_material_alpha(Base *base, Mesh *me, int glsl) diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 01bc330267d..3140ae76d4b 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1855,7 +1855,7 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d) /* *********************** customdata **************** */ /* goes over all modes and view3d settings */ -static CustomDataMask get_viewedit_datamask(bScreen *screen, Object *ob) +static CustomDataMask get_viewedit_datamask(bScreen *screen, Scene *scene, Object *ob) { CustomDataMask mask = CD_MASK_BAREMESH; ScrArea *sa; @@ -1875,10 +1875,8 @@ static CustomDataMask get_viewedit_datamask(bScreen *screen, Object *ob) if((view->drawtype == OB_TEXTURE) || ((view->drawtype == OB_SOLID) && (view->flag2 & V3D_SOLID_TEX))) { mask |= CD_MASK_MTFACE | CD_MASK_MCOL; - if((G.fileflags & G_FILE_GAME_MAT) && - (G.fileflags & G_FILE_GAME_MAT_GLSL)) { + if(scene->gm.matmode == GAME_MAT_GLSL) mask |= CD_MASK_ORCO; - } } } } @@ -1909,7 +1907,7 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar) char *grid_unit= NULL; /* from now on all object derived meshes check this */ - v3d->customdata_mask= get_viewedit_datamask(CTX_wm_screen(C), obact); + v3d->customdata_mask= get_viewedit_datamask(CTX_wm_screen(C), scene, obact); /* shadow buffers, before we setup matrices */ if(draw_glsl_material(scene, NULL, v3d, v3d->drawtype)) diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index c85e2b5a7f1..c0fb069fc41 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -500,7 +500,7 @@ static void ramp_diffuse_result(GPUShadeInput *shi, GPUNodeLink **diff) GPUMaterial *mat= shi->gpumat; GPUNodeLink *fac; - if(!(G.fileflags & G_FILE_GLSL_NO_RAMPS)) { + if(!(mat->scene->gm.flag & GAME_GLSL_NO_RAMPS)) { if(ma->ramp_col) { if(ma->rampin_col==MA_RAMP_IN_RESULT) { GPU_link(mat, "ramp_rgbtobw", *diff, &fac); @@ -516,7 +516,7 @@ static void add_to_diffuse(GPUMaterial *mat, Material *ma, GPUShadeInput *shi, G { GPUNodeLink *fac, *tmp, *addcol; - if(!(G.fileflags & G_FILE_GLSL_NO_RAMPS) && + if(!(mat->scene->gm.flag & GAME_GLSL_NO_RAMPS) && ma->ramp_col && (ma->mode & MA_RAMP_COL)) { /* MA_RAMP_IN_RESULT is exceptional */ if(ma->rampin_col==MA_RAMP_IN_RESULT) { @@ -556,7 +556,7 @@ static void ramp_spec_result(GPUShadeInput *shi, GPUNodeLink **spec) GPUMaterial *mat= shi->gpumat; GPUNodeLink *fac; - if(!(G.fileflags & G_FILE_GLSL_NO_RAMPS) && + if(!(mat->scene->gm.flag & GAME_GLSL_NO_RAMPS) && ma->ramp_spec && ma->rampin_spec==MA_RAMP_IN_RESULT) { GPU_link(mat, "ramp_rgbtobw", *spec, &fac); @@ -644,7 +644,7 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la is= inp; /* Lambert */ - if(!(G.fileflags & G_FILE_GLSL_NO_SHADERS)) { + if(!(mat->scene->gm.flag & GAME_GLSL_NO_SHADERS)) { if(ma->diff_shader==MA_DIFF_ORENNAYAR) GPU_link(mat, "shade_diffuse_oren_nayer", inp, vn, lv, view, GPU_uniform(&ma->roughness), &is); else if(ma->diff_shader==MA_DIFF_TOON) @@ -656,7 +656,7 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la } } - if(!(G.fileflags & G_FILE_GLSL_NO_SHADERS)) + if(!(mat->scene->gm.flag & GAME_GLSL_NO_SHADERS)) if(ma->shade_flag & MA_CUBIC) GPU_link(mat, "shade_cubic", is, &is); @@ -671,7 +671,7 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la // done in shade_visifac now, GPU_link(mat, "mtex_value_clamp_positive", i, &i); if((ma->mode & MA_SHADOW) && GPU_lamp_has_shadow_buffer(lamp)) { - if(!(G.fileflags & G_FILE_GLSL_NO_SHADOWS)) { + if(!(mat->scene->gm.flag & GAME_GLSL_NO_SHADOWS)) { mat->dynproperty |= DYN_LAMP_PERSMAT; GPU_link(mat, "test_shadowbuf", @@ -700,7 +700,7 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la GPU_link(mat, "math_multiply", i, shadfac, &i); } } - else if((G.fileflags & G_FILE_GLSL_NO_SHADOWS) && (lamp->mode & LA_ONLYSHADOW)) { + else if((mat->scene->gm.flag & GAME_GLSL_NO_SHADOWS) && (lamp->mode & LA_ONLYSHADOW)) { add_user_list(&mat->lamps, lamp); add_user_list(&lamp->materials, shi->gpumat->ma); return; @@ -716,7 +716,7 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la } } - if(G.fileflags & G_FILE_GLSL_NO_SHADERS); + if(mat->scene->gm.flag & GAME_GLSL_NO_SHADERS); else if(!(lamp->mode & LA_NO_SPEC) && !(lamp->mode & LA_ONLYSHADOW) && (GPU_link_changed(shi->spec) || ma->spec != 0.0f)) { if(lamp->type == LA_HEMI) { @@ -1015,11 +1015,11 @@ static void do_material_tex(GPUShadeInput *shi) if(mtex->mapto & MAP_COL) texture_rgb_blend(mat, tcol, shi->rgb, tin, colfac, mtex->blendtype, &shi->rgb); - if(!(G.fileflags & G_FILE_GLSL_NO_EXTRA_TEX) && (mtex->mapto & MAP_COLSPEC)) + if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && (mtex->mapto & MAP_COLSPEC)) texture_rgb_blend(mat, tcol, shi->specrgb, tin, colfac, mtex->blendtype, &shi->specrgb); } - if(!(G.fileflags & G_FILE_GLSL_NO_EXTRA_TEX) && (mtex->mapto & MAP_NORM)) { + if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && (mtex->mapto & MAP_NORM)) { if(mtex->maptoneg & MAP_NORM) tex->norfac= -mtex->norfac; else tex->norfac= mtex->norfac; @@ -1065,22 +1065,22 @@ static void do_material_tex(GPUShadeInput *shi) GPU_link(mat, "mtex_rgbtoint", trgb, &tin); } - if(!(G.fileflags & G_FILE_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_REF) { + if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_REF) { int flip= mtex->maptoneg & MAP_REF; texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->refl, tin, varfac, mtex->blendtype, flip, &shi->refl); GPU_link(mat, "mtex_value_clamp_positive", shi->refl, &shi->refl); } - if(!(G.fileflags & G_FILE_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_SPEC) { + if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_SPEC) { int flip= mtex->maptoneg & MAP_SPEC; texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->spec, tin, varfac, mtex->blendtype, flip, &shi->spec); GPU_link(mat, "mtex_value_clamp_positive", shi->spec, &shi->spec); } - if(!(G.fileflags & G_FILE_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_EMIT) { + if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_EMIT) { int flip= mtex->maptoneg & MAP_EMIT; texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->emit, tin, varfac, mtex->blendtype, flip, &shi->emit); GPU_link(mat, "mtex_value_clamp_positive", shi->emit, &shi->emit); } - if(!(G.fileflags & G_FILE_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_HAR) { + if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_HAR) { int flip= mtex->maptoneg & MAP_HAR; GPU_link(mat, "mtex_har_divide", shi->har, &shi->har); texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->har, tin, varfac, mtex->blendtype, flip, &shi->har); @@ -1091,7 +1091,7 @@ static void do_material_tex(GPUShadeInput *shi) texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->alpha, tin, varfac, mtex->blendtype, flip, &shi->alpha); GPU_link(mat, "mtex_value_clamp", shi->alpha, &shi->alpha); } - if(!(G.fileflags & G_FILE_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_AMB) { + if(!(mat->scene->gm.flag & GAME_GLSL_NO_EXTRA_TEX) && mtex->mapto & MAP_AMB) { int flip= mtex->maptoneg & MAP_AMB; texture_value_blend(mat, GPU_uniform(&mtex->def_var), shi->amb, tin, varfac, mtex->blendtype, flip, &shi->amb); GPU_link(mat, "mtex_value_clamp", shi->amb, &shi->amb); @@ -1142,7 +1142,7 @@ void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr) if((ma->mode & MA_TRANSP) && (ma->mode & MA_ZTRANSP)) GPU_material_enable_alpha(mat); - if((G.fileflags & G_FILE_GLSL_NO_LIGHTS) || (ma->mode & MA_SHLESS)) { + if((mat->scene->gm.flag & GAME_GLSL_NO_LIGHTS) || (ma->mode & MA_SHLESS)) { shr->combined = shi->rgb; shr->alpha = shi->alpha; GPU_link(mat, "set_rgb", shi->rgb, &shr->diff); @@ -1251,7 +1251,7 @@ GPUMaterial *GPU_material_from_blender(Scene *scene, Material *ma) mat = GPU_material_construct_begin(ma); mat->scene = scene; - if(!(G.fileflags & G_FILE_GLSL_NO_NODES) && ma->nodetree && ma->use_nodes) { + if(!(scene->gm.flag & GAME_GLSL_NO_NODES) && ma->nodetree && ma->use_nodes) { ntreeGPUMaterialNodes(ma->nodetree, mat); } else { @@ -1458,8 +1458,8 @@ void GPU_lamp_free(Object *ob) int GPU_lamp_has_shadow_buffer(GPULamp *lamp) { - return (!(G.fileflags & G_FILE_GLSL_NO_SHADOWS) && - !(G.fileflags & G_FILE_GLSL_NO_LIGHTS) && + return (!(lamp->scene->gm.flag & GAME_GLSL_NO_SHADOWS) && + !(lamp->scene->gm.flag & GAME_GLSL_NO_LIGHTS) && lamp->tex && lamp->fb); } diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index f00813b58f1..4a3d555ca33 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -387,7 +387,7 @@ typedef struct GameData { * bit 3: (gameengine): Activity culling is enabled. * bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling */ - short mode, pad11; + short mode, flag, matmode, pad[3]; short occlusionRes; /* resolution of occlusion Z buffer in pixel */ short physicsEngine; short ticrate, maxlogicstep, physubstep, maxphystep; @@ -401,6 +401,7 @@ typedef struct GameData { struct GameDome dome; short stereoflag, stereomode, xsch, ysch; //xsch and ysch can be deleted !!! } GameData; + #define STEREO_NOSTEREO 1 #define STEREO_ENABLED 2 #define STEREO_DOME 3 @@ -422,6 +423,25 @@ typedef struct GameData { #define WOPHY_ODE 4 #define WOPHY_BULLET 5 +/* GameData.flag */ +#define GAME_ENABLE_ALL_FRAMES (1 << 1) +#define GAME_SHOW_DEBUG_PROPS (1 << 2) +#define GAME_SHOW_FRAMERATE (1 << 3) +#define GAME_SHOW_PHYSICS (1 << 4) +#define GAME_DISPLAY_LISTS (1 << 5) +#define GAME_GLSL_NO_LIGHTS (1 << 6) +#define GAME_GLSL_NO_SHADERS (1 << 7) +#define GAME_GLSL_NO_SHADOWS (1 << 8) +#define GAME_GLSL_NO_RAMPS (1 << 9) +#define GAME_GLSL_NO_NODES (1 << 10) +#define GAME_GLSL_NO_EXTRA_TEX (1 << 11) +#define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12) + +/* GameData.matmode */ +#define GAME_MAT_TEXFACE 0 +#define GAME_MAT_MULTITEX 1 +#define GAME_MAT_GLSL 2 + typedef struct TimeMarker { struct TimeMarker *next, *prev; int frame; diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index bb6611205b6..c8be3c7afac 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -776,9 +776,9 @@ void rna_def_scene_game_data(BlenderRNA *brna) PropertyRNA *prop; static EnumPropertyItem framing_types_items[] ={ - {SCE_GAMEFRAMING_BARS, "BARS", 0, "Stretch", ""}, - {SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend", ""}, - {SCE_GAMEFRAMING_SCALE, "SCALE", 0, "Scale", ""}, + {SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox", "Show the entire viewport in the display window, using bar horizontally or vertically"}, + {SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend", "Show the entire viewport in the display window, viewing more horizontally or vertically"}, + {SCE_GAMEFRAMING_SCALE, "SCALE", 0, "Scale", "Stretch or squeeze the viewport to fill the display window"}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem dome_modes_items[] ={ @@ -801,7 +801,7 @@ void rna_def_scene_game_data(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem stereo_items[] ={ - {STEREO_NOSTEREO, "NO_STEREO", 0, "No Stereo", ""}, + {STEREO_NOSTEREO, "NONE", 0, "None", ""}, {STEREO_ENABLED, "STEREO", 0, "Stereo", ""}, {STEREO_DOME, "DOME", 0, "Dome", ""}, {0, NULL, 0, NULL, NULL}}; @@ -815,6 +815,12 @@ void rna_def_scene_game_data(BlenderRNA *brna) {WOPHY_BULLET, "BULLET", 0, "Bullet", ""}, {0, NULL, 0, NULL, NULL}}; + static EnumPropertyItem material_items[] ={ + {GAME_MAT_TEXFACE, "TEXTURE_FACE", 0, "Texture Face", "Single texture face materials."}, + {GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitexture materials."}, + {GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders."}, + {0, NULL, 0, NULL, NULL}}; + srna= RNA_def_struct(brna, "SceneGameData", NULL); RNA_def_struct_sdna(srna, "GameData"); RNA_def_struct_nested(brna, srna, "Scene"); @@ -979,6 +985,74 @@ void rna_def_scene_game_data(BlenderRNA *brna) RNA_def_property_range(prop, 0.0, 1000.0); RNA_def_property_ui_text(prop, "box radius", "Radius of the activity bubble, in Manhattan length. Objects outside the box are activity-culled"); RNA_def_property_update(prop, NC_SCENE, NULL); + + /* booleans */ + prop= RNA_def_property(srna, "all_frames", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_ENABLE_ALL_FRAMES); + RNA_def_property_ui_text(prop, "All Frames", "Render as many frames as possible, rather than respecting framerate."); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop= RNA_def_property(srna, "show_debug_properties", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_DEBUG_PROPS); + RNA_def_property_ui_text(prop, "Show Debug Properties", "Show properties marked for debugging while the game runs."); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop= RNA_def_property(srna, "show_framerate_profile", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_FRAMERATE); + RNA_def_property_ui_text(prop, "Show Framerate and Profile", "Show framerate and profiling information while the game runs."); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop= RNA_def_property(srna, "show_physics_visualization", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_PHYSICS); + RNA_def_property_ui_text(prop, "Show Physics Visualization", "Show a visualization of physics bounds and interactions."); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop= RNA_def_property(srna, "display_lists", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_DISPLAY_LISTS); + RNA_def_property_ui_text(prop, "Display Lists", "Use display lists to speed up rendering by keeping geometry on the GPU."); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop= RNA_def_property(srna, "deprecation_warnings", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_IGNORE_DEPRECATION_WARNINGS); + RNA_def_property_ui_text(prop, "Deprecation Warnings", "Print warnings when using deprecated features in the python API."); + RNA_def_property_update(prop, NC_SCENE, NULL); + + /* materials */ + prop= RNA_def_property(srna, "material_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "matmode"); + RNA_def_property_enum_items(prop, material_items); + RNA_def_property_ui_text(prop, "Material Mode", "Material mode to use for rendering."); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop= RNA_def_property(srna, "glsl_lights", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_LIGHTS); + RNA_def_property_ui_text(prop, "GLSL Lights", "Use lights for GLSL rendering."); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop= RNA_def_property(srna, "glsl_shaders", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADERS); + RNA_def_property_ui_text(prop, "GLSL Shaders", "Use shaders for GLSL rendering."); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop= RNA_def_property(srna, "glsl_shadows", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADOWS); + RNA_def_property_ui_text(prop, "GLSL Shadows", "Use shadows for GLSL rendering."); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop= RNA_def_property(srna, "glsl_ramps", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_RAMPS); + RNA_def_property_ui_text(prop, "GLSL Ramps", "Use ramps for GLSL rendering."); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop= RNA_def_property(srna, "glsl_nodes", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_NODES); + RNA_def_property_ui_text(prop, "GLSL Nodes", "Use nodes for GLSL rendering."); + RNA_def_property_update(prop, NC_SCENE, NULL); + + prop= RNA_def_property(srna, "glsl_extra_textures", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_EXTRA_TEX); + RNA_def_property_ui_text(prop, "GLSL Extra Textures", "Use extra textures like normal or specular maps for GLSL rendering."); + RNA_def_property_update(prop, NC_SCENE, NULL); } static void rna_def_scene_render_layer(BlenderRNA *brna) |