Skip to content

Commit

Permalink
env_texture can be second argument
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeneren committed Dec 28, 2019
1 parent 814d822 commit 8b30ba5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,13 @@ int main(const int argc, const char* argv[])
std::string fname;
if (argc >= 2) fname = argv[1];

std::string env_name;
if (argc >= 3) env_name = argv[2];


std::string file_extension = boost::filesystem::extension(fname);
std::string file_extension_env = boost::filesystem::extension(env_name);

if (file_extension == ".vdb") {

std::string file_path = ASSET_PATH;
Expand All @@ -1205,6 +1211,11 @@ int main(const int argc, const char* argv[])
env_tex_name = ASSET_PATH;
env_tex_name.append(fname);
}
if(file_extension_env == ".hdr") {
env_tex = true;
env_tex_name = ASSET_PATH;
env_tex_name.append(env_name);
}

else { // No vdb or instance file is given procede with procedural volume
log("No vdb file or an instance file is provided. Continuing with procedural volume", LOG);
Expand Down

0 comments on commit 8b30ba5

Please sign in to comment.