Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

int: Rename env OIIOTOOL_METADATA_HISTORY -> OPENIMAGEIO_METADATA_HISTORY #4368

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/doc/imageioapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,10 @@ inside the source code.
take precedence. If neither is set, the default will be 0, which means
to use as many threads as there are physical cores on the machine.

``OIIOTOOL_METADATA_HISTORY``
``OPENIMAGEIO_METADATA_HISTORY``

If set to a nonzero integer value, `oiiotool` will by default write the
command line into the ImageHistory and Software metadata fields of any
If set to a nonzero integer value, `oiiotool` and `maketx` will by default
write the command line into the ImageHistory and Software metadata fields of any
images it outputs. The default if this is not set is to only write the
name and version of the software and an indecipherable hash of the command
line, but not the full human-readable command line. (This was added in
Expand Down
4 changes: 2 additions & 2 deletions src/doc/oiiotool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,7 @@ current top image.
image to potentially reveal any proprietary information that might have
been present in the command line arguments.

If the `OIIOTOOL_METADATA_HISTORY` environment variable is set to a
If the `OPENIMAGEIO_METADATA_HISTORY` environment variable is set to a
nonzero integer value, the `--history` option will be enabled by default,
but can be disabled on the command line with `--no-history`.

Expand All @@ -1993,7 +1993,7 @@ current top image.
Prior to OpenImageIO 2.5.11, the full information was always written, but
could be overridden with `--nosoftwareattrib`. Beginning with 2.5.11, the
default changed to only write the software name and version (unless the
`OIIOTOOL_METADATA_HISTORY` environment variable is set), and require the
`OPENIMAGEIO_METADATA_HISTORY` environment variable is set), and require the
new `--history` option to cause the command line arguments to be written
as metadata.

Expand Down
10 changes: 5 additions & 5 deletions src/maketx/maketx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

using namespace OIIO;

#ifndef OIIOTOOL_METADATA_HISTORY_DEFAULT
# define OIIOTOOL_METADATA_HISTORY_DEFAULT 0
#ifndef OPENIMAGEIO_METADATA_HISTORY_DEFAULT
# define OPENIMAGEIO_METADATA_HISTORY_DEFAULT 0
#endif


Expand Down Expand Up @@ -185,12 +185,12 @@ getargs(int argc, char* argv[], ImageSpec& configspec)
bool cdf = false;
float cdfsigma = 1.0f / 6;
int cdfbits = 8;
#if OIIOTOOL_METADATA_HISTORY_DEFAULT
#if OPENIMAGEIO_METADATA_HISTORY_DEFAULT
bool metadata_history = Strutil::from_string<int>(
getenv("OIIOTOOL_METADATA_HISTORY", "1"));
getenv("OPENIMAGEIO_METADATA_HISTORY", "1"));
#else
bool metadata_history = Strutil::from_string<int>(
getenv("OIIOTOOL_METADATA_HISTORY"));
getenv("OPENIMAGEIO_METADATA_HISTORY"));
#endif
std::string incolorspace;
std::string outcolorspace;
Expand Down
10 changes: 5 additions & 5 deletions src/oiiotool/oiiotool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ using pvt::print_info_options;
# define OIIO_UNIT_TESTS 1
#endif

#ifndef OIIOTOOL_METADATA_HISTORY_DEFAULT
# define OIIOTOOL_METADATA_HISTORY_DEFAULT 0
#ifndef OPENIMAGEIO_METADATA_HISTORY_DEFAULT
# define OPENIMAGEIO_METADATA_HISTORY_DEFAULT 0
#endif


Expand Down Expand Up @@ -174,12 +174,12 @@ Oiiotool::clear_options()
output_dither = false;
output_force_tiles = false;
metadata_nosoftwareattrib = false;
#if OIIOTOOL_METADATA_HISTORY_DEFAULT
#if OPENIMAGEIO_METADATA_HISTORY_DEFAULT
metadata_history = Strutil::from_string<int>(
getenv("OIIOTOOL_METADATA_HISTORY", "1"));
getenv("OPENIMAGEIO_METADATA_HISTORY", "1"));
#else
metadata_history = Strutil::from_string<int>(
getenv("OIIOTOOL_METADATA_HISTORY"));
getenv("OPENIMAGEIO_METADATA_HISTORY"));
#endif
diff_warnthresh = 1.0e-6f;
diff_warnpercent = 0;
Expand Down
Loading