Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/intern/fluidsim.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c9
-rw-r--r--source/blender/makesdna/DNA_object_fluidsim.h2
-rw-r--r--source/blender/src/buttons_object.c6
4 files changed, 13 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c
index 746e4387b61..4c00dc1e918 100644
--- a/source/blender/blenkernel/intern/fluidsim.c
+++ b/source/blender/blenkernel/intern/fluidsim.c
@@ -181,7 +181,7 @@ DerivedMesh *fluidsimModifier_do(FluidsimModifierData *fluidmd, Object *ob, Deri
// clmd->sim_parms->timescale= timescale;
// support reversing of baked fluid frames here
- if((fss->show_advancedoptions & OB_FLUIDSIM_REVERSE) && (fss->lastgoodframe >= 0))
+ if((fss->flag & OB_FLUIDSIM_REVERSE) && (fss->lastgoodframe >= 0))
{
framenr = fss->lastgoodframe - framenr + 1;
CLAMP(framenr, 1, fss->lastgoodframe);
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 35d605fefe7..8d2fa9036a6 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3045,6 +3045,13 @@ static void lib_link_object(FileData *fd, Main *main)
act= act->next;
}
+ {
+ FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim);
+
+ if(fluidmd && fluidmd->fss)
+ fluidmd->fss->ipo = newlibadr_us(fd, ob->id.lib, fluidmd->fss->ipo);
+ }
+
/* texture field */
if(ob->pd)
if(ob->pd->tex)
@@ -3121,7 +3128,6 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
FluidsimModifierData *fluidmd = (FluidsimModifierData*) md;
fluidmd->fss= newdataadr(fd, fluidmd->fss);
- fluidmd->fss->ipo = newlibadr_us(fd, lb, fluidmd->fss->ipo);
}
else if (md->type==eModifierType_Collision) {
@@ -7794,6 +7800,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
MEM_freeN(ob->fluidsimSettings);
fluidmd->fss->lastgoodframe = INT_MAX;
+ fluidmd->fss->flag = 0;
}
}
}
diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h
index ac7828b1798..fde1ce57875 100644
--- a/source/blender/makesdna/DNA_object_fluidsim.h
+++ b/source/blender/makesdna/DNA_object_fluidsim.h
@@ -159,7 +159,7 @@ typedef struct FluidsimSettings {
#define OB_FSPART_FLOAT (1<<4)
// new fluid bit flags for fss->flags - dg
-#define OB_FLUIDSIM_REVERSE 1
+#define OB_FLUIDSIM_REVERSE (1 << 0)
#ifdef __cplusplus
}
diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c
index 1b4a729f743..e0e04fef019 100644
--- a/source/blender/src/buttons_object.c
+++ b/source/blender/src/buttons_object.c
@@ -2407,7 +2407,7 @@ void do_object_panels(unsigned short event)
case B_FLUIDSIM_CHANGETYPE:
{
FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim);
- fluidmd->fss->show_advancedoptions &= ~OB_FLUIDSIM_REVERSE; // clear flag
+ fluidmd->fss->flag &= ~OB_FLUIDSIM_REVERSE; // clear flag
if(ob && ob->particlesystem.first && fluidmd->fss->type!=OB_FLUIDSIM_PARTICLE){
ParticleSystem *psys;
for(psys=ob->particlesystem.first; psys; psys=psys->next) {
@@ -5185,7 +5185,7 @@ static void object_panel_fluidsim(Object *ob)
yline -= 1*separateHeight;
uiBlockBeginAlign ( block );
- uiDefButBitS ( block, TOG, OB_FLUIDSIM_REVERSE, REDRAWBUTSOBJECT, "Reverse", 0, yline,50,objHeight, &fss->flag, 0, 0, 0, 0, "Reverse fluidsim frames" );
+ uiDefButBitI ( block, TOG, OB_FLUIDSIM_REVERSE, REDRAWBUTSOBJECT, "Reverse", 0, yline,50,objHeight, &fss->flag, 0, 0, 0, 0, "Reverse fluidsim frames" );
uiDefBut ( block, LABEL, 0, "", 50,yline,25,objHeight, NULL, 0.0, 0, 0, 0, "" );
uiDefIconBut ( block, BUT, B_FLUIDSIM_SELDIR, ICON_FILESEL, 75, yline, 20, objHeight, 0, 0, 0, 0, 0, "Select Directory (and/or filename prefix) to store baked fluid simulation files in" );
uiDefBut ( block, TEX, B_BAKE_CACHE_CHANGE,"", 95, yline, 205, objHeight, fss->surfdataPath, 0.0,79.0, 0, 0, "Enter Directory (and/or filename prefix) to store baked fluid simulation files in" );
@@ -5342,7 +5342,7 @@ static void object_panel_fluidsim(Object *ob)
yline -= lineHeight;
uiDefButF ( block, NUM, B_DIFF, "Quality:", 0, yline,150,20, &fss->cpsQuality, 5.0, 100.0, 10,0, "Specifies the quality which is used for object sampling (higher = better but slower)." );
- uiDefButBitS ( block, TOG, OB_FLUIDSIM_REVERSE, REDRAWBUTSOBJECT, "Reverse", 150, yline,150,20, &fss->flag, 0, 0, 0, 0, "Reverse control object movement." );
+ uiDefButBitI ( block, TOG, OB_FLUIDSIM_REVERSE, REDRAWBUTSOBJECT, "Reverse", 150, yline,150,20, &fss->flag, 0, 0, 0, 0, "Reverse control object movement." );
}
else
{