diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 268f1e0fef6f176e4c4fb55e2ea6cdea85e4489c..ae36bcf15bb51a25744c76f9ba6a28a56732e9e5 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -163,6 +163,9 @@ StringXString PostProcessingOptions_String[] = { } ; StringXString ViewOptions_String[] = { + { F|O, "Attributes" , opt_view_attributes , "" , + "Optional string attributes" }, + { F|O, "AxesFormatX" , opt_view_axes_format0 , "%.3g" , "Number format for X-axis (in standard C form)" }, { F|O, "AxesFormatY" , opt_view_axes_format1 , "%.3g" , diff --git a/Common/Options.cpp b/Common/Options.cpp index 2e0c89481d62ff03df0dba3d977baa01b38308dd..bb2259f97f3166c99a0e4c9ae4006e688f50805d 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1632,6 +1632,18 @@ std::string opt_view_stipple9(OPT_ARGS_STR) #endif } +std::string opt_view_attributes(OPT_ARGS_STR) +{ +#if defined(HAVE_POST) + GET_VIEW(""); + if(action & GMSH_SET) + opt->attributes = val; + return opt->attributes; +#else + return ""; +#endif +} + // Numeric option routines double opt_general_initial_context(OPT_ARGS_NUM) diff --git a/Common/Options.h b/Common/Options.h index 7ae91f9465bb672eea62fb54e9a3872206642ba5..2d16e401e8e152c2d7ac126de8387f120d7edaf0 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -91,6 +91,7 @@ std::string opt_view_stipple6(OPT_ARGS_STR); std::string opt_view_stipple7(OPT_ARGS_STR); std::string opt_view_stipple8(OPT_ARGS_STR); std::string opt_view_stipple9(OPT_ARGS_STR); +std::string opt_view_attributes(OPT_ARGS_STR); // NUMBERS diff --git a/Post/PViewOptions.h b/Post/PViewOptions.h index d28c2c95e4536e8eea5212398269ac1be84c9a61..4a67447b276d4446ed39caea1f4046e83dc6c688 100644 --- a/Post/PViewOptions.h +++ b/Post/PViewOptions.h @@ -98,6 +98,7 @@ class PViewOptions { int clip; // status of clip planes (bit array) int forceNumComponents, componentMap[9]; int sampling; + std::string attributes; struct{ unsigned int point, line, triangle, quadrangle; unsigned int tetrahedron, hexahedron, prism, pyramid;