-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add system and libraries information to render log #328
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
This is a good first step as it addresses the issue. In a second step (and separate PR), it would be nice to expose and reuse the code from appleseed.shared to avoid code duplication and, inevitably, code getting out of sync.
print_third_party_libraries_information(); | ||
asf::System::print_information(asr::global_logger()); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep a single blank line.
src/appleseed-max-impl/utilities.h
Outdated
@@ -74,7 +74,6 @@ class Texmap; | |||
|
|||
void update_map_buttons(IParamMap2* param_map); | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert, we use two blank lines before block comments.
src/appleseed-max-impl/utilities.h
Outdated
// Version information functions. | ||
// | ||
|
||
extern void print_libraries_information(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extern
qualifiers are redundant, you can remove them.
@@ -129,6 +128,17 @@ std::string insert_procedural_texture_and_instance( | |||
renderer::ParamArray texture_params = renderer::ParamArray(), | |||
renderer::ParamArray texture_instance_params = renderer::ParamArray()); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add additional blank line.
|
||
extern const char* to_enabled_disabled(const bool value); | ||
|
||
extern void print_third_party_libraries_information(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add additional blank line.
src/appleseed-max-impl/utilities.cpp
Outdated
void print_libraries_features() | ||
{ | ||
const bool WithDisneyMaterial = | ||
#ifdef APPLESEED_WITH_DISNEY_MATERIAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left-align preprocessor statements.
src/appleseed-max-impl/utilities.cpp
Outdated
return value ? "enabled" : "disabled"; | ||
} | ||
|
||
void print_libraries_information() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print_appleseed_library_information()
would be clearer.
src/appleseed-max-impl/utilities.cpp
Outdated
asf::Compiler::get_compiler_version()); | ||
} | ||
|
||
void print_libraries_features() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, print_appleseed_library_features()
here.
src/appleseed-max-impl/utilities.cpp
Outdated
const asf::APIStringPair& version = versions[i]; | ||
const char* lib_name = version.m_first.c_str(); | ||
const char* lib_version = version.m_second.c_str(); | ||
const size_t lib_name_length = strlen(lib_name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::strlen()
(And yes, the std::
qualifier is missing on appleseed's side.)
Addressed your comments. True code exposed from appleseed.shared would be available to all plugins and is the better option long-term. This can be refactored at a later point. |
Follow-up tickets: |
The screenshot below shows a test output of the render log with the added information: