From 2c9f5f1f7c6153db67d892d09946fbb2455f4c73 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Sat, 21 Jan 2012 11:15:01 +0000 Subject: Added DNA_DEPRECATED attribute to some old data in bNodeSocket. DNA_DEPRECATED is disabled in writefile.c now to allow forward compatibility code writing to deprecated member data. --- source/blender/blenloader/intern/writefile.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 1231a076502..ae4bc936193 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -89,6 +89,9 @@ Any case: direct data is ALWAYS after the lib block #include "BLI_winstuff.h" #endif +/* allow writefile to use deprecated functionality (for forward compatibility code) */ +#define DNA_DEPRECATED_ALLOW + #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_actuator_types.h" @@ -653,7 +656,7 @@ static void write_node_socket(WriteData *wd, bNodeSocket *sock) /* forward compatibility code, so older blenders still open */ sock->stack_type = 1; - + if(sock->default_value) { bNodeSocketValueFloat *valfloat; bNodeSocketValueVector *valvector; -- cgit v1.2.3 From ae771e742b44119352255bd604e4ffcf427e5049 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 21 Jan 2012 14:54:53 +0000 Subject: change filepath limit from 240 to 1024 --- source/blender/blenloader/BLO_readfile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index 38925ea5238..d63baca883e 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -65,7 +65,7 @@ typedef struct BlendFileData { int fileflags; int displaymode; int globalf; - char filename[240]; /* 240 = FILE_MAX */ + char filename[1024]; /* 1024 = FILE_MAX */ struct bScreen* curscreen; struct Scene* curscene; -- cgit v1.2.3 From cfab40b65235a4cf55f74af1da45a9bc4511a3fd Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 22 Jan 2012 03:42:49 +0000 Subject: Fluidsim - Restoring simulation speed control (ZanQdo request) This commit restores support for freezing or speeding up physics sims. Animate the "Speed" parameter under Domain->Time, which controls a multiplier factor for the rate at which the sim proceeds (i.e. the old "Fac-Tim" setting). Notes: * Subversion bumped to 4 to patch up defaults for new value so that old sim files will still run correctly * Names/descriptions could do with some tweaking * Porting this across was not that obvious since quite a bit of stuff had changed (as in, been cleaned up). However, from tests so far, it seems to work well. --- source/blender/blenloader/intern/readfile.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index fb49f3974b4..28f00f355de 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -13019,6 +13019,23 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } + if (main->versionfile < 261 || (main->versionfile == 261 && main->subversionfile < 4)) + { + { + /* set fluidsim rate */ + Object *ob; + for (ob = main->object.first; ob; ob = ob->id.next) { + ModifierData *md; + for (md = ob->modifiers.first; md; md = md->next) { + if (md->type == eModifierType_Fluidsim) { + FluidsimSettings *fss = (FluidsimSettings *)md; + fss->animRate = 1.0f; + } + } + } + } + } + /* put compatibility code here until next subversion bump */ { } -- cgit v1.2.3