diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-24 01:35:11 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-24 01:35:11 +0400 |
commit | 1ee8038e41f2daf3aaac40e58d7cdc416d2af35d (patch) | |
tree | dc2c0108f0b297edc3960e174457d1c57fe3dd2b /source/blender/editors | |
parent | 0bb50594f9118eedaac32d716f2eaf81e3efe1dc (diff) |
2.5: Top Menu
* Clean up File menu, added back recover last session op.
* .blend compress now behaves a bit different, previously
it would only respect the user preference. Now it saves
existing files the same way they are saved, and new files
following the user preference. The save operator has a
Compress toggle in the file browser left panels now.
* Add menu working again, some fixes to make these operators
work outside the 3d view were needed.
* Timeline menu removed, its contents will be moved to the
timeline header menus.
* Game menu can now start game, changed the start game op
to choose another 3d view if none is available.
* Render menu has a few items now.
* Help menu contains a few links again.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 6 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 5 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_context.c | 2 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 1 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 33 |
5 files changed, 39 insertions, 8 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 2bf5d357e5c..28a9d3ac7c9 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -4724,11 +4724,13 @@ Nurb *add_nurbs_primitive(bContext *C, int type, int newname) Mat3MulMat3(cmat, imat, mat); Mat3Inv(imat, cmat); } + else + Mat3One(imat); + setflagsNurb(editnurb, 0); } - else { + else return NULL; - } /* these types call this function to return a Nurb */ if (stype!=CU_PRIM_TUBE && stype!=CU_PRIM_DONUT) { diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 37453039cf5..cf37b0dd812 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -3587,10 +3587,11 @@ void ED_object_enter_editmode(bContext *C, int flag) if(scene->id.lib) return; if(base==NULL) return; - if(sa->spacetype==SPACE_VIEW3D) + if(sa && sa->spacetype==SPACE_VIEW3D) v3d= sa->spacedata.first; - if((v3d==NULL || (base->lay & v3d->lay))==0) return; + if(v3d && (base->lay & v3d->lay)==0) return; + else if(!v3d && (base->lay & scene->lay)==0) return; ob = base->object; diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 19750833b4d..2dc2cf9f293 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -93,7 +93,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult } else if(CTX_data_equals(member, "active_base")) { if(scene->basact) - CTX_data_pointer_set(result, &scene->id, &RNA_UnknownType, &scene->basact); + CTX_data_pointer_set(result, &scene->id, &RNA_UnknownType, scene->basact); return 1; } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 4a42d1ed369..3032bff18df 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -206,6 +206,7 @@ int ED_operator_object_active(bContext *C) int ED_operator_editmesh(bContext *C) { Object *obedit= CTX_data_edit_object(C); + printf("em %p %d\n", obedit, (obedit)? obedit->type == OB_MESH: -1); if(obedit && obedit->type==OB_MESH) return NULL != ((Mesh *)obedit->data)->edit_mesh; return 0; diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index cb20b3dc93e..20e0a79f0c7 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -1425,7 +1425,7 @@ static void RestoreState(bContext *C) } /* maybe we need this defined somewhere else */ -extern void StartKetsjiShell(struct bContext *C,int always_use_expand_framing); +extern void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int always_use_expand_framing); #endif // GAMEBLENDER == 1 @@ -1433,13 +1433,40 @@ static int game_engine_exec(bContext *C, wmOperator *unused) { #if GAMEBLENDER == 1 Scene *startscene = CTX_data_scene(C); + bScreen *sc= CTX_wm_screen(C); + ScrArea *sa, *prevsa= CTX_wm_area(C); + ARegion *ar, *prevar= CTX_wm_region(C); + + sa= prevsa; + if(sa->spacetype != SPACE_VIEW3D) { + for(sa=sc->areabase.first; sa; sa= sa->next) + if(sa->spacetype==SPACE_VIEW3D) + break; + } + + if(!sa) + return OPERATOR_CANCELLED; + + for(ar=sa->regionbase.first; ar; ar=ar->next) + if(ar->regiontype == RGN_TYPE_WINDOW) + break; + + if(!ar) + return OPERATOR_CANCELLED; + // bad context switch .. + CTX_wm_area_set(C, sa); + CTX_wm_region_set(C, ar); + view3d_operator_needs_opengl(C); SaveState(C); - StartKetsjiShell(C, 1); + StartKetsjiShell(C, ar, 1); RestoreState(C); + CTX_wm_region_set(C, prevar); + CTX_wm_area_set(C, prevsa); + //XXX restore_all_scene_cfra(scene_cfra_store); set_scene_bg(startscene); //XXX scene_update_for_newframe(G.scene, G.scene->lay); @@ -1461,7 +1488,7 @@ void VIEW3D_OT_game_start(wmOperatorType *ot) /* api callbacks */ ot->exec= game_engine_exec; - ot->poll= ED_operator_view3d_active; + //ot->poll= ED_operator_view3d_active; } /* ************************************** */ |