Skip to content

Commit

Permalink
Merge pull request firemodels#1870 from gforney/master
Browse files Browse the repository at this point in the history
add back load all slice and load all vector slice menu items
  • Loading branch information
gforney authored Apr 15, 2024
2 parents 555cbc9 + ac9ccb5 commit f05aa73
Show file tree
Hide file tree
Showing 11 changed files with 390 additions and 17 deletions.
7 changes: 7 additions & 0 deletions Source/smokeview/IOpart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1965,10 +1965,12 @@ FILE_SIZE ReadPart(char *file_arg, int ifile_arg, int loadflag_arg, int *errorco
parti->loaded = 0;
parti->display=0;

#ifndef pp_PART_SPEEDUP
THREADcontrol(partload_threads, THREAD_LOCK);
plotstate=GetPlotState(DYNAMIC_PLOTS);
updatemenu=1;
THREADcontrol(partload_threads, THREAD_UNLOCK);
#endif

FREEMEMORY(parti->times);
FREEMEMORY(parti->times_map);
Expand All @@ -1981,6 +1983,11 @@ FILE_SIZE ReadPart(char *file_arg, int ifile_arg, int loadflag_arg, int *errorco
updatemenu = 1;
UpdatePart5Extremes();
PrintMemoryInfo;
#ifdef pp_PART_SPEEDUP
THREADcontrol(partload_threads, THREAD_LOCK);
plotstate=GetPlotState(DYNAMIC_PLOTS);
THREADcontrol(partload_threads, THREAD_UNLOCK);
#endif
}
return 0.0;
}
Expand Down
5 changes: 3 additions & 2 deletions Source/smokeview/IOscript.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ void InitKeywords(void){
NewMemory((void **)&keywordinfo, 1000*sizeof(keyworddata));
nkeywordinfo++;

InitKeyword("dummy", -999, 0); // dummy entry used to report errors
// 3d smoke
InitKeyword("LOAD3DSMOKE", SCRIPT_LOAD3DSMOKE, 1); // documented
InitKeyword("LOADVOLSMOKE", SCRIPT_LOADVOLSMOKE, 1); // documented
Expand Down Expand Up @@ -501,7 +502,7 @@ int CheckScript(char *file){
/* ------------------ GetScriptKeyword ------------------------ */

keyworddata *GetScriptKeyword(FILE *stream){
char *keyword, keyword_buffer[1024];
char *keyword=NULL, keyword_buffer[1024];

for(;;){
char *comment;
Expand Down Expand Up @@ -910,8 +911,8 @@ int CompileScript(char *scriptfile){
#endif
scripti->cval= GetCharPointer(param_buffer);
}
}
break;
}

// SCENECLIP
// clip mode (int)
Expand Down
2 changes: 1 addition & 1 deletion Source/smokeview/IOslice.c
Original file line number Diff line number Diff line change
Expand Up @@ -2442,7 +2442,7 @@ void UpdateVsliceMenuLabels(sliceparmdata *sp){

/* ------------------ NewMultiSlice ------------------------ */
#ifdef pp_SLICE_MENU
int NewMultiSlice(slicedata *sdold,slicedata *sd){
int NewMultiSlice(slicedata *sdold, slicedata *sd){
int i, j;

i = sdold - sliceinfo;
Expand Down
2 changes: 0 additions & 2 deletions Source/smokeview/command_args.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@ CommandlineArgs ParseCommandlineNew(int argc, char **argv, char *message,
strcpy(args.prog, argv[0]);
}
int i;
#ifdef pp_OSX_1X
#ifdef pp_OSX_HIGHRES
args.x1 = true;
args.x2 = false;
#endif
#endif
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-ini") == 0) {
Expand Down
22 changes: 17 additions & 5 deletions Source/smokeview/glui_bounds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2673,10 +2673,11 @@ GLUI_EditText *EDIT_ini=NULL;
GLUI_EditText *EDIT_renderdir=NULL;
GLUI_EditText *EDIT_rendersuffix=NULL;

GLUI_Checkbox* CHECKBOX_sortslices = NULL;
GLUI_Checkbox* CHECKBOX_sortslices_debug = NULL;
GLUI_Checkbox* CHECKBOX_visColorbarHorizontal2 = NULL;
GLUI_Checkbox* CHECKBOX_visColorbarVertical2 = NULL;
GLUI_Checkbox *CHECKBOX_sliceload_isvector = NULL;
GLUI_Checkbox *CHECKBOX_sortslices = NULL;
GLUI_Checkbox *CHECKBOX_sortslices_debug = NULL;
GLUI_Checkbox *CHECKBOX_visColorbarHorizontal2 = NULL;
GLUI_Checkbox *CHECKBOX_visColorbarVertical2 = NULL;
GLUI_Checkbox *CHECKBOX_show_boundary_outline=NULL;
GLUI_Checkbox *CHECKBOX_use_partload_threads = NULL;
GLUI_Checkbox *CHECKBOX_partfast = NULL;
Expand Down Expand Up @@ -2865,6 +2866,17 @@ int nparticleprocinfo=0;
procdata subboundprocinfo[5];
int nsubboundprocinfo=0;

#ifdef pp_LOADALL_SLICE
/* ------------------ GLUIUpdateLoadAllSlices ------------------------ */

extern "C" void GLUIUpdateLoadAllSlices(void){
if(RADIO_filetype!=NULL)RADIO_filetype->set_int_val(sliceload_filetype);
if(LISTBOX_sliceload!=NULL)LISTBOX_sliceload->set_int_val(sliceload_boundtype);
if(CHECKBOX_sliceload_isvector!=NULL)CHECKBOX_sliceload_isvector->set_int_val(sliceload_isvector);
if(RADIO_sliceload_dir!=NULL)RADIO_sliceload_dir->set_int_val(sliceload_dir);
}
#endif

/* ------------------ GLUIUpdatePartPointSize ------------------------ */

extern "C" void GLUIUpdatePartPointSize(void){
Expand Down Expand Up @@ -5146,7 +5158,7 @@ hvacductboundsCPP.setup("hvac", ROLLOUT_hvacduct, hvacductbounds_cpp, nhvacductb
}
PANEL_sliceload_option = glui_bounds->add_panel_to_panel(ROLLOUT_slice_settings, "", true);
glui_bounds->add_button_to_panel(PANEL_sliceload_option, _("Load all"), SLICE_LOADALL, SliceLoadCB);
glui_bounds->add_checkbox_to_panel(PANEL_sliceload_option, "vector slice", &sliceload_isvector);
CHECKBOX_sliceload_isvector = glui_bounds->add_checkbox_to_panel(PANEL_sliceload_option, "vector slice", &sliceload_isvector);
PANEL_slice_xyz = glui_bounds->add_panel_to_panel(PANEL_sliceload_option, "orientation", true);
RADIO_sliceload_dir = glui_bounds->add_radiogroup_to_panel(PANEL_slice_xyz, &sliceload_dir);
RADIOBUTTON_sliceload_x = glui_bounds->add_radiobutton_to_group(RADIO_sliceload_dir, "x");
Expand Down
Loading

0 comments on commit f05aa73

Please sign in to comment.