diff options
Diffstat (limited to 'source/blender/src')
-rw-r--r-- | source/blender/src/buttons_scene.c | 66 | ||||
-rw-r--r-- | source/blender/src/buttons_shading.c | 2 | ||||
-rw-r--r-- | source/blender/src/drawview.c | 2 | ||||
-rw-r--r-- | source/blender/src/editmesh_tools.c | 11 | ||||
-rw-r--r-- | source/blender/src/edittime.c | 23 | ||||
-rw-r--r-- | source/blender/src/transform_constraints.c | 2 |
6 files changed, 97 insertions, 9 deletions
diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index c319485cb0f..939c3b561e3 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -1526,6 +1526,71 @@ static void render_panel_ffmpeg_audio(void) } #endif +static void render_panel_stamp(void) +{ + uiBlock *block; + int yofs, xofs; + + + block= uiNewBlock (&curarea->uiblocks, "render_panel_stamp", UI_EMBOSS, UI_HELV, curarea->win); + uiNewPanelTabbed ("Format", "Render"); + if(uiNewPanel (curarea, block, "Stamp", "Render", 960, 0, 318, 204)==0) return; + + if (G.scene->r.scemode & R_STAMP_INFO) { + yofs = 0; + xofs = 550;uiBlockBeginAlign(block); + + uiBlockBeginAlign(block); + uiDefButBitI(block, TOG, R_STAMP_NOTE, B_REDR, "Note", xofs, yofs, 100, 19, &G.scene->r.stamp, 0, 0, 0, 0, "Stamp user data"); + uiDefBut(block, TEX, B_NOP, "", xofs+100, yofs, 200, 19, &G.scene->r.stamp_udata, 0.0, 128.0, 100, 0, "User Note"); + uiBlockEndAlign(block); + yofs += 30; /* gap */ + + + yofs += 100; + // Order is important for alligning ... grr + uiBlockBeginAlign(block); + uiDefButBitI(block, TOG, R_STAMP_SCENE, B_REDR, "Scene", xofs, yofs, 100, 19, &G.scene->r.stamp, 0, 0, 0, 0, "Stamp scene name"); + yofs -= 20; + uiDefButBitI(block, TOG, R_STAMP_CAMERA, B_REDR, "Camera", xofs, yofs, 100, 19, &G.scene->r.stamp, 0, 0, 0, 0, "Stamp camera name"); + yofs -= 20; + uiDefButBitI(block, TOG, R_STAMP_DATE, B_REDR, "Date", xofs, yofs, 100, 19, &G.scene->r.stamp, 0, 0, 0, 0, "Stamp date"); + yofs -= 20; + uiDefButBitI(block, TOG, R_STAMP_TIME, B_REDR, "Time", xofs, yofs, 100, 19, &G.scene->r.stamp, 0, 0, 0, 0, "Stamp time (HH:MM:SS)"); + yofs -= 20; + uiDefButBitI(block, TOG, R_STAMP_FRAME, B_REDR, "Frame", xofs, yofs, 100, 19, &G.scene->r.stamp, 0, 0, 0, 0, "Stamp frame number"); + yofs -= 20; + uiDefButBitI(block, TOG, R_STAMP_MARKER, B_REDR, "Marker", xofs, yofs, 100, 19, &G.scene->r.stamp, 0, 0, 0, 0, "Stamp the last marker"); + uiBlockEndAlign(block); + yofs += 100; + + /* draw font selector */ + if (G.scene->r.stamp & R_STAMP_DRAW) { + uiDefButS(block, MENU, B_REDR, "Stamp Font Size%t|Tiny Text%x1|Small Text%x2|Medium Text%x3|Large Text%x0|Extra Large Text%x4|", + xofs+110, yofs, 190, 19, &G.scene->r.stamp_font_id, 0, 0, 0, 0, "Choose rendering engine"); + + /* draw fg/bg next to the scene */ + yofs -= 25; + uiDefBut(block, LABEL, 0, "Text Color", xofs+110, yofs, 80, 19, 0, 0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Background", xofs+205, yofs, 80, 19, 0, 0, 0, 0, 0, ""); + yofs -= 20; + uiDefButF(block, COL, B_NOP, "", xofs+110, yofs, 90, 19, G.scene->r.fg_stamp, 0, 0, 0, 0, "Foreground text color"); + uiDefButF(block, COL, B_NOP, "", xofs+210, yofs, 90, 19, G.scene->r.bg_stamp, 0, 0, 0, 0, "Background color"); + yofs += 75; + } else { + yofs += 30; + } + + uiDefButBitS(block, TOG, R_STAMP_INFO, B_REDR, "Enable Stamp", xofs, yofs, 100, 20, &G.scene->r.scemode, 0, 0, 0, 0, "Disable stamp info in images metadata"); + uiDefButBitI(block, TOG, R_STAMP_DRAW, B_REDR, "Draw Stamp", xofs+110, yofs, 190, 20, &G.scene->r.stamp, 0, 0, 0, 0, "Draw the stamp info into each frame"); + yofs += 20; + } + else { + uiDefButBitS(block, TOG, R_STAMP_INFO, B_REDR, "Enable Stamp", xofs, 142, 100, 20, &G.scene->r.scemode, 0, 0, 0, 0, "Enable stamp info to image metadata"); + yofs += 20; + uiDefBut(block, LABEL, 0, "", xofs, yofs, 300, 19, 0, 0, 0, 0, 0, ""); + } +} static void render_panel_format(void) { @@ -1927,6 +1992,7 @@ void render_panels() render_panel_bake(); render_panel_format(); + render_panel_stamp(); #ifdef WITH_FFMPEG if (G.scene->r.imtype == R_FFMPEG) { render_panel_ffmpeg_video(); diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index e5026f6f64e..56c8d60bf5b 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -3377,7 +3377,7 @@ static void material_panel_tramir(Material *ma) uiBlockBeginAlign(block); uiDefButF(block, NUM, B_MATPRV, "Filter:", - X2CLM2, yco-=BUTH, BUTW2, BUTH, &(ma->filter), 0.0, 1.0, 10, 0, "Amount to blend in the material's diffuse colour in raytraced transparency (simulating absorption)"); + X2CLM2, yco-=BUTH, BUTW2, BUTH, &(ma->filter), 0.0, 1.0, 10, 0, "Amount to blend in the material's diffuse color in raytraced transparency (simulating absorption)"); uiDefButF(block, NUMSLI, B_MATPRV, "Limit: ", X2CLM2, yco-=BUTH, BUTW2, BUTH, &(ma->tx_limit), 0.0, 100.0, 10, 2, "Maximum depth for light to travel through the transparent material before becoming fully filtered (0.0 is disabled)"); uiDefButF(block, NUMSLI, B_MATPRV, "Falloff: ", diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index d67df1e0e97..9777415fc0a 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -1021,7 +1021,7 @@ static void drawviewborder(void) BIF_ThemeColor(TH_WIRE); glRectf(x1, y1, x2, y2); - /* camera name - draw in highlighted text colour */ + /* camera name - draw in highlighted text color */ if (ca && (ca->flag & CAM_SHOWNAME)) { BIF_ThemeColor(TH_TEXT_HI); glRasterPos2f(x1, y1-15); diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index 56db0ea7016..a68fca3b294 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -198,10 +198,10 @@ void convert_to_triface(int direction) int removedoublesflag(short flag, short automerge, float limit) /* return amount */ { /* - flag - Test with vert->flags - weld - Alternative operation, merge unselected into selected. - Used for "Auto Weld" mode. warning. - limit - Quick manhattan distance between verts. + flag - Test with vert->flags + automerge - Alternative operation, merge unselected into selected. + Used for "Auto Weld" mode. warning. + limit - Quick manhattan distance between verts. */ EditMesh *em = G.editMesh; @@ -211,7 +211,6 @@ int removedoublesflag(short flag, short automerge, float limit) /* return amoun EditFace *efa, *nextvl; xvertsort *sortblock, *sb, *sb1; struct facesort *vlsortblock, *vsb, *vsb1; - float dist; int a, b, test, amount; if(multires_test()) return 0; @@ -253,7 +252,7 @@ int removedoublesflag(short flag, short automerge, float limit) /* return amoun for(b=a+1; b<amount && (eve->f & 128)==0; b++, sb1++) { if(sb1->x - sb->x > limit) break; - /* when welding, only allow selected-> unselected*/ + /* when automarge, only allow unselected->selected */ v1= sb1->v1; if( (v1->f & 128)==0 ) { if ((eve->f & flag)==0 && (v1->f & flag)==1) { diff --git a/source/blender/src/edittime.c b/source/blender/src/edittime.c index d9981f58ac2..280c69e2719 100644 --- a/source/blender/src/edittime.c +++ b/source/blender/src/edittime.c @@ -103,6 +103,8 @@ void add_marker(int frame) BIF_undo_push("Add Marker"); } + + /* remove selected TimeMarkers */ void remove_marker(void) { @@ -733,6 +735,27 @@ void nextprev_timeline_key(short dir) } } +/* return the current marker for this frame, +we can have more then 1 marker per frame, this just returns the first :/ */ +TimeMarker *get_frame_marker(int frame) +{ + TimeMarker *marker, *best_marker = NULL; + int best_frame = -MAXFRAME*2; + for (marker= G.scene->markers.first; marker; marker= marker->next) { + if (marker->frame==frame) { + return marker; + } + + if ( marker->frame > best_frame && marker->frame < frame) { + best_marker = marker; + best_frame = marker->frame; + } + } + + return best_marker; +} + + void timeline_frame_to_center(void) { float dtime; diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c index 0147435965d..ad48d3cc919 100644 --- a/source/blender/src/transform_constraints.c +++ b/source/blender/src/transform_constraints.c @@ -850,7 +850,7 @@ static void setNearestAxis2d(TransInfo *t) ival[1]= t->imval[1]; /* no correction needed... just use whichever one is lower */ - if ( abs(mval[0]-ival[0]) > abs(mval[1]-ival[1]) ) { + if ( abs(mval[0]-ival[0]) < abs(mval[1]-ival[1]) ) { t->con.mode |= CON_AXIS1; sprintf(t->con.text, " along Y axis"); } |