diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-08-05 12:28:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-08-05 12:28:03 +0400 |
commit | aa1477cce1452b117769d1a6614294a3ebfd2314 (patch) | |
tree | 7975face94c0bcf5b30eea4a552a6e1dc68c4f1b /source/blender/editors | |
parent | cbb7eefe45e05f7357e60345c119b68e82138e7b (diff) | |
parent | f48631e9a4afb8d7d4ab4e15963b38ba75605f68 (diff) |
https://svn.blender.org/svnroot/bf-blender/trunk/blender, in sync with trunk now
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/BIF_glutil.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 14 | ||||
-rw-r--r-- | source/blender/editors/screen/glutil.c | 38 | ||||
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 13 | ||||
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 19 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 3 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 3 |
9 files changed, 91 insertions, 9 deletions
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index c9615204607..27bd31c20ff 100644 --- a/source/blender/editors/include/BIF_glutil.h +++ b/source/blender/editors/include/BIF_glutil.h @@ -52,6 +52,8 @@ void fdrawXORcirc(float xofs, float yofs, float rad); /* glStipple defines */ extern unsigned char stipple_halftone[128]; extern unsigned char stipple_quarttone[128]; +extern unsigned char stipple_diag_stripes_pos[128]; +extern unsigned char stipple_diag_stripes_neg[128]; /** * Draw a lined (non-looping) arc with the given diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 2311aafbb17..d0c2b387445 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -242,7 +242,9 @@ enum { TH_DRAWEXTRA_EDGELEN, TH_DRAWEXTRA_FACEAREA, - TH_DRAWEXTRA_FACEANG + TH_DRAWEXTRA_FACEANG, + + TH_NODE_CURVING }; /* XXX WARNING: previous is saved in file, so do not change order! */ diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 0c755180b3a..32e87b3a793 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -360,7 +360,9 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo cp= ts->syntaxv; break; case TH_NODE_GROUP: cp= ts->syntaxc; break; - + case TH_NODE_CURVING: + cp= &ts->noodle_curving; break; + case TH_SEQ_MOVIE: cp= ts->movie; break; case TH_SEQ_IMAGE: @@ -787,6 +789,7 @@ void ui_theme_init_default(void) SETCOL(btheme->tnode.syntaxb, 108, 105, 111, 255); /* operator */ SETCOL(btheme->tnode.syntaxv, 104, 106, 117, 255); /* generator */ SETCOL(btheme->tnode.syntaxc, 105, 117, 110, 255); /* group */ + btheme->tnode.noodle_curving = 5; /* space logic */ btheme->tlogic= btheme->tv3d; @@ -1553,7 +1556,14 @@ void init_userdef_do_versions(void) /* clear "AUTOKEY_FLAG_ONLYKEYINGSET" flag from userprefs, so that it doesn't linger around from old configs like a ghost */ U.autokey_flag &= ~AUTOKEY_FLAG_ONLYKEYINGSET; } - + + if (bmain->versionfile < 258 || (bmain->versionfile == 258 && bmain->subversionfile < 1)) { + bTheme *btheme; + for(btheme= U.themes.first; btheme; btheme= btheme->next) { + btheme->tnode.noodle_curving = 5; + } + } + /* GL Texture Garbage Collection (variable abused above!) */ if (U.textimeout == 0) { U.texcollectrate = 60; diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 2918c98c84a..f56ae17d366 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -92,6 +92,44 @@ GLubyte stipple_quarttone[128] = { 136,136,136,136,0,0,0,0,34,34,34,34,0,0,0,0}; +GLubyte stipple_diag_stripes_pos[128] = { + 0x00, 0xff, 0x00, 0xff, 0x01, 0xfe, 0x01, 0xfe, + 0x03, 0xfc, 0x03, 0xfc, 0x07, 0xf8, 0x07, 0xf8, + 0x0f, 0xf0, 0x0f, 0xf0, 0x1f, 0xe0, 0x1f, 0xe0, + 0x3f, 0xc0, 0x3f, 0xc0, 0x7f, 0x80, 0x7f, 0x80, + 0xff, 0x00, 0xff, 0x00, 0xfe, 0x01, 0xfe, 0x01, + 0xfc, 0x03, 0xfc, 0x03, 0xf8, 0x07, 0xf8, 0x07, + 0xf0, 0x0f, 0xf0, 0x0f, 0xe0, 0x1f, 0xe0, 0x1f, + 0xc0, 0x3f, 0xc0, 0x3f, 0x80, 0x7f, 0x80, 0x7f, + 0x00, 0xff, 0x00, 0xff, 0x01, 0xfe, 0x01, 0xfe, + 0x03, 0xfc, 0x03, 0xfc, 0x07, 0xf8, 0x07, 0xf8, + 0x0f, 0xf0, 0x0f, 0xf0, 0x1f, 0xe0, 0x1f, 0xe0, + 0x3f, 0xc0, 0x3f, 0xc0, 0x7f, 0x80, 0x7f, 0x80, + 0xff, 0x00, 0xff, 0x00, 0xfe, 0x01, 0xfe, 0x01, + 0xfc, 0x03, 0xfc, 0x03, 0xf8, 0x07, 0xf8, 0x07, + 0xf0, 0x0f, 0xf0, 0x0f, 0xe0, 0x1f, 0xe0, 0x1f, + 0xc0, 0x3f, 0xc0, 0x3f, 0x80, 0x7f, 0x80, 0x7f}; + + +GLubyte stipple_diag_stripes_neg[128] = { + 0xff, 0x00, 0xff, 0x00, 0xfe, 0x01, 0xfe, 0x01, + 0xfc, 0x03, 0xfc, 0x03, 0xf8, 0x07, 0xf8, 0x07, + 0xf0, 0x0f, 0xf0, 0x0f, 0xe0, 0x1f, 0xe0, 0x1f, + 0xc0, 0x3f, 0xc0, 0x3f, 0x80, 0x7f, 0x80, 0x7f, + 0x00, 0xff, 0x00, 0xff, 0x01, 0xfe, 0x01, 0xfe, + 0x03, 0xfc, 0x03, 0xfc, 0x07, 0xf8, 0x07, 0xf8, + 0x0f, 0xf0, 0x0f, 0xf0, 0x1f, 0xe0, 0x1f, 0xe0, + 0x3f, 0xc0, 0x3f, 0xc0, 0x7f, 0x80, 0x7f, 0x80, + 0xff, 0x00, 0xff, 0x00, 0xfe, 0x01, 0xfe, 0x01, + 0xfc, 0x03, 0xfc, 0x03, 0xf8, 0x07, 0xf8, 0x07, + 0xf0, 0x0f, 0xf0, 0x0f, 0xe0, 0x1f, 0xe0, 0x1f, + 0xc0, 0x3f, 0xc0, 0x3f, 0x80, 0x7f, 0x80, 0x7f, + 0x00, 0xff, 0x00, 0xff, 0x01, 0xfe, 0x01, 0xfe, + 0x03, 0xfc, 0x03, 0xfc, 0x07, 0xf8, 0x07, 0xf8, + 0x0f, 0xf0, 0x0f, 0xf0, 0x1f, 0xe0, 0x1f, 0xe0, + 0x3f, 0xc0, 0x3f, 0xc0, 0x7f, 0x80, 0x7f, 0x80}; + + void fdrawbezier(float vec[4][3]) { float dist; diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 77524c7e117..d4253495e97 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -64,6 +64,7 @@ #include <stdlib.h> #include <string.h> #include <stdio.h> +#include <ctype.h> /* for events */ #define NOTACTIVEFILE 0 @@ -1079,8 +1080,18 @@ static void file_expand_directory(bContext *C) } #ifdef WIN32 - if (sfile->params->dir[0] == '\0') + if (sfile->params->dir[0] == '\0') { get_default_root(sfile->params->dir); + } + /* change "C:" --> "C:\", [#28102] */ + else if ( (isalpha(sfile->params->dir[0]) && + (sfile->params->dir[1] == ':')) && + (sfile->params->dir[2] == '\0') + + ) { + sfile->params->dir[2]= '\\'; + sfile->params->dir[3]= '\0'; + } #endif } } diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 50e657bbb61..c32d05e9c30 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -1768,8 +1768,8 @@ int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, floa vec[3][0]= snode->mx; vec[3][1]= snode->my; } - - dist= 0.5f*ABS(vec[0][0] - vec[3][0]); + + dist= UI_GetThemeValue(TH_NODE_CURVING)*0.10f*ABS(vec[0][0] - vec[3][0]); /* check direction later, for top sockets */ vec[1][0]= vec[0][0]+dist; diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 594d2942e8f..98687bb90e0 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -639,6 +639,25 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline /* draw sound wave */ if(seq->type == SEQ_SOUND) drawseqwave(scene, seq, x1, y1, x2, y2, (ar->v2d.cur.xmax - ar->v2d.cur.xmin)/ar->winx); + /* draw lock */ + if(seq->flag & SEQ_LOCK) { + glEnable(GL_POLYGON_STIPPLE); + glEnable(GL_BLEND); + + /* light stripes */ + glColor4ub(255, 255, 255, 32); + glPolygonStipple(stipple_diag_stripes_pos); + glRectf(x1, y1, x2, y2); + + /* dark stripes */ + glColor4ub(0, 0, 0, 32); + glPolygonStipple(stipple_diag_stripes_neg); + glRectf(x1, y1, x2, y2); + + glDisable(GL_POLYGON_STIPPLE); + glDisable(GL_BLEND); + } + get_seq_color3ubv(scene, seq, col); if (G.moving && (seq->flag & SELECT)) { if(seq->flag & SEQ_OVERLAP) { diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index b7a7b6b5412..6a69d32d307 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -1785,7 +1785,7 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op) se = give_stripelem(seq, cfra); seq_new= seq_dupli_recursive(scene, scene, seq, SEQ_DUPE_UNIQUE_NAME); - BLI_addtail(&ed->seqbase, seq_new); + BLI_addtail(ed->seqbasep, seq_new); seq_new->start= start_ofs; seq_new->type= SEQ_IMAGE; @@ -1839,7 +1839,6 @@ void SEQUENCER_OT_images_separate(wmOperatorType *ot) ot->description="On image sequences strips, it return a strip for each image"; /* api callbacks */ - ot->invoke= WM_operator_props_popup; ot->exec= sequencer_separate_images_exec; ot->poll= sequencer_edit_poll; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 9df00163302..d5ff475566e 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -889,6 +889,7 @@ void resetTransRestrictions(TransInfo *t) t->flag &= ~T_ALL_RESTRICTIONS; } +/* the *op can be NULL */ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) { Scene *sce = CTX_data_scene(C); @@ -1017,7 +1018,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event) } /* initialize UV transform from */ - if (RNA_struct_find_property(op->ptr, "correct_uv")) { + if (op && RNA_struct_find_property(op->ptr, "correct_uv")) { if(RNA_property_is_set(op->ptr, "correct_uv")) { if(RNA_boolean_get(op->ptr, "correct_uv")) { t->settings->uvcalc_flag |= UVCALC_TRANSFORM_CORRECT; |