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

Add system and libraries information to render log #328

Merged
merged 3 commits into from
Oct 15, 2019

Conversation

Mango-3
Copy link
Member

@Mango-3 Mango-3 commented Oct 11, 2019

The screenshot below shows a test output of the render log with the added information:
Capture

@Mango-3 Mango-3 changed the title Add system and libaries information to render log Add system and libraries information to render log Oct 11, 2019
Copy link
Member

@dictoon dictoon left a 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());
}

Copy link
Member

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.

@@ -74,7 +74,6 @@ class Texmap;

void update_map_buttons(IParamMap2* param_map);


Copy link
Member

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.

// Version information functions.
//

extern void print_libraries_information();
Copy link
Member

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());

Copy link
Member

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();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add additional blank line.

void print_libraries_features()
{
const bool WithDisneyMaterial =
#ifdef APPLESEED_WITH_DISNEY_MATERIAL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left-align preprocessor statements.

return value ? "enabled" : "disabled";
}

void print_libraries_information()
Copy link
Member

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.

asf::Compiler::get_compiler_version());
}

void print_libraries_features()
Copy link
Member

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.

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);
Copy link
Member

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.)

@Mango-3
Copy link
Member Author

Mango-3 commented Oct 14, 2019

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.

@dictoon dictoon merged commit d326e83 into appleseedhq:master Oct 15, 2019
@dictoon
Copy link
Member

dictoon commented Oct 15, 2019

@Mango-3 Mango-3 deleted the renderlog branch October 17, 2019 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants