From dd8a575c22db8b6e1a78610115cf7e369f26ae0c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Nov 2011 09:47:19 +0000 Subject: [PATCH 01/11] correct header, for some reason gcc doesnt warn about this --- source/blender/blenkernel/BKE_deform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/BKE_deform.h b/source/blender/blenkernel/BKE_deform.h index 71814799050..3e643fe961c 100644 --- a/source/blender/blenkernel/BKE_deform.h +++ b/source/blender/blenkernel/BKE_deform.h @@ -58,7 +58,7 @@ float defvert_array_find_weight_safe(const struct MDeformVert *dvert, int index void defvert_copy(struct MDeformVert *dvert_r, const struct MDeformVert *dvert); void defvert_sync(struct MDeformVert *dvert_r, const struct MDeformVert *dvert, int use_verify); -void defvert_sync_mapped(struct MDeformVert *dvert_r, const struct MDeformVert *dvert, const int *flip_map, const int flip_map_len, int use_verify); +void defvert_sync_mapped(struct MDeformVert *dvert_r, const struct MDeformVert *dvert, const int *flip_map, const int flip_map_len, const int use_verify); void defvert_remap (struct MDeformVert *dvert, int *map); void defvert_flip(struct MDeformVert *dvert, const int *flip_map, const int flip_map_len); void defvert_normalize(struct MDeformVert *dvert); From 4b48a5a497136e6839474a7089e9674fe31b1fc9 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 1 Nov 2011 11:00:08 +0000 Subject: [PATCH 02/11] Fix #29101: 2D Tilt on Bezier Curve Bug? Changing tilt for 2D curves doesn't really hurt, just makes things not so clear tosee what's going on because you're changing value which isn't used at all for 2D curves. Disallwo to run TRANSFORM_OT_tilt operator for 2D curves. Also made a correct fix for incorrect shortcut for tilt in 3D viewport toolbar, it was really confusing to have almost the same operators (TRANSFORM_OT_tilt and TRANSFORM_OT_transform with mode=tilt) in keymap. Better to use tilt operator in toolbar. --- release/scripts/startup/bl_ui/space_view3d_toolbar.py | 2 +- source/blender/editors/curve/curve_ops.c | 1 - source/blender/editors/include/ED_screen.h | 1 + source/blender/editors/screen/screen_ops.c | 11 +++++++++++ source/blender/editors/transform/transform_ops.c | 2 +- 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 14774c2215a..9518ccb5f80 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -209,7 +209,7 @@ class VIEW3D_PT_tools_curveedit(View3DPanel, Panel): col.operator("transform.resize", text="Scale") col = layout.column(align=True) - col.operator("transform.transform", text="Tilt").mode = 'TILT' + col.operator("transform.tilt", text="Tilt") col.operator("transform.transform", text="Shrink/Fatten").mode = 'CURVE_SHRINKFATTEN' col = layout.column(align=True) diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c index be6b322e6b4..95f3bb55ba5 100644 --- a/source/blender/editors/curve/curve_ops.c +++ b/source/blender/editors/curve/curve_ops.c @@ -223,7 +223,6 @@ void ED_keymap_curve(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "CURVE_OT_tilt_clear", TKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "TRANSFORM_OT_tilt", TKEY, KM_PRESS, KM_CTRL, 0); - RNA_enum_set(WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", TKEY, KM_PRESS, KM_CTRL, 0)->ptr, "mode", TFM_TILT); RNA_enum_set(WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_ALT, 0)->ptr, "mode", TFM_CURVE_SHRINKFATTEN); diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index f92ee724f6f..05537004927 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -159,6 +159,7 @@ int ED_operator_editmesh_view3d(struct bContext *C); int ED_operator_editmesh_region_view3d(struct bContext *C); int ED_operator_editarmature(struct bContext *C); int ED_operator_editcurve(struct bContext *C); +int ED_operator_editcurve_3d(struct bContext *C); int ED_operator_editsurf(struct bContext *C); int ED_operator_editsurfcurve(struct bContext *C); int ED_operator_editsurfcurve_region_view3d(struct bContext *C); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 0a7e3a2763a..171adc8d89a 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -406,6 +406,17 @@ int ED_operator_editcurve(bContext *C) return 0; } +int ED_operator_editcurve_3d(bContext *C) +{ + Object *obedit= CTX_data_edit_object(C); + if(obedit && obedit->type==OB_CURVE) { + Curve *cu= (Curve *)obedit->data; + + return (cu->flag&CU_3D) && (NULL != cu->editnurb); + } + return 0; +} + int ED_operator_editsurf(bContext *C) { Object *obedit= CTX_data_edit_object(C); diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 2d3c1d80d8d..f926f442830 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -610,7 +610,7 @@ void TRANSFORM_OT_tilt(struct wmOperatorType *ot) ot->exec = transform_exec; ot->modal = transform_modal; ot->cancel = transform_cancel; - ot->poll = ED_operator_editcurve; + ot->poll = ED_operator_editcurve_3d; RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI*2, M_PI*2); From d55298ee3c67dfa2044759bcff01929465ef1b18 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 1 Nov 2011 14:51:44 +0000 Subject: [PATCH 03/11] Fix #29109: bpy.ops.render.render() with scene parameter missed compositing, previous bugfix needed a bit more refining. --- source/blender/editors/render/render_internal.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 2f0958371f9..9c38b1ce98f 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -223,20 +223,26 @@ static int screen_render_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); SceneRenderLayer *srl= NULL; - Render *re= RE_NewRender(scene->id.name); + Render *re; Image *ima; View3D *v3d= CTX_wm_view3d(C); Main *mainp= CTX_data_main(C); - unsigned int lay= (v3d)? v3d->lay: scene->lay; + unsigned int lay; const short is_animation= RNA_boolean_get(op->ptr, "animation"); const short is_write_still= RNA_boolean_get(op->ptr, "write_still"); struct Object *camera_override= v3d ? V3D_CAMERA_LOCAL(v3d) : NULL; + /* custom scene and single layer re-render */ + screen_render_scene_layer_set(op, mainp, &scene, &srl); + if(!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.imtype)) { BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected"); return OPERATOR_CANCELLED; } + re= RE_NewRender(scene->id.name); + lay= (v3d)? v3d->lay: scene->lay; + G.afbreek= 0; RE_test_break_cb(re, NULL, (int (*)(void *)) blender_test_break); @@ -252,9 +258,6 @@ static int screen_render_exec(bContext *C, wmOperator *op) RE_SetReports(re, op->reports); - /* custom scene and single layer re-render */ - screen_render_scene_layer_set(op, mainp, &scene, &srl); - if(is_animation) RE_BlenderAnim(re, mainp, scene, camera_override, lay, scene->r.sfra, scene->r.efra, scene->r.frame_step); else From 2241eaddf55f87306c10053b263e62ca95f4ce3a Mon Sep 17 00:00:00 2001 From: Andrew Wiggin Date: Tue, 1 Nov 2011 17:06:10 +0000 Subject: [PATCH 04/11] Reverting r41409 (broken fix for #29089) r41409 can cause a crash if you delete a face of a mesh that has subsurf & solidify modifiers active --- source/blender/modifiers/intern/MOD_solidify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index b8e95ad4c51..8d47ad28a86 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -626,7 +626,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, add_v3_v3(edge_vert_nos[ed->v1], nor); add_v3_v3(edge_vert_nos[ed->v2], nor); #endif - origindex[numFaces * 2 + i]= fidx; + origindex[numFaces * 2 + i]= ORIGINDEX_NONE; } #ifdef SOLIDIFY_SIDE_NORMALS From c70cde6f94884f67cc9d4fb0546a50d2a7f96f65 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 1 Nov 2011 17:43:30 +0000 Subject: [PATCH 05/11] Fix #29124: Modifying mesh with mirror and solidify modifiers crashes blender It is corrected fix for #29089 (svn rev 41409). That fix wasn't correct because it used to set face number from derived mesh on which solidify is applying which isn't correct for case of constructive modifiers applied on base mesh before solidify modifier. Actually nothing special should be performed here to set needed original index because of ORIGINDEX layer is getting copyed automatically when when copying faces. --- source/blender/modifiers/intern/MOD_solidify.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index 8d47ad28a86..347af0066c6 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -626,7 +626,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, add_v3_v3(edge_vert_nos[ed->v1], nor); add_v3_v3(edge_vert_nos[ed->v2], nor); #endif - origindex[numFaces * 2 + i]= ORIGINDEX_NONE; } #ifdef SOLIDIFY_SIDE_NORMALS From 785de4cbfc424fb095ed549f6d9e733014224a51 Mon Sep 17 00:00:00 2001 From: Andrea Weikert Date: Tue, 1 Nov 2011 18:27:09 +0000 Subject: [PATCH 06/11] == Cleanup of SpaceImasel == * removed struct for SpaceType and all usages * SPACE_IMASEL in enum nees to be kept to identify it in old files * it is replaces with SPACE_EMPTY on load, which is overridden by SPACE_INFO which has same struct members * also removed theme settings --- source/blender/blenloader/BLO_readfile.h | 1 - source/blender/blenloader/intern/readfile.c | 64 +------------------- source/blender/blenloader/intern/writefile.c | 4 -- source/blender/editors/interface/resources.c | 16 ----- source/blender/makesdna/DNA_space_types.h | 64 +------------------- source/blender/makesdna/DNA_userdef_types.h | 1 - source/blender/makesrna/intern/rna_space.c | 3 - source/blender/python/simple_enum_gen.py | 2 +- 8 files changed, 5 insertions(+), 150 deletions(-) diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index 1777979c3ab..38925ea5238 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -44,7 +44,6 @@ struct MemFile; struct ReportList; struct Scene; struct SpaceFile; -struct SpaceImaSel; struct UserDef; struct bContext; struct BHead; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 16da7321524..bb068ac80eb 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4927,15 +4927,6 @@ static void lib_link_screen(FileData *fd, Main *main) sfile->folders_prev= NULL; sfile->folders_next= NULL; } - else if(sl->spacetype==SPACE_IMASEL) { - SpaceImaSel *simasel= (SpaceImaSel *)sl; - - simasel->files = NULL; - simasel->returnfunc= NULL; - simasel->menup= NULL; - simasel->pupmenu= NULL; - simasel->img= NULL; - } else if(sl->spacetype==SPACE_ACTION) { SpaceAction *saction= (SpaceAction *)sl; bDopeSheet *ads= &saction->ads; @@ -5160,12 +5151,6 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) SpaceFile *sfile= (SpaceFile *)sl; sfile->op= NULL; } - else if(sl->spacetype==SPACE_IMASEL) { - SpaceImaSel *simasel= (SpaceImaSel *)sl; - if (simasel->files) { - //XXX BIF_filelist_freelib(simasel->files); - } - } else if(sl->spacetype==SPACE_ACTION) { SpaceAction *saction= (SpaceAction *)sl; @@ -6749,11 +6734,11 @@ static void do_versions_windowmanager_2_50(bScreen *screen) area_add_window_regions(sa, sa->spacedata.first, &sa->regionbase); - /* space imageselect is depricated */ + /* space imageselect is deprecated */ for(sl= sa->spacedata.first; sl; sl= sl->next) { if(sl->spacetype==SPACE_IMASEL) - sl->spacetype= SPACE_INFO; /* spacedata then matches */ - } + sl->spacetype= SPACE_EMPTY; /* spacedata then matches */ + } /* it seems to be possible in 2.5 to have this saved, filewindow probably */ sa->butspacetype= sa->spacetype; @@ -9243,49 +9228,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main) for(ima= main->image.first; ima; ima= ima->id.next) { ima->preview = NULL; } - - /* repair imasel space - completely reworked */ - for(sc= main->screen.first; sc; sc= sc->id.next) { - ScrArea *sa; - sa= sc->areabase.first; - while(sa) { - SpaceLink *sl; - - for (sl= sa->spacedata.first; sl; sl= sl->next) { - if(sl->spacetype==SPACE_IMASEL) { - SpaceImaSel *simasel= (SpaceImaSel*) sl; - simasel->blockscale= 0.7f; - /* view 2D */ - simasel->v2d.tot.xmin= -10.0f; - simasel->v2d.tot.ymin= -10.0f; - simasel->v2d.tot.xmax= (float)sa->winx + 10.0f; - simasel->v2d.tot.ymax= (float)sa->winy + 10.0f; - simasel->v2d.cur.xmin= 0.0f; - simasel->v2d.cur.ymin= 0.0f; - simasel->v2d.cur.xmax= (float)sa->winx; - simasel->v2d.cur.ymax= (float)sa->winy; - simasel->v2d.min[0]= 1.0; - simasel->v2d.min[1]= 1.0; - simasel->v2d.max[0]= 32000.0f; - simasel->v2d.max[1]= 32000.0f; - simasel->v2d.minzoom= 0.5f; - simasel->v2d.maxzoom= 1.21f; - simasel->v2d.scroll= 0; - simasel->v2d.keepzoom= V2D_LIMITZOOM|V2D_KEEPASPECT; - simasel->v2d.keeptot= 0; - simasel->prv_h = 96; - simasel->prv_w = 96; - simasel->flag = 7; /* ??? elubie */ - BLI_strncpy (simasel->dir, U.textudir, sizeof(simasel->dir)); /* TON */ - simasel->file[0]= '\0'; - - simasel->returnfunc = NULL; - simasel->title[0] = 0; - } - } - sa = sa->next; - } - } } /* add point caches */ diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index f0f5ab283a6..18807f911ed 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2205,10 +2205,6 @@ static void write_screens(WriteData *wd, ListBase *scrbase) if(sima->cumap) write_curvemapping(wd, sima->cumap); } - else if(sl->spacetype==SPACE_IMASEL) { - // XXX: depreceated... do we still want to keep this? - writestruct(wd, DATA, "SpaceImaSel", 1, sl); - } else if(sl->spacetype==SPACE_TEXT) { writestruct(wd, DATA, "SpaceText", 1, sl); } diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index d3a5c6691ef..4318feca737 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -129,9 +129,6 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo case SPACE_IMAGE: ts= &btheme->tima; break; - case SPACE_IMASEL: - ts= &btheme->timasel; - break; case SPACE_TEXT: ts= &btheme->text; break; @@ -533,7 +530,6 @@ static void ui_theme_init_new(bTheme *btheme) ui_theme_init_new_do(&btheme->tnla); ui_theme_init_new_do(&btheme->tseq); ui_theme_init_new_do(&btheme->tima); - ui_theme_init_new_do(&btheme->timasel); ui_theme_init_new_do(&btheme->text); ui_theme_init_new_do(&btheme->toops); ui_theme_init_new_do(&btheme->ttime); @@ -731,18 +727,6 @@ void ui_theme_init_default(void) SETCOL(btheme->tima.editmesh_active, 255, 255, 255, 128); SETCOLF(btheme->tima.preview_back, 0.45, 0.45, 0.45, 1.0); - /* space imageselect */ - btheme->timasel= btheme->tv3d; - SETCOL(btheme->timasel.active, 195, 195, 195, 255); /* active tile */ - SETCOL(btheme->timasel.grid, 94, 94, 94, 255); /* active file text */ - SETCOL(btheme->timasel.back, 110, 110, 110, 255); - SETCOL(btheme->timasel.shade1, 94, 94, 94, 255); /* bar */ - SETCOL(btheme->timasel.shade2, 172, 172, 172, 255); /* sliders */ - SETCOL(btheme->timasel.hilite, 17, 27, 60, 100); /* selected tile */ - SETCOL(btheme->timasel.text, 0, 0, 0, 255); - SETCOL(btheme->timasel.text_hi, 255, 255, 255, 255); - SETCOL(btheme->timasel.panel, 132, 132, 132, 255); - /* space text */ btheme->text= btheme->tv3d; SETCOL(btheme->text.back, 153, 153, 153, 255); diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 3b5ecbe59d8..d21db85b1f3 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -432,68 +432,6 @@ typedef struct SpaceLogic { struct bGPdata *gpd; /* grease-pencil data */ } SpaceLogic; -/* note, this entire struct isnt used anymore!, - * may remove some day - campbell */ -typedef struct SpaceImaSel { - SpaceLink *next, *prev; - ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale; - - short blockhandler[8]; - - View2D v2d; /* deprecated, copied to region */ - - struct FileList *files; - - /* specific stuff for drawing */ - char title[24]; - char dir[240]; - char file[80]; - - short type, menu, flag, sort; - - void *curfont; - int active_file; - - int numtilesx; - int numtilesy; - - int selstate; - - struct rcti viewrect; - struct rcti bookmarkrect; - - float scrollpos; /* current position of scrollhandle */ - float scrollheight; /* height of the scrollhandle */ - float scrollarea; /* scroll region, scrollpos is from 0 to scrollarea */ - - float aspect; - unsigned short retval; /* event */ - - short ipotype; - - short filter; - short active_bookmark; - short pad, pad1; - - /* view settings */ - short prv_w; - short prv_h; - - /* one day we'll add unions to dna */ - void (*returnfunc)(char *); - void (*returnfunc_event)(unsigned short); - void (*returnfunc_args)(char *, void *, void *); - - void *arg1, *arg2; - short *menup; /* pointer to menu result or ID browsing */ - char *pupmenu; /* optional menu in header */ - - struct ImBuf *img; -} SpaceImaSel; - - typedef struct ConsoleLine { struct ConsoleLine *next, *prev; @@ -947,7 +885,7 @@ enum { SPACE_INFO, SPACE_SEQ, SPACE_TEXT, - SPACE_IMASEL, + SPACE_IMASEL, /* deprecated */ SPACE_SOUND, SPACE_ACTION, SPACE_NLA, diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index a3934618582..4859268d477 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -273,7 +273,6 @@ typedef struct bTheme { ThemeSpace tnla; ThemeSpace tseq; ThemeSpace tima; - ThemeSpace timasel; ThemeSpace text; ThemeSpace toops; ThemeSpace ttime; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 29a2723182b..58ed9c50df5 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -60,7 +60,6 @@ EnumPropertyItem space_type_items[] = { {SPACE_INFO, "INFO", 0, "Info", ""}, {SPACE_SEQ, "SEQUENCE_EDITOR", 0, "Sequence Editor", ""}, {SPACE_TEXT, "TEXT_EDITOR", 0, "Text Editor", ""}, - //{SPACE_IMASEL, "IMAGE_BROWSER", 0, "Image Browser", ""}, {SPACE_SOUND, "AUDIO_WINDOW", 0, "Audio Window", ""}, {SPACE_ACTION, "DOPESHEET_EDITOR", 0, "DopeSheet Editor", ""}, {SPACE_NLA, "NLA_EDITOR", 0, "NLA Editor", ""}, @@ -152,8 +151,6 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr) return &RNA_SpaceSequenceEditor; case SPACE_TEXT: return &RNA_SpaceTextEditor; - //case SPACE_IMASEL: - // return &RNA_SpaceImageBrowser; /*case SPACE_SOUND: return &RNA_SpaceAudioWindow;*/ case SPACE_ACTION: diff --git a/source/blender/python/simple_enum_gen.py b/source/blender/python/simple_enum_gen.py index bc7a2df9fb6..1455747cdbb 100644 --- a/source/blender/python/simple_enum_gen.py +++ b/source/blender/python/simple_enum_gen.py @@ -29,7 +29,7 @@ defs = """ SPACE_INFO, SPACE_SEQ, SPACE_TEXT, - SPACE_IMASEL, + SPACE_IMASEL, #Deprecated SPACE_SOUND, SPACE_ACTION, SPACE_NLA, From ea2f7c907c5de85b34c2c0a87bf4dd0a347004d3 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Tue, 1 Nov 2011 19:48:45 +0000 Subject: [PATCH 07/11] == Removal of SpaceSound == * Removed old, unused Space Sound space * Removed data struct and Theme settings * Old files with an open Audio window will be loaded as Info Space --- source/blender/blenloader/intern/readfile.c | 26 +- source/blender/blenloader/intern/writefile.c | 3 - source/blender/editors/CMakeLists.txt | 1 - source/blender/editors/SConscript | 1 - .../blender/editors/animation/anim_markers.c | 6 +- source/blender/editors/include/ED_space_api.h | 1 - source/blender/editors/interface/resources.c | 25 +- source/blender/editors/screen/screen_ops.c | 2 +- source/blender/editors/space_api/spacetypes.c | 1 - .../editors/space_sound/CMakeLists.txt | 43 --- source/blender/editors/space_sound/SConscript | 9 - .../editors/space_sound/sound_header.c | 127 --------- .../editors/space_sound/sound_intern.h | 42 --- .../blender/editors/space_sound/space_sound.c | 266 ------------------ source/blender/makesdna/DNA_space_types.h | 18 +- source/blender/makesdna/DNA_userdef_types.h | 3 +- source/blender/makesrna/intern/rna_space.c | 3 - source/blender/makesrna/intern/rna_userdef.c | 32 --- source/blender/python/simple_enum_gen.py | 2 +- 19 files changed, 23 insertions(+), 588 deletions(-) delete mode 100644 source/blender/editors/space_sound/CMakeLists.txt delete mode 100644 source/blender/editors/space_sound/SConscript delete mode 100644 source/blender/editors/space_sound/sound_header.c delete mode 100644 source/blender/editors/space_sound/sound_intern.h delete mode 100644 source/blender/editors/space_sound/space_sound.c diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index bb068ac80eb..4700a41d003 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4990,11 +4990,6 @@ static void lib_link_screen(FileData *fd, Main *main) } } } - else if(sl->spacetype==SPACE_SOUND) { - SpaceSound *ssound= (SpaceSound *)sl; - - ssound->sound= newlibadr_us(fd, sc->id.lib, ssound->sound); - } else if(sl->spacetype==SPACE_NODE) { SpaceNode *snode= (SpaceNode *)sl; @@ -5217,11 +5212,6 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) } } } - else if(sl->spacetype==SPACE_SOUND) { - SpaceSound *ssound= (SpaceSound *)sl; - - ssound->sound= restore_pointer_by_name(newmain, (ID *)ssound->sound, 1); - } else if(sl->spacetype==SPACE_NODE) { SpaceNode *snode= (SpaceNode *)sl; @@ -6609,16 +6599,6 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) //ar->v2d.flag |= V2D_IS_INITIALISED; break; } - case SPACE_SOUND: - { - SpaceSound *ssound= (SpaceSound *)sl; - memcpy(&ar->v2d, &ssound->v2d, sizeof(View2D)); - - ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL); - ar->v2d.scroll |= (V2D_SCROLL_LEFT); - //ar->v2d.flag |= V2D_IS_INITIALISED; - break; - } case SPACE_NLA: { SpaceNla *snla= (SpaceNla *)sl; @@ -6740,6 +6720,12 @@ static void do_versions_windowmanager_2_50(bScreen *screen) sl->spacetype= SPACE_EMPTY; /* spacedata then matches */ } + /* space sound is deprecated */ + for(sl= sa->spacedata.first; sl; sl= sl->next) { + if(sl->spacetype==SPACE_SOUND) + sl->spacetype= SPACE_EMPTY; /* spacedata then matches */ + } + /* it seems to be possible in 2.5 to have this saved, filewindow probably */ sa->butspacetype= sa->spacetype; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 18807f911ed..4640fa0fe04 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2216,9 +2216,6 @@ static void write_screens(WriteData *wd, ListBase *scrbase) else if(sl->spacetype==SPACE_ACTION) { writestruct(wd, DATA, "SpaceAction", 1, sl); } - else if(sl->spacetype==SPACE_SOUND) { - writestruct(wd, DATA, "SpaceSound", 1, sl); - } else if(sl->spacetype==SPACE_NLA){ SpaceNla *snla= (SpaceNla *)sl; diff --git a/source/blender/editors/CMakeLists.txt b/source/blender/editors/CMakeLists.txt index 16c0d4a2c79..7b7d11bd487 100644 --- a/source/blender/editors/CMakeLists.txt +++ b/source/blender/editors/CMakeLists.txt @@ -46,7 +46,6 @@ if(WITH_BLENDER) add_subdirectory(space_outliner) add_subdirectory(space_script) add_subdirectory(space_sequencer) - add_subdirectory(space_sound) add_subdirectory(space_text) add_subdirectory(space_time) add_subdirectory(space_userpref) diff --git a/source/blender/editors/SConscript b/source/blender/editors/SConscript index e8159bdf03f..a1b766ec2be 100644 --- a/source/blender/editors/SConscript +++ b/source/blender/editors/SConscript @@ -25,7 +25,6 @@ SConscript(['datafiles/SConscript', 'space_outliner/SConscript', 'space_time/SConscript', 'space_view3d/SConscript', - 'space_sound/SConscript', 'space_action/SConscript', 'space_nla/SConscript', 'space_script/SConscript', diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 5345fcd756d..4a359acabd9 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -777,7 +777,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) fac= ((float)(evt->x - mm->firstx)*dx); - if (ELEM(mm->slink->spacetype, SPACE_TIME, SPACE_SOUND)) + if (mm->slink->spacetype == SPACE_TIME) apply_keyb_grid(evt->shift, evt->ctrl, &fac, 0.0, FPS, 0.1*FPS, 0); else apply_keyb_grid(evt->shift, evt->ctrl, &fac, 0.0, 1.0, 0.1, 0 /*was: U.flag & USER_AUTOGRABGRID*/); @@ -796,7 +796,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) if (totmark==1) { /* we print current marker value */ - if (ELEM(mm->slink->spacetype, SPACE_TIME, SPACE_SOUND)) { + if (mm->slink->spacetype == SPACE_TIME) { SpaceTime *stime= (SpaceTime *)mm->slink; if (stime->flag & TIME_DRAWFRAMES) BLI_snprintf(str, sizeof(str), "Marker %d offset %d", selmarker->frame, offs); @@ -816,7 +816,7 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) } else { /* we only print the offset */ - if (ELEM(mm->slink->spacetype, SPACE_TIME, SPACE_SOUND)) { + if (mm->slink->spacetype == SPACE_TIME) { SpaceTime *stime= (SpaceTime *)mm->slink; if (stime->flag & TIME_DRAWFRAMES) BLI_snprintf(str, sizeof(str), "Marker offset %d ", offs); diff --git a/source/blender/editors/include/ED_space_api.h b/source/blender/editors/include/ED_space_api.h index 5c42dfc5d05..8e445ab1cee 100644 --- a/source/blender/editors/include/ED_space_api.h +++ b/source/blender/editors/include/ED_space_api.h @@ -46,7 +46,6 @@ void ED_spacetype_node(void); void ED_spacetype_buttons(void); void ED_spacetype_info(void); void ED_spacetype_file(void); -void ED_spacetype_sound(void); void ED_spacetype_action(void); void ED_spacetype_nla(void); void ED_spacetype_script(void); diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 4318feca737..921a1879bb7 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -135,9 +135,6 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo case SPACE_OUTLINER: ts= &btheme->toops; break; - case SPACE_SOUND: - ts= &btheme->tsnd; - break; case SPACE_INFO: ts= &btheme->tinfo; break; @@ -525,7 +522,6 @@ static void ui_theme_init_new(bTheme *btheme) ui_theme_init_new_do(&btheme->tfile); ui_theme_init_new_do(&btheme->tipo); ui_theme_init_new_do(&btheme->tinfo); - ui_theme_init_new_do(&btheme->tsnd); ui_theme_init_new_do(&btheme->tact); ui_theme_init_new_do(&btheme->tnla); ui_theme_init_new_do(&btheme->tseq); @@ -762,15 +758,11 @@ void ui_theme_init_default(void) SETCOL(btheme->tconsole.console_error, 220, 96, 96, 255); SETCOL(btheme->tconsole.console_cursor, 220, 96, 96, 255); - - /* space sound */ - btheme->tsnd= btheme->tv3d; - SETCOLF(btheme->tsnd.back, 0.45, 0.45, 0.45, 1.0); - SETCOLF(btheme->tsnd.grid, 0.36, 0.36, 0.36, 1.0); - SETCOL(btheme->tsnd.shade1, 173, 173, 173, 255); // sliders - /* space time */ - btheme->ttime= btheme->tsnd; // same as sound space + btheme->ttime= btheme->tv3d; + SETCOLF(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0); + SETCOLF(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0); + SETCOL(btheme->ttime.shade1, 173, 173, 173, 255); // sliders /* space node, re-uses syntax color storage */ btheme->tnode= btheme->tv3d; @@ -785,7 +777,6 @@ void ui_theme_init_default(void) /* space logic */ btheme->tlogic= btheme->tv3d; SETCOL(btheme->tlogic.back, 100, 100, 100, 255); - } @@ -1177,7 +1168,11 @@ void init_userdef_do_versions(void) for(btheme= U.themes.first; btheme; btheme= btheme->next) { /* check for alpha==0 is safe, then color was never set */ if(btheme->ttime.back[3]==0) { - btheme->ttime = btheme->tsnd; // copy from sound + // copied from ui_theme_init_default + btheme->ttime= btheme->tv3d; + SETCOLF(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0); + SETCOLF(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0); + SETCOL(btheme->ttime.shade1, 173, 173, 173, 255); // sliders } if(btheme->text.syntaxn[3]==0) { SETCOL(btheme->text.syntaxn, 0, 0, 200, 255); /* Numbers Blue*/ @@ -1304,7 +1299,7 @@ void init_userdef_do_versions(void) SETCOL(btheme->tact.cframe, 0x60, 0xc0, 0x40, 255); SETCOL(btheme->tnla.cframe, 0x60, 0xc0, 0x40, 255); SETCOL(btheme->tseq.cframe, 0x60, 0xc0, 0x40, 255); - SETCOL(btheme->tsnd.cframe, 0x60, 0xc0, 0x40, 255); + //SETCOL(btheme->tsnd.cframe, 0x60, 0xc0, 0x40, 255); Not needed anymore SETCOL(btheme->ttime.cframe, 0x60, 0xc0, 0x40, 255); } } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 171adc8d89a..e86dd8dbde3 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -192,7 +192,7 @@ int ED_operator_animview_active(bContext *C) { if(ED_operator_areaactive(C)) { SpaceLink *sl= (SpaceLink *)CTX_wm_space_data(C); - if (sl && (ELEM6(sl->spacetype, SPACE_SEQ, SPACE_SOUND, SPACE_ACTION, SPACE_NLA, SPACE_IPO, SPACE_TIME))) + if (sl && (ELEM5(sl->spacetype, SPACE_SEQ, SPACE_ACTION, SPACE_NLA, SPACE_IPO, SPACE_TIME))) return TRUE; } diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c index 99ab356ac5f..905f7bc80b6 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -81,7 +81,6 @@ void ED_spacetypes_init(void) ED_spacetype_buttons(); ED_spacetype_info(); ED_spacetype_file(); - ED_spacetype_sound(); ED_spacetype_action(); ED_spacetype_nla(); ED_spacetype_script(); diff --git a/source/blender/editors/space_sound/CMakeLists.txt b/source/blender/editors/space_sound/CMakeLists.txt deleted file mode 100644 index ae605760975..00000000000 --- a/source/blender/editors/space_sound/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# Contributor(s): Jacques Beaurain. -# -# ***** END GPL LICENSE BLOCK ***** - -set(INC - ../include - ../../blenkernel - ../../blenlib - ../../blenloader - ../../makesdna - ../../makesrna - ../../windowmanager - ../../../../intern/guardedalloc -) - -set(INC_SYS - ${GLEW_INCLUDE_PATH} -) - -set(SRC - sound_header.c - space_sound.c - - sound_intern.h -) - -blender_add_lib(bf_editor_space_sound "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/editors/space_sound/SConscript b/source/blender/editors/space_sound/SConscript deleted file mode 100644 index d76fb7939ea..00000000000 --- a/source/blender/editors/space_sound/SConscript +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/python -Import ('env') - -sources = env.Glob('*.c') - -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf' -incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../blenloader' - -env.BlenderLib ( 'bf_editors_space_sound', sources, Split(incs), [], libtype=['core'], priority=[75] ) diff --git a/source/blender/editors/space_sound/sound_header.c b/source/blender/editors/space_sound/sound_header.c deleted file mode 100644 index 6e2010c0c63..00000000000 --- a/source/blender/editors/space_sound/sound_header.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2008 Blender Foundation. - * All rights reserved. - * - * - * Contributor(s): Blender Foundation - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/editors/space_sound/sound_header.c - * \ingroup spsnd - */ - - -#include -#include - - -#include "MEM_guardedalloc.h" - -#include "BLI_blenlib.h" -#include "BLI_utildefines.h" - - -#include "BKE_context.h" - -#include "ED_screen.h" -#include "ED_types.h" -#include "ED_util.h" - -#include "BIF_gl.h" -#include "BIF_glutil.h" - -#include "UI_interface.h" -#include "UI_resources.h" -#include "UI_view2d.h" - -#include "sound_intern.h" - - -/* ************************ header area region *********************** */ - -static void do_viewmenu(bContext *UNUSED(C), void *UNUSED(arg), int UNUSED(event)) -{ - -} - -static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *UNUSED(arg)) -{ - ScrArea *curarea= CTX_wm_area(C); - uiBlock *block; - short yco= 0, menuwidth=120; - - block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP); - uiBlockSetButmFunc(block, do_viewmenu, NULL); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Nothing yet", 0, yco-=20, - menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); - - if(curarea->headertype==HEADERTOP) { - uiBlockSetDirection(block, UI_DOWN); - } - else { - uiBlockSetDirection(block, UI_TOP); - uiBlockFlipOrder(block); - } - - uiTextBoundsBlock(block, 50); - uiEndBlock(C, block); - - return block; -} - -static void do_sound_buttons(bContext *UNUSED(C), void *UNUSED(arg), int event) -{ - switch(event) { - } -} - - -void sound_header_buttons(const bContext *C, ARegion *ar) -{ - ScrArea *sa= CTX_wm_area(C); - uiBlock *block; - int xco, yco= 3; - - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); - uiBlockSetHandleFunc(block, do_sound_buttons, NULL); - - xco= ED_area_header_standardbuttons(C, block, yco); - - if((sa->flag & HEADER_NO_PULLDOWN)==0) { - int xmax; - - xmax= GetButStringLength("View"); - uiDefPulldownBut(block, dummy_viewmenu, CTX_wm_area(C), - "View", xco, yco-2, xmax-3, UI_UNIT_Y, ""); - xco+=UI_UNIT_X+xmax; - } - - uiBlockSetEmboss(block, UI_EMBOSS); - - /* always as last */ - UI_view2d_totRect_set(&ar->v2d, xco+UI_UNIT_X+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); - - uiEndBlock(C, block); - uiDrawBlock(C, block); -} - - diff --git a/source/blender/editors/space_sound/sound_intern.h b/source/blender/editors/space_sound/sound_intern.h deleted file mode 100644 index 88891ff4913..00000000000 --- a/source/blender/editors/space_sound/sound_intern.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2008 Blender Foundation. - * All rights reserved. - * - * - * Contributor(s): Blender Foundation - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/editors/space_sound/sound_intern.h - * \ingroup spsnd - */ - -#ifndef ED_SOUND_INTERN_H -#define ED_SOUND_INTERN_H - -/* internal exports only */ - - -/* sound_header.c */ -void sound_header_buttons(const bContext *C, ARegion *ar); - - -#endif /* ED_SOUND_INTERN_H */ - diff --git a/source/blender/editors/space_sound/space_sound.c b/source/blender/editors/space_sound/space_sound.c deleted file mode 100644 index 83d1b5b06c2..00000000000 --- a/source/blender/editors/space_sound/space_sound.c +++ /dev/null @@ -1,266 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2008 Blender Foundation. - * All rights reserved. - * - * - * Contributor(s): Blender Foundation - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/editors/space_sound/space_sound.c - * \ingroup spsnd - */ - - -#include -#include - -#include "DNA_scene_types.h" - -#include "MEM_guardedalloc.h" - -#include "BLI_blenlib.h" -#include "BLI_math.h" -#include "BLI_rand.h" -#include "BLI_utildefines.h" - -#include "BKE_context.h" -#include "BKE_screen.h" - -#include "ED_space_api.h" -#include "ED_screen.h" - -#include "BIF_gl.h" - -#include "WM_api.h" -#include "WM_types.h" - -#include "UI_resources.h" -#include "UI_view2d.h" - - -#include "sound_intern.h" // own include - -/* ******************** default callbacks for sound space ***************** */ - -static SpaceLink *sound_new(const bContext *UNUSED(C)) -{ - ARegion *ar; - SpaceSound *ssound; - - ssound= MEM_callocN(sizeof(SpaceSound), "initsound"); - ssound->spacetype= SPACE_SOUND; - - /* header */ - ar= MEM_callocN(sizeof(ARegion), "header for sound"); - - BLI_addtail(&ssound->regionbase, ar); - ar->regiontype= RGN_TYPE_HEADER; - ar->alignment= RGN_ALIGN_BOTTOM; - - /* main area */ - ar= MEM_callocN(sizeof(ARegion), "main area for sound"); - - BLI_addtail(&ssound->regionbase, ar); - ar->regiontype= RGN_TYPE_WINDOW; - - ar->v2d.tot.xmin= -4.0f; - ar->v2d.tot.ymin= -4.0f; - ar->v2d.tot.xmax= 250.0f; - ar->v2d.tot.ymax= 255.0f; - - ar->v2d.cur.xmin= -4.0f; - ar->v2d.cur.ymin= -4.0f; - ar->v2d.cur.xmax= 50.0f; - ar->v2d.cur.ymax= 255.0f; - - ar->v2d.min[0]= 1.0f; - ar->v2d.min[1]= 259.0f; - - ar->v2d.max[0]= MAXFRAMEF; - ar->v2d.max[1]= 259.0f; - - ar->v2d.minzoom= 0.1f; - ar->v2d.maxzoom= 10.0f; - - ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL); - ar->v2d.scroll |= (V2D_SCROLL_LEFT); - ar->v2d.keepzoom= 0; - ar->v2d.keeptot= 0; - ar->v2d.keepzoom = V2D_LOCKZOOM_Y; - - - return (SpaceLink *)ssound; -} - -/* not spacelink itself */ -static void sound_free(SpaceLink *UNUSED(sl)) -{ -// SpaceSound *ssound= (SpaceSound*) sl; - - -} - - -/* spacetype; init callback */ -static void sound_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa)) -{ - -} - -static SpaceLink *sound_duplicate(SpaceLink *sl) -{ - SpaceSound *ssoundn= MEM_dupallocN(sl); - - /* clear or remove stuff from old */ - - return (SpaceLink *)ssoundn; -} - - - -/* add handlers, stuff you only do once or on area/region changes */ -static void sound_main_area_init(wmWindowManager *wm, ARegion *ar) -{ - wmKeyMap *keymap; - - UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy); - - /* own keymap */ - keymap= WM_keymap_find(wm->defaultconf, "Sound", SPACE_SOUND, 0); - WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); -} - -static void sound_main_area_draw(const bContext *C, ARegion *ar) -{ - /* draw entirely, view changes should be handled here */ - // SpaceSound *ssound= (SpaceSound*)CTX_wm_space_data(C); - View2D *v2d= &ar->v2d; - - /* clear and setup matrix */ - UI_ThemeClearColor(TH_BACK); - glClear(GL_COLOR_BUFFER_BIT); - - UI_view2d_view_ortho(v2d); - - /* data... */ - - - /* reset view matrix */ - UI_view2d_view_restore(C); - - /* scrollers? */ -} - -static void sound_operatortypes(void) -{ - -} - -static void sound_keymap(struct wmKeyConfig *UNUSED(keyconf)) -{ - -} - -/* add handlers, stuff you only do once or on area/region changes */ -static void sound_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) -{ - UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy); -} - -static void sound_header_area_draw(const bContext *C, ARegion *ar) -{ - float col[3]; - - /* clear */ - if(ED_screen_area_active(C)) - UI_GetThemeColor3fv(TH_HEADER, col); - else - UI_GetThemeColor3fv(TH_HEADERDESEL, col); - - glClearColor(col[0], col[1], col[2], 0.0); - glClear(GL_COLOR_BUFFER_BIT); - - /* set view2d view matrix for scrolling (without scrollers) */ - UI_view2d_view_ortho(&ar->v2d); - - sound_header_buttons(C, ar); - - /* restore view matrix? */ - UI_view2d_view_restore(C); -} - -static void sound_main_area_listener(ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn)) -{ - /* context changes */ -} - -/* only called once, from space/spacetypes.c */ -void ED_spacetype_sound(void) -{ - SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype sound"); - ARegionType *art; - - st->spaceid= SPACE_SOUND; - strncpy(st->name, "Sound", BKE_ST_MAXNAME); - - st->new= sound_new; - st->free= sound_free; - st->init= sound_init; - st->duplicate= sound_duplicate; - st->operatortypes= sound_operatortypes; - st->keymap= sound_keymap; - - /* regions: main window */ - art= MEM_callocN(sizeof(ARegionType), "spacetype sound region"); - art->regionid = RGN_TYPE_WINDOW; - art->init= sound_main_area_init; - art->draw= sound_main_area_draw; - art->listener= sound_main_area_listener; - art->keymapflag= ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES; - - BLI_addhead(&st->regiontypes, art); - - /* regions: header */ - art= MEM_callocN(sizeof(ARegionType), "spacetype sound region"); - art->regionid = RGN_TYPE_HEADER; - art->prefsizey= HEADERY; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_HEADER; - - art->init= sound_header_area_init; - art->draw= sound_header_area_draw; - - BLI_addhead(&st->regiontypes, art); - - /* regions: channels */ - art= MEM_callocN(sizeof(ARegionType), "spacetype sound region"); - art->regionid = RGN_TYPE_CHANNELS; - art->prefsizex= 80; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D; - -// art->init= sound_channel_area_init; -// art->draw= sound_channel_area_draw; - - BLI_addhead(&st->regiontypes, art); - - - BKE_spacetype_register(st); -} - diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index d21db85b1f3..a92075c32e3 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -483,22 +483,6 @@ typedef struct SpaceUserPref { } SpaceUserPref; -typedef struct SpaceSound { - struct SpaceLink *next, *prev; - ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale; - struct ScrArea *area; - - View2D v2d; - - struct bSound *sound; - short mode, sndnr; - short xof, yof; - short flag, lock; - int pad2; -} SpaceSound; - /* view3d Now in DNA_view3d_types.h */ @@ -886,7 +870,7 @@ enum { SPACE_SEQ, SPACE_TEXT, SPACE_IMASEL, /* deprecated */ - SPACE_SOUND, + SPACE_SOUND, /* Deprecated */ SPACE_ACTION, SPACE_NLA, SPACE_SCRIPT, diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 4859268d477..8dd00f4ac08 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -267,8 +267,7 @@ typedef struct bTheme { ThemeSpace tv3d; ThemeSpace tfile; ThemeSpace tipo; - ThemeSpace tinfo; - ThemeSpace tsnd; + ThemeSpace tinfo; ThemeSpace tact; ThemeSpace tnla; ThemeSpace tseq; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 58ed9c50df5..19acc51feed 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -60,7 +60,6 @@ EnumPropertyItem space_type_items[] = { {SPACE_INFO, "INFO", 0, "Info", ""}, {SPACE_SEQ, "SEQUENCE_EDITOR", 0, "Sequence Editor", ""}, {SPACE_TEXT, "TEXT_EDITOR", 0, "Text Editor", ""}, - {SPACE_SOUND, "AUDIO_WINDOW", 0, "Audio Window", ""}, {SPACE_ACTION, "DOPESHEET_EDITOR", 0, "DopeSheet Editor", ""}, {SPACE_NLA, "NLA_EDITOR", 0, "NLA Editor", ""}, {SPACE_SCRIPT, "SCRIPTS_WINDOW", 0, "Scripts Window", ""}, @@ -151,8 +150,6 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr) return &RNA_SpaceSequenceEditor; case SPACE_TEXT: return &RNA_SpaceTextEditor; - /*case SPACE_SOUND: - return &RNA_SpaceAudioWindow;*/ case SPACE_ACTION: return &RNA_SpaceDopeSheetEditor; case SPACE_NLA: diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 898ee2b2623..5c4838c8842 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1451,37 +1451,6 @@ static void rna_def_userdef_theme_space_time(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_userdef_update"); } -static void rna_def_userdef_theme_space_sound(BlenderRNA *brna) -{ - StructRNA *srna; - PropertyRNA *prop; - - /* space_sound */ - - srna= RNA_def_struct(brna, "ThemeAudioWindow", NULL); - RNA_def_struct_sdna(srna, "ThemeSpace"); - RNA_def_struct_ui_text(srna, "Theme Audio Window", "Theme settings for the Audio Window"); - - rna_def_userdef_theme_spaces_main(srna, SPACE_SOUND); - - prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Grid", ""); - RNA_def_property_update(prop, 0, "rna_userdef_update"); - - prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "shade1"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Window Sliders", ""); - RNA_def_property_update(prop, 0, "rna_userdef_update"); - - prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "cframe"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Current Frame", ""); - RNA_def_property_update(prop, 0, "rna_userdef_update"); -} - static void rna_def_userdef_theme_space_image(BlenderRNA *brna) { StructRNA *srna; @@ -1956,7 +1925,6 @@ static void rna_def_userdef_dothemes(BlenderRNA *brna) rna_def_userdef_theme_space_info(brna); rna_def_userdef_theme_space_userpref(brna); rna_def_userdef_theme_space_console(brna); - rna_def_userdef_theme_space_sound(brna); rna_def_userdef_theme_space_logic(brna); rna_def_userdef_theme_colorset(brna); rna_def_userdef_themes(brna); diff --git a/source/blender/python/simple_enum_gen.py b/source/blender/python/simple_enum_gen.py index 1455747cdbb..f01b7011e4f 100644 --- a/source/blender/python/simple_enum_gen.py +++ b/source/blender/python/simple_enum_gen.py @@ -30,7 +30,7 @@ defs = """ SPACE_SEQ, SPACE_TEXT, SPACE_IMASEL, #Deprecated - SPACE_SOUND, + SPACE_SOUND, #Deprecated SPACE_ACTION, SPACE_NLA, SPACE_SCRIPT, From 32b34d631ab2f7d2a28b2f6055618f549eb691fe Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Tue, 1 Nov 2011 20:14:58 +0000 Subject: [PATCH 08/11] Space types: * Some cleanup, removed references to already deleted *_header.c files. * Marked SpaceScript as deprecated and removed header. Will keep space for now though, as some script operators are there and Campbell might want to re-use the space later. --- .../editors/space_graph/graph_intern.h | 4 - .../editors/space_image/image_intern.h | 3 - source/blender/editors/space_nla/nla_intern.h | 5 - .../editors/space_outliner/outliner_intern.h | 3 - .../editors/space_script/CMakeLists.txt | 1 - .../editors/space_script/script_header.c | 120 ------------------ .../editors/space_script/script_intern.h | 4 - .../blender/editors/space_time/time_intern.h | 3 - source/blender/makesdna/DNA_space_types.h | 2 +- source/blender/makesrna/intern/rna_space.c | 3 - source/blender/makesrna/intern/rna_userdef.c | 2 +- source/blender/python/simple_enum_gen.py | 2 +- 12 files changed, 3 insertions(+), 149 deletions(-) delete mode 100644 source/blender/editors/space_script/script_header.c diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index d0efdefe5a5..bc4fa398221 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -56,10 +56,6 @@ void graph_draw_channel_names(struct bContext *C, struct bAnimContext *ac, struc void graph_draw_curves(struct bAnimContext *ac, struct SpaceIpo *sipo, struct ARegion *ar, struct View2DGrid *grid, short sel); void graph_draw_ghost_curves(struct bAnimContext *ac, struct SpaceIpo *sipo, struct ARegion *ar); -/* ***************************************** */ -/* graph_header.c */ -void graph_header_buttons(const bContext *C, struct ARegion *ar); - /* ***************************************** */ /* graph_select.c */ diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h index 051926bf689..4310b5dbae8 100644 --- a/source/blender/editors/space_image/image_intern.h +++ b/source/blender/editors/space_image/image_intern.h @@ -51,9 +51,6 @@ struct ARegion *image_has_scope_region(struct ScrArea *sa); extern const char *image_context_dir[]; /* doc access */ -/* image_header.c */ -void image_header_buttons(const struct bContext *C, struct ARegion *ar); - void IMAGE_OT_toolbox(struct wmOperatorType *ot); /* image_draw.c */ diff --git a/source/blender/editors/space_nla/nla_intern.h b/source/blender/editors/space_nla/nla_intern.h index ec2e22e65fa..00c16d68f36 100644 --- a/source/blender/editors/space_nla/nla_intern.h +++ b/source/blender/editors/space_nla/nla_intern.h @@ -50,11 +50,6 @@ void NLA_OT_properties(wmOperatorType *ot); void draw_nla_main_data(bAnimContext *ac, SpaceNla *snla, ARegion *ar); void draw_nla_channel_list(bContext *C, bAnimContext *ac, ARegion *ar); -/* **************************************** */ -/* nla_header.c */ - -void nla_header_buttons(const bContext *C, ARegion *ar); - /* **************************************** */ /* nla_select.c */ diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index 215ab508ab6..4065b3e2e0b 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -229,7 +229,4 @@ void OUTLINER_OT_action_set(struct wmOperatorType *ot); void outliner_operatortypes(void); void outliner_keymap(struct wmKeyConfig *keyconf); -/* outliner_header.c */ -void outliner_header_buttons(const struct bContext *C, struct ARegion *ar); - #endif /* ED_OUTLINER_INTERN_H */ diff --git a/source/blender/editors/space_script/CMakeLists.txt b/source/blender/editors/space_script/CMakeLists.txt index fb88d81ddf6..00f8df299e2 100644 --- a/source/blender/editors/space_script/CMakeLists.txt +++ b/source/blender/editors/space_script/CMakeLists.txt @@ -35,7 +35,6 @@ set(INC_SYS set(SRC script_edit.c - script_header.c script_ops.c space_script.c diff --git a/source/blender/editors/space_script/script_header.c b/source/blender/editors/space_script/script_header.c deleted file mode 100644 index 8354dc1e996..00000000000 --- a/source/blender/editors/space_script/script_header.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - * ***** BEGIN GPL LICENSE BLOCK ***** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2008 Blender Foundation. - * All rights reserved. - * - * - * Contributor(s): Blender Foundation - * - * ***** END GPL LICENSE BLOCK ***** - */ - -/** \file blender/editors/space_script/script_header.c - * \ingroup spscript - */ - - -#include -#include - -#include "BLI_blenlib.h" -#include "BLI_utildefines.h" - - -#include "BKE_context.h" - -#include "ED_screen.h" -#include "ED_types.h" -#include "ED_util.h" - -#include "UI_interface.h" -#include "UI_resources.h" -#include "UI_view2d.h" - -#include "script_intern.h" - -/* ************************ header area region *********************** */ - -static void do_viewmenu(bContext *UNUSED(C), void *UNUSED(arg), int UNUSED(event)) -{ - -} - -static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *UNUSED(arg)) -{ - ScrArea *curarea= CTX_wm_area(C); - uiBlock *block; - short yco= 0, menuwidth=120; - - block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP); - uiBlockSetButmFunc(block, do_viewmenu, NULL); - - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Nothing yet", 0, yco-=20, - menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); - - if(curarea->headertype==HEADERTOP) { - uiBlockSetDirection(block, UI_DOWN); - } - else { - uiBlockSetDirection(block, UI_TOP); - uiBlockFlipOrder(block); - } - - uiTextBoundsBlock(block, 50); - uiEndBlock(C, block); - - return block; -} - -static void do_script_buttons(bContext *UNUSED(C), void *UNUSED(arg), int UNUSED(event)) -{ - //switch(event) { - //} -} - - -void script_header_buttons(const bContext *C, ARegion *ar) -{ - ScrArea *sa= CTX_wm_area(C); - uiBlock *block; - int xco, yco= 3; - - block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS); - uiBlockSetHandleFunc(block, do_script_buttons, NULL); - - xco= ED_area_header_standardbuttons(C, block, yco); - - if((sa->flag & HEADER_NO_PULLDOWN)==0) { - int xmax; - - xmax= GetButStringLength("View"); - uiDefPulldownBut(block, dummy_viewmenu, CTX_wm_area(C), - "View", xco, yco-2, xmax-3, UI_UNIT_Y, ""); - xco+=UI_UNIT_X+xmax; - } - - uiBlockSetEmboss(block, UI_EMBOSS); - - /* always as last */ - UI_view2d_totRect_set(&ar->v2d, xco+UI_UNIT_X+80, ar->v2d.tot.ymax-ar->v2d.tot.ymin); - - uiEndBlock(C, block); - uiDrawBlock(C, block); -} - - diff --git a/source/blender/editors/space_script/script_intern.h b/source/blender/editors/space_script/script_intern.h index a3565d070eb..98e9699079b 100644 --- a/source/blender/editors/space_script/script_intern.h +++ b/source/blender/editors/space_script/script_intern.h @@ -33,10 +33,6 @@ /* internal exports only */ - -/* script_header.c */ -void script_header_buttons(const bContext *C, ARegion *ar); - /* script_ops.c */ void script_operatortypes(void); void script_keymap(struct wmKeyConfig *keyconf); diff --git a/source/blender/editors/space_time/time_intern.h b/source/blender/editors/space_time/time_intern.h index 094b0bc9e86..a345d00bd74 100644 --- a/source/blender/editors/space_time/time_intern.h +++ b/source/blender/editors/space_time/time_intern.h @@ -40,8 +40,5 @@ struct wmWindowManager; void time_operatortypes(void); void time_keymap(struct wmKeyConfig *keyconf); -/* time_header.c */ -void time_header_buttons(const bContext *C, ARegion *ar); - #endif /* ED_TIME_INTERN_H */ diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index a92075c32e3..37c2ea56e76 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -873,7 +873,7 @@ enum { SPACE_SOUND, /* Deprecated */ SPACE_ACTION, SPACE_NLA, - SPACE_SCRIPT, + SPACE_SCRIPT, /* Deprecated */ SPACE_TIME, SPACE_NODE, SPACE_LOGIC, diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 19acc51feed..51faccc0d6c 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -62,7 +62,6 @@ EnumPropertyItem space_type_items[] = { {SPACE_TEXT, "TEXT_EDITOR", 0, "Text Editor", ""}, {SPACE_ACTION, "DOPESHEET_EDITOR", 0, "DopeSheet Editor", ""}, {SPACE_NLA, "NLA_EDITOR", 0, "NLA Editor", ""}, - {SPACE_SCRIPT, "SCRIPTS_WINDOW", 0, "Scripts Window", ""}, {SPACE_TIME, "TIMELINE", 0, "Timeline", ""}, {SPACE_NODE, "NODE_EDITOR", 0, "Node Editor", ""}, {SPACE_LOGIC, "LOGIC_EDITOR", 0, "Logic Editor", ""}, @@ -154,8 +153,6 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr) return &RNA_SpaceDopeSheetEditor; case SPACE_NLA: return &RNA_SpaceNLA; - /*case SPACE_SCRIPT: - return &RNA_SpaceScriptsWindow;*/ case SPACE_TIME: return &RNA_SpaceTimeline; case SPACE_NODE: diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 5c4838c8842..fc9c8a241c6 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1392,7 +1392,7 @@ static void rna_def_userdef_theme_space_logic(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - /* space_buts */ + /* space_logic */ srna= RNA_def_struct(brna, "ThemeLogicEditor", NULL); RNA_def_struct_sdna(srna, "ThemeSpace"); diff --git a/source/blender/python/simple_enum_gen.py b/source/blender/python/simple_enum_gen.py index f01b7011e4f..ec2eead522c 100644 --- a/source/blender/python/simple_enum_gen.py +++ b/source/blender/python/simple_enum_gen.py @@ -33,7 +33,7 @@ defs = """ SPACE_SOUND, #Deprecated SPACE_ACTION, SPACE_NLA, - SPACE_SCRIPT, + SPACE_SCRIPT, #Deprecated SPACE_TIME, SPACE_NODE, SPACEICONMAX From 27ffb5556a8bf879f8b29b86f16b4964f092c3d2 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Tue, 1 Nov 2011 22:21:21 +0000 Subject: [PATCH 09/11] Bugfix for [#29055] node editor / texture node / scale node * Node Vector sockets, don't have a PROP_FACTOR any longer. --- source/blender/nodes/texture/nodes/node_texture_scale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/nodes/texture/nodes/node_texture_scale.c b/source/blender/nodes/texture/nodes/node_texture_scale.c index fbca9be068c..f42b3addc91 100644 --- a/source/blender/nodes/texture/nodes/node_texture_scale.c +++ b/source/blender/nodes/texture/nodes/node_texture_scale.c @@ -35,7 +35,7 @@ static bNodeSocketTemplate inputs[]= { { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f }, - { SOCK_VECTOR, 1, "Scale", 1.0f, 1.0f, 1.0f, 0.0f, -10.0f, 10.0f, PROP_FACTOR }, + { SOCK_VECTOR, 1, "Scale", 1.0f, 1.0f, 1.0f, 0.0f, -10.0f, 10.0f, PROP_XYZ }, { -1, 0, "" } }; From d7de4d28dd5c0042e80e5dc585b35e3808c4e0a4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Nov 2011 22:51:10 +0000 Subject: [PATCH 10/11] quiet some warnings. --- build_files/cmake/cmake_consistency_check_config.py | 6 +++--- source/blender/blenfont/intern/blf_lang.c | 2 +- source/blender/blenkernel/intern/smoke.c | 7 ++++++- source/blender/blenloader/intern/readfile.c | 1 - 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/build_files/cmake/cmake_consistency_check_config.py b/build_files/cmake/cmake_consistency_check_config.py index 86f51273ff5..a6215b40ae8 100644 --- a/build_files/cmake/cmake_consistency_check_config.py +++ b/build_files/cmake/cmake_consistency_check_config.py @@ -29,8 +29,8 @@ IGNORE = ( "source/blender/imbuf/intern/imbuf_cocoa.m", "extern/recastnavigation/Recast/Source/RecastLog.cpp", "extern/recastnavigation/Recast/Source/RecastTimer.cpp", - "entern/audaspace/SRC/AUD_SRCResampleFactory.cpp", - "entern/audaspace/SRC/AUD_SRCResampleReader.cpp", + "intern/audaspace/SRC/AUD_SRCResampleFactory.cpp", + "intern/audaspace/SRC/AUD_SRCResampleReader.cpp", "extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h", "extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h", @@ -44,7 +44,7 @@ IGNORE = ( "extern/eltopo/common/meshes/ObjLoader.hpp", "extern/eltopo/common/meshes/TriangleIndex.hpp", "extern/eltopo/common/meshes/meshloader.h", - "extern/eltopo/eltopo3d/broadphase_blenderbvh.h" + "extern/eltopo/eltopo3d/broadphase_blenderbvh.h", "extern/recastnavigation/Recast/Include/RecastLog.h", "extern/recastnavigation/Recast/Include/RecastTimer.h", "intern/audaspace/SRC/AUD_SRCResampleFactory.h", diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c index 9548febab27..3bce3878d72 100644 --- a/source/blender/blenfont/intern/blf_lang.c +++ b/source/blender/blenfont/intern/blf_lang.c @@ -120,7 +120,7 @@ void BLF_lang_set(const char *str) const char *short_locale; int ok= 1; #if defined (_WIN32) && !defined(FREE_WINDOWS) - char *long_locale = locales[ 2 * U.language]; + const char *long_locale = locales[ 2 * U.language]; #endif if((U.transopts&USER_DOTRANSLATE)==0) diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index ac2a840c95a..7174126a00c 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -77,6 +77,8 @@ #include "BKE_smoke.h" +#ifdef WITH_SMOKE + #ifdef _WIN32 #include #include @@ -131,12 +133,13 @@ struct SmokeModifierData; #define TRI_UVOFFSET (1./4.) -#ifdef WITH_SMOKE /* forward declerations */ static void calcTriangleDivs(Object *ob, MVert *verts, int numverts, MFace *tris, int numfaces, int numtris, int **tridivs, float cell_len); static void get_cell(float *p0, int res[3], float dx, float *pos, int *cell, int correct); static void fill_scs_points(Object *ob, DerivedMesh *dm, SmokeCollSettings *scs); + #else /* WITH_SMOKE */ + /* Stubs to use when smoke is disabled */ struct WTURBULENCE *smoke_turbulence_init(int *UNUSED(res), int UNUSED(amplify), int UNUSED(noisetype)) { return NULL; } struct FLUID_3D *smoke_init(int *UNUSED(res), float *UNUSED(p0)) { return NULL; } @@ -146,9 +149,11 @@ void smoke_initWaveletBlenderRNA(struct WTURBULENCE *UNUSED(wt), float *UNUSED(s void smoke_initBlenderRNA(struct FLUID_3D *UNUSED(fluid), float *UNUSED(alpha), float *UNUSED(beta), float *UNUSED(dt_factor), float *UNUSED(vorticity), int *UNUSED(border_colli)) {} long long smoke_get_mem_req(int UNUSED(xres), int UNUSED(yres), int UNUSED(zres), int UNUSED(amplify)) { return 0; } void smokeModifier_do(SmokeModifierData *UNUSED(smd), Scene *UNUSED(scene), Object *UNUSED(ob), DerivedMesh *UNUSED(dm)) {} + #endif /* WITH_SMOKE */ #ifdef WITH_SMOKE + static int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, DerivedMesh *dm) { if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain && !smd->domain->fluid) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 4700a41d003..bdc25836a5d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -9124,7 +9124,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } if(main->versionfile <= 245) { Scene *sce; - bScreen *sc; Object *ob; Image *ima; Lamp *la; From 90a19ce57893642263a0b91eed96ba1a710d44af Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 1 Nov 2011 23:01:57 +0000 Subject: [PATCH 11/11] fix [#29120] project painting error --- release/scripts/startup/bl_operators/image.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/scripts/startup/bl_operators/image.py b/release/scripts/startup/bl_operators/image.py index 790c22d57d0..8c12a6442f7 100644 --- a/release/scripts/startup/bl_operators/image.py +++ b/release/scripts/startup/bl_operators/image.py @@ -192,6 +192,8 @@ class ProjectEdit(Operator): image_new.file_format = 'PNG' image_new.save() + filepath_final = bpy.path.abspath(filepath_final) + try: bpy.ops.image.external_edit(filepath=filepath_final) except RuntimeError as re: