diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-24 01:50:40 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-24 01:50:40 +0400 |
commit | 366a64959c5950c2fd29f3b1fe74adbd9f420988 (patch) | |
tree | a3ca649622cea57340b639e69b6195072ec936c5 /source/blender/editors/space_buttons | |
parent | 1ee8038e41f2daf3aaac40e58d7cdc416d2af35d (diff) |
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 30 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_header.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/space_buttons.c | 2 |
3 files changed, 1 insertions, 33 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 9048565b01f..1ebab105086 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -360,32 +360,7 @@ static int buttons_context_path_texture(ButsContextPath *path) return 0; } -static int buttons_context_path_game(ButsContextPath *path) -{ - /* XXX temporary context. Using material slot instead of ob->game_data */ - Object *ob; - PointerRNA *ptr= &path->ptr[path->len-1]; - Material *ma; - - /* if we already have a (pinned) material, we're done */ - if(RNA_struct_is_a(ptr->type, &RNA_Material)) { - return 1; - } - /* if we have an object, use the object material slot */ - else if(buttons_context_path_object(path)) { - ob= path->ptr[path->len-1].data; - if(ob && ob->type && (ob->type<OB_LAMP)) { - ma= give_current_material(ob, ob->actcol); - RNA_id_pointer_create(&ma->id, &path->ptr[path->len]); - path->len++; - return 1; - } - } - - /* no path to a material possible */ - return 0; -} static int buttons_context_path(const bContext *C, ButsContextPath *path, int mainb, int worldtex) { SpaceButs *sbuts= (SpaceButs*)CTX_wm_space_data(C); @@ -430,9 +405,6 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma case BCONTEXT_DATA: found= buttons_context_path_data(path, -1); break; - case BCONTEXT_GAME: - found= buttons_context_path_game(path); - break; case BCONTEXT_PARTICLE: found= buttons_context_path_particle(path); break; @@ -526,7 +498,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r if(CTX_data_dir(member)) { static const char *dir[] = { "world", "object", "mesh", "armature", "lattice", "curve", - "meta_ball", "lamp", "camera", "material", "material_slot", "game", + "meta_ball", "lamp", "camera", "material", "material_slot", "texture", "texture_slot", "bone", "edit_bone", "particle_system", "cloth", "soft_body", "fluid", "collision", NULL}; diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index 0fb00b2780b..0f6ef6fe570 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -124,8 +124,6 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_PARTICLES, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_PARTICLE, 0, 0, "Particles"); if(sbuts->pathflag & (1<<BCONTEXT_PHYSICS)) uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_PHYSICS, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_PHYSICS, 0, 0, "Physics"); - if(sbuts->pathflag & (1<<BCONTEXT_GAME)) - uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_GAME, xco+=BUTS_UI_UNIT, yco, BUTS_UI_UNIT, BUTS_UI_UNIT, &(sbuts->mainb), 0.0, (float)BCONTEXT_GAME, 0, 0, "Game"); xco+= BUTS_UI_UNIT; uiBlockEndAlign(block); diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 05d181ba330..8284744d519 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -177,8 +177,6 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar) ED_region_panels(C, ar, vertical, "modifier"); else if (sbuts->mainb == BCONTEXT_CONSTRAINT) ED_region_panels(C, ar, vertical, "constraint"); - else if (sbuts->mainb == BCONTEXT_GAME) - ED_region_panels(C, ar, vertical, "game"); sbuts->re_align= 0; sbuts->mainbo= sbuts->mainb; |