diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-26 11:34:40 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-26 11:34:40 +0300 |
commit | 87627374000b7de7445736a7239a3f2b168ce7eb (patch) | |
tree | 2f0fe5d42d0938fc1b684af702d8613099bea1bd /source/blender/editors | |
parent | 784d8ee37a52f3ef689aa6d02e75e50566efe93f (diff) | |
parent | ba8ea9ec63c25b1ce134a846176f7bf252f4d487 (diff) |
2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17853:HEAD
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/anim_markers.c | 22 | ||||
-rw-r--r-- | source/blender/editors/space_file/SConscript | 7 | ||||
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 7 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 3 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 18 |
5 files changed, 52 insertions, 5 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 2bd91ec9e6a..947b3bad9e7 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -163,6 +163,9 @@ void draw_markers_time(const bContext *C, int flag) View2D *v2d= UI_view2d_fromcontext(C); TimeMarker *marker; + if(markers == NULL) + return; + /* unselected markers are drawn at the first time */ for (marker= markers->first; marker; marker= marker->next) { if (!(marker->flag & SELECT)) draw_marker(v2d, marker, CTX_data_scene(C)->r.cfra, flag); @@ -185,6 +188,9 @@ static int ed_marker_add(bContext *C, wmOperator *op) TimeMarker *marker; int frame= CTX_data_scene(C)->r.cfra; + if(markers == NULL) + return OPERATOR_CANCELLED; + /* two markers can't be at the same place */ for(marker= markers->first; marker; marker= marker->next) if(marker->frame == frame) @@ -260,6 +266,8 @@ static int ed_marker_move_init(bContext *C, wmOperator *op) TimeMarker *marker; int totmark=0; int a; + + if(markers == NULL) return 0; for (marker= markers->first; marker; marker= marker->next) if (marker->flag & SELECT) totmark++; @@ -496,6 +504,8 @@ static void ed_marker_duplicate_apply(bContext *C, wmOperator *op) ListBase *markers= context_get_markers(C); TimeMarker *marker, *newmarker; + if(markers == NULL) return; + /* go through the list of markers, duplicate selected markers and add duplicated copies * to the begining of the list (unselect original markers) */ for(marker= markers->first; marker; marker= marker->next) { @@ -591,6 +601,9 @@ static int ed_marker_select(bContext *C, wmEvent *evt, int extend) float viewx; int x, y, cfra; + if(markers == NULL) + return OPERATOR_PASS_THROUGH; + x= evt->x - CTX_wm_region(C)->winrct.xmin; y= evt->y - CTX_wm_region(C)->winrct.ymin; @@ -681,6 +694,9 @@ static int ed_marker_border_select_exec(bContext *C, wmOperator *op) if(yminf > 30.0f || ymaxf < 0.0f) return 0; + if(markers == NULL) + return 0; + /* XXX marker context */ for(marker= markers->first; marker; marker= marker->next) { if ((marker->frame > xminf) && (marker->frame <= xmaxf)) { @@ -730,6 +746,9 @@ static int ed_marker_select_all_exec(bContext *C, wmOperator *op) ListBase *markers= context_get_markers(C); TimeMarker *marker; int select= RNA_int_get(op->ptr, "select_type"); + + if(markers == NULL) + return OPERATOR_CANCELLED; if(RNA_boolean_get(op->ptr, "select_swap")) { for(marker= markers->first; marker; marker= marker->next) { @@ -786,6 +805,9 @@ static int ed_marker_delete_exec(bContext *C, wmOperator *op) TimeMarker *marker, *nmarker; short changed= 0; + if(markers == NULL) + return OPERATOR_CANCELLED; + for(marker= markers->first; marker; marker= nmarker) { nmarker= marker->next; if(marker->flag & SELECT) { diff --git a/source/blender/editors/space_file/SConscript b/source/blender/editors/space_file/SConscript index dab30676171..8302d6eecef 100644 --- a/source/blender/editors/space_file/SConscript +++ b/source/blender/editors/space_file/SConscript @@ -8,4 +8,9 @@ incs += ' ../../blenloader #intern/bmfont ../../makesrna' incs += ' ../../render/extern/include ' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' -env.BlenderLib ( 'bf_editors_space_file', sources, Split(incs), [], libtype=['core'], priority=[115] ) +defs = [] + +if env['WITH_BF_OPENJPEG']: + defs.append('WITH_OPENJPEG') + +env.BlenderLib ( 'bf_editors_space_file', sources, Split(incs), defs, libtype=['core'], priority=[115] ) diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index e3551510df1..384fb2141c3 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -769,6 +769,9 @@ void filelist_setfiletypes(struct FileList* filelist, short has_quicktime) if( BLI_testextensie(file->relname, ".int") || BLI_testextensie(file->relname, ".inta") || BLI_testextensie(file->relname, ".jpg") +#ifdef WITH_OPENJPEG + || BLI_testextensie(file->relname, ".jp2") +#endif || BLI_testextensie(file->relname, ".jpeg") || BLI_testextensie(file->relname, ".tga") || BLI_testextensie(file->relname, ".rgb") @@ -812,6 +815,10 @@ void filelist_setfiletypes(struct FileList* filelist, short has_quicktime) if(BLI_testextensie(file->relname, ".int") || BLI_testextensie(file->relname, ".inta") || BLI_testextensie(file->relname, ".jpg") + || BLI_testextensie(file->relname, ".jpeg") +#ifdef WITH_OPENJPEG + || BLI_testextensie(file->relname, ".jp2") +#endif || BLI_testextensie(file->relname, ".tga") || BLI_testextensie(file->relname, ".rgb") || BLI_testextensie(file->relname, ".rgba") diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index c10cadb2332..a96cd5a817c 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1080,7 +1080,8 @@ void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) int m; #endif - if(G.f & G_VERTEXPAINT || G.f & G_WEIGHTPAINT || G.f & G_TEXTUREPAINT); + if(G.f & G_VERTEXPAINT || G.f & G_WEIGHTPAINT); + else if((G.f & G_TEXTUREPAINT) && scene->toolsettings && (scene->toolsettings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE)==0); else if(scene->obedit && v3d->drawtype>OB_WIRE && (v3d->flag & V3D_ZBUF_SELECT)); else { v3d->flag &= ~V3D_NEEDBACKBUFDRAW; diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 023b97058d3..7663f3418fb 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -1212,10 +1212,22 @@ int snapObjects(TransInfo *t, int *dist, float *loc, float *no, int mode) { Object *ob = dupli_ob->ob; if (ob->type == OB_MESH) { - DerivedMesh *dm = mesh_get_derived_final(t->scene, ob, CD_MASK_BAREMESH); + DerivedMesh *dm; + EditMesh *em; int val; - - val = snapDerivedMesh(t, ob, dm, NULL, dupli_ob->mat, ray_start, ray_normal, t->mval, loc, no, dist, &depth); + + if(ob == t->obedit) + { + em = ((Mesh *)ob->data)->edit_mesh; + dm = editmesh_get_derived_cage(t->scene, t->obedit, em, CD_MASK_BAREMESH); + } + else + { + em = NULL; + dm = mesh_get_derived_final(t->scene, ob, CD_MASK_BAREMESH); + } + + val = snapDerivedMesh(t, ob, dm, em, dupli_ob->mat, ray_start, ray_normal, t->mval, loc, no, dist, &depth); retval = retval || val; |