forked from bartvdbraak/blender
* Fix for incorrect disabling after baking cloth sim
* Fix for time cursor getting 'stuck' after baking point caches
This commit is contained in:
parent
45955fef18
commit
a358b6386d
@ -83,10 +83,10 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel):
|
|||||||
if md:
|
if md:
|
||||||
cloth = md.settings
|
cloth = md.settings
|
||||||
|
|
||||||
layout.active = cloth_panel_enabled(md)
|
|
||||||
|
|
||||||
split = layout.split()
|
split = layout.split()
|
||||||
|
|
||||||
|
split.active = cloth_panel_enabled(md)
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
|
|
||||||
col.label(text="Presets:")
|
col.label(text="Presets:")
|
||||||
|
@ -151,6 +151,7 @@ typedef struct PTCacheBaker {
|
|||||||
int (*break_test)(void *data);
|
int (*break_test)(void *data);
|
||||||
void *break_data;
|
void *break_data;
|
||||||
void (*progressbar)(void *data, int num);
|
void (*progressbar)(void *data, int num);
|
||||||
|
void (*progressend)(void *data);
|
||||||
void *progresscontext;
|
void *progresscontext;
|
||||||
} PTCacheBaker;
|
} PTCacheBaker;
|
||||||
|
|
||||||
|
@ -2232,6 +2232,7 @@ void BKE_ptcache_quick_cache_all(Scene *scene)
|
|||||||
baker.break_test=NULL;
|
baker.break_test=NULL;
|
||||||
baker.pid=NULL;
|
baker.pid=NULL;
|
||||||
baker.progressbar=NULL;
|
baker.progressbar=NULL;
|
||||||
|
baker.progressend=NULL;
|
||||||
baker.progresscontext=NULL;
|
baker.progresscontext=NULL;
|
||||||
baker.render=0;
|
baker.render=0;
|
||||||
baker.anim_init = 0;
|
baker.anim_init = 0;
|
||||||
@ -2360,6 +2361,7 @@ void BKE_ptcache_make_cache(PTCacheBaker* baker)
|
|||||||
if(baker->break_test && baker->break_test(baker->break_data))
|
if(baker->break_test && baker->break_test(baker->break_data))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
baker->progressend(baker->progresscontext);
|
||||||
|
|
||||||
/* clear baking flag */
|
/* clear baking flag */
|
||||||
if(pid) {
|
if(pid) {
|
||||||
|
@ -109,9 +109,11 @@ static int ptcache_bake_all_exec(bContext *C, wmOperator *op)
|
|||||||
|
|
||||||
if (win) {
|
if (win) {
|
||||||
baker.progressbar = (void (*)(void *, int))WM_timecursor;
|
baker.progressbar = (void (*)(void *, int))WM_timecursor;
|
||||||
|
baker.progressend = (void (*)(void *))WM_cursor_restore;
|
||||||
baker.progresscontext = win;
|
baker.progresscontext = win;
|
||||||
} else {
|
} else {
|
||||||
baker.progressbar = bake_console_progress;
|
baker.progressbar = bake_console_progress;
|
||||||
|
baker.progressend = NULL;
|
||||||
baker.progresscontext = NULL;
|
baker.progresscontext = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,10 +202,12 @@ static int ptcache_bake_exec(bContext *C, wmOperator *op)
|
|||||||
|
|
||||||
if (win) {
|
if (win) {
|
||||||
baker.progressbar = (void (*)(void *, int))WM_timecursor;
|
baker.progressbar = (void (*)(void *, int))WM_timecursor;
|
||||||
|
baker.progressend = (void (*)(void *))WM_cursor_restore;
|
||||||
baker.progresscontext = win;
|
baker.progresscontext = win;
|
||||||
} else {
|
} else {
|
||||||
printf("\n"); /* empty first line before console reports */
|
printf("\n"); /* empty first line before console reports */
|
||||||
baker.progressbar = bake_console_progress;
|
baker.progressbar = bake_console_progress;
|
||||||
|
baker.progressend = NULL;
|
||||||
baker.progresscontext = NULL;
|
baker.progresscontext = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4174,7 +4174,6 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Obj
|
|||||||
ParticleEditSettings *pset = PE_settings(scene);
|
ParticleEditSettings *pset = PE_settings(scene);
|
||||||
int i, k, totpoint = edit->totpoint, timed = pset->flag & PE_FADE_TIME ? pset->fade_frames : 0;
|
int i, k, totpoint = edit->totpoint, timed = pset->flag & PE_FADE_TIME ? pset->fade_frames : 0;
|
||||||
int steps=1;
|
int steps=1;
|
||||||
char nosel[4], sel[4];
|
|
||||||
float sel_col[3];
|
float sel_col[3];
|
||||||
float nosel_col[3];
|
float nosel_col[3];
|
||||||
float *pathcol = NULL, *pcol;
|
float *pathcol = NULL, *pcol;
|
||||||
|
@ -212,7 +212,7 @@ void WM_timecursor(wmWindow *win, int nr)
|
|||||||
unsigned char bitmap[16][2];
|
unsigned char bitmap[16][2];
|
||||||
int i, idx;
|
int i, idx;
|
||||||
|
|
||||||
if(win->lastcursor != 0)
|
if(win->lastcursor == 0)
|
||||||
win->lastcursor= win->cursor;
|
win->lastcursor= win->cursor;
|
||||||
|
|
||||||
memset(&bitmap, 0x00, sizeof(bitmap));
|
memset(&bitmap, 0x00, sizeof(bitmap));
|
||||||
|
Loading…
Reference in New Issue
Block a user