diff options
author | Ton Roosendaal <ton@blender.org> | 2007-01-15 15:44:45 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2007-01-15 15:44:45 +0300 |
commit | c01aaac311c380aae3c7ee7d7a4f950a71cd95bc (patch) | |
tree | 51968176d88c9801d747ade8d69966b25272e57b /source | |
parent | a8a339b26e53891c4f597097cc2a2625ba5af890 (diff) |
Two in one:
- Bugfix #5714
New option "Save changed images" didn't respect relative file names
- Bugfix #5621
New camera (shiftx, shifty) was missing in IpoWindow as animatable option
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/ipo.c | 13 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_ipo_types.h | 8 | ||||
-rw-r--r-- | source/blender/src/editipo_lib.c | 6 | ||||
-rw-r--r-- | source/blender/src/editsima.c | 9 |
5 files changed, 28 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index ac0bc910dbd..0b4ec067e36 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1072,7 +1072,7 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame) /* read ibuf */ ibuf = IMB_loadiffname(name, IB_rect|IB_multilayer); - printf("loaded %s\n", name); + if(G.f & G_DEBUG) printf("loaded %s\n", name); if (ibuf) { #ifdef WITH_OPENEXR diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index ec3f38d67f7..b84410b12e7 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -166,7 +166,7 @@ int la_ar[LA_TOTIPO]= { /* yafray: aperture & focal distance curves added */ /* qdn: FDIST now available to Blender as well for defocus node */ int cam_ar[CAM_TOTIPO]= { - CAM_LENS, CAM_STA, CAM_END, CAM_YF_APERT, CAM_YF_FDIST + CAM_LENS, CAM_STA, CAM_END, CAM_YF_APERT, CAM_YF_FDIST, CAM_SHIFT_X, CAM_SHIFT_Y }; int snd_ar[SND_TOTIPO]= { @@ -1476,6 +1476,10 @@ void *get_ipo_poin(ID *id, IpoCurve *icu, int *type) poin= &(ca->YF_aperture); break; case CAM_YF_FDIST: poin= &(ca->YF_dofdist); break; + case CAM_SHIFT_X: + poin= &(ca->shiftx); break; + case CAM_SHIFT_Y: + poin= &(ca->shifty); break; } } else if(GS(id->name)==ID_SO) { @@ -1757,6 +1761,13 @@ void set_icu_vars(IpoCurve *icu) case CAM_YF_FDIST: icu->ymin = 0.0; icu->ymax = 5000.0; + break; + + case CAM_SHIFT_X: + case CAM_SHIFT_Y: + icu->ymin= -2.0f; + icu->ymax= 2.0f; + break; } } else if(icu->blocktype==ID_SO) { diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h index 0bea05bb634..434d4f4926f 100644 --- a/source/blender/makesdna/DNA_ipo_types.h +++ b/source/blender/makesdna/DNA_ipo_types.h @@ -272,16 +272,20 @@ typedef short IPO_Channel; /* ******************** */ /* yafray: totipo & totnam +2 because of added curves */ -#define CAM_TOTIPO 5 -#define CAM_TOTNAM 5 +#define CAM_TOTIPO 7 +#define CAM_TOTNAM 7 #define CAM_LENS 1 #define CAM_STA 2 #define CAM_END 3 + /* yafray aperture & focal distance curves */ #define CAM_YF_APERT 4 #define CAM_YF_FDIST 5 +#define CAM_SHIFT_X 6 +#define CAM_SHIFT_Y 7 + /* ******************** */ #define SND_TOTIPO 4 diff --git a/source/blender/src/editipo_lib.c b/source/blender/src/editipo_lib.c index 4c6bb24a3da..f32e1816b2d 100644 --- a/source/blender/src/editipo_lib.c +++ b/source/blender/src/editipo_lib.c @@ -88,7 +88,7 @@ char *wo_ic_names[WO_TOTNAM] = { "HorR", "HorG", "HorB", "ZenR", "ZenG", "ZenB", char *la_ic_names[LA_TOTNAM] = { "Energ", "R", "G", "B", "Dist", "SpoSi", "SpoBl", "Quad1", "Quad2", "HaInt" }; /* yafray: two curve names added, 'Apert' for aperture, and 'FDist' for focal distance */ -char *cam_ic_names[CAM_TOTNAM] = { "Lens", "ClSta", "ClEnd", "Apert", "FDist" }; +char *cam_ic_names[CAM_TOTNAM] = { "Lens", "ClSta", "ClEnd", "Apert", "FDist", "ShiftX", "ShiftY" }; char *snd_ic_names[SND_TOTNAM] = { "Vol", "Pitch", "Pan", "Atten" }; char *ac_ic_names[AC_TOTNAM] = {"LocX", "LocY", "LocZ", "ScaleX", "ScaleY", "ScaleZ", "QuatW", "QuatX", "QuatY", "QuatZ"}; @@ -187,9 +187,7 @@ char *getname_la_ei(int nr) char *getname_cam_ei(int nr) { - /* yafray: curves extended to CAM_YF_FDIST */ - //if(nr>=CAM_LENS && nr<=CAM_END) return cam_ic_names[nr-1]; - if(nr>=CAM_LENS && nr<=CAM_YF_FDIST) return cam_ic_names[nr-1]; + if(nr>=CAM_LENS && nr<=CAM_SHIFT_Y) return cam_ic_names[nr-1]; return ic_name_empty[0]; } diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c index 8fa2396a634..b7a5c168f7e 100644 --- a/source/blender/src/editsima.c +++ b/source/blender/src/editsima.c @@ -1847,8 +1847,13 @@ void save_image_sequence_sima(void) for(ibuf= G.sima->image->ibufs.first; ibuf; ibuf= ibuf->next) { if(ibuf->userflags & IB_BITMAPDIRTY) { - if(0 == IMB_saveiff(ibuf, ibuf->name, IB_rect | IB_zbuf | IB_zbuffloat)) { - error("Could not write image", ibuf->name); + char name[FILE_MAX]; + BLI_strncpy(name, ibuf->name, sizeof(name)); + + BLI_convertstringcode(name, G.sce, 0); + + if(0 == IMB_saveiff(ibuf, name, IB_rect | IB_zbuf | IB_zbuffloat)) { + error("Could not write image", name); break; } printf("Saved: %s\n", ibuf->name); |