Skip to content

Commit

Permalink
Merge pull request #901 from gforney/master
Browse files Browse the repository at this point in the history
add ini parameter for touring avatar visibility
  • Loading branch information
gforney committed Nov 30, 2019
2 parents 543f010 + 4a8d50e commit 3616d2d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Source/smokeview/IOscript.c
Expand Up @@ -2257,7 +2257,7 @@ void ScriptSetTourKeyFrame(scriptdata *scripti){

void ScriptSetTourView(scriptdata *scripti){
edittour=scripti->ival;
show_tourlocus=scripti->ival3;
show_avatar =scripti->ival3;
tour_global_tension_flag=1;
tour_global_tension=scripti->fval;
switch(scripti->ival2){
Expand Down
4 changes: 2 additions & 2 deletions Source/smokeview/IOtour.c
Expand Up @@ -329,9 +329,9 @@ void DrawTours(void){

/* keyframe avatar */

//show_tourlocus=1;
//show_avatar=1;
//tourlocus_type=2;
if(show_tourlocus==1){
if(show_avatar==1){
switch(tourlocus_type){
case 0:
AntiAliasLine(ON);
Expand Down
2 changes: 1 addition & 1 deletion Source/smokeview/glui_tour.cpp
Expand Up @@ -237,7 +237,7 @@ extern "C" void GluiTourSetup(int main_window){
glui_tour->add_checkbox_to_panel(PANEL_misc, _("Anti-alias tour path line"), &tour_antialias);
#endif
if(navatar_types > 0){
glui_tour->add_checkbox_to_panel(PANEL_misc, _("Show avatar"), &show_tourlocus);
glui_tour->add_checkbox_to_panel(PANEL_misc, _("Show avatar"), &show_avatar);
LISTBOX_avatar = glui_tour->add_listbox_to_panel(PANEL_misc, _("Avatar:"), &glui_avatar_index, TOUR_AVATAR, TourCB);
for(i = 0;i < navatar_types;i++){
LISTBOX_avatar->add_item(i, avatar_types[i]->label);
Expand Down
8 changes: 8 additions & 0 deletions Source/smokeview/readsmv.c
Expand Up @@ -9655,6 +9655,12 @@ int ReadIni2(char *inifile, int localfile){
sscanf(buffer, " %f %f %f", northangle_position, northangle_position + 1, northangle_position + 2);
continue;
}
if(Match(buffer, "SHOWAVATAR")==1){
fgets(buffer, 255, stream);
sscanf(buffer, " %i", &show_avatar);
ONEORZERO(show_avatar);
continue;
}
if(Match(buffer, "TREEPARMS") == 1){
fgets(buffer, 255, stream);
sscanf(buffer, "%i %i %i %i", &mintreesize, &vis_xtree, &vis_ytree, &vis_ztree);
Expand Down Expand Up @@ -13899,6 +13905,8 @@ void WriteIni(int flag,char *filename){

fprintf(fileout,"\n *** TOUR INFO ***\n\n");

fprintf(fileout, "SHOWAVATAR\n");
fprintf(fileout, " %i\n", show_avatar);
fprintf(fileout, "SHOWPATHNODES\n");
fprintf(fileout, " %i\n", show_path_knots);
fprintf(fileout, "SHOWTOURROUTE\n");
Expand Down
2 changes: 1 addition & 1 deletion Source/smokeview/smokeviewvars.h
Expand Up @@ -1619,7 +1619,7 @@ SVEXTERN int ntotal_blockages;
SVEXTERN int updateindexcolors;
SVEXTERN int show_path_knots;
SVEXTERN int keyframe_snap;
SVEXTERN int SVDECL(show_tourlocus,1);
SVEXTERN int SVDECL(show_avatar,1);
SVEXTERN int SVDECL(tourlocus_type,0);
SVEXTERN int iavatar_types, navatar_types;
SVEXTERN int iavatar_evac;
Expand Down
13 changes: 8 additions & 5 deletions Verification/WUI/wind_test1.ini
@@ -1,4 +1,4 @@
# NIST Smokeview configuration file, Release Nov 7 2019
# NIST Smokeview configuration file, Release Nov 29 2019


------------ global ini settings ------------
Expand Down Expand Up @@ -180,7 +180,7 @@ NOPART
PARTFAST
0 0 4
RESEARCHMODE
1
1 1
SHOWFEDAREA
1
SLICEAVERAGE
Expand Down Expand Up @@ -493,6 +493,8 @@ SHOWZONEFIRE

*** TOUR INFO ***

SHOWAVATAR
0
SHOWPATHNODES
0
SHOWTOURROUTE
Expand Down Expand Up @@ -573,7 +575,7 @@ TOURS
0.0 -1.0 -1.0 100.0 0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0
86400.0 201.0 201.0 100.0 0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0
USERTICKS
0 1 5 1 1 1 1.000000
0 1 5 1 1 1 1.000000 1
0.000000 0.000000 0.000000
0.000000 0.000000 0.000000
200.000000 200.000000 200.000000
Expand Down Expand Up @@ -625,8 +627,9 @@ V_TARGET
# FDS/Smokeview Environment
# -------------------------

# Smokeview Build: SMV6.7.10-0-g8f828eb
# Smokeview Build Date: Nov 7 2019
# Smokeview Version: Test
# Smokeview Build: SMV6.7.11-97-gaf1edd7-master
# Smokeview Build Date: Nov 29 2019
# FDS Version: FDS6.7.3-207-gdd9498a-test
# FDS Build: unknown
# Platform: WIN64
Expand Down

0 comments on commit 3616d2d

Please sign in to comment.