mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
CLOG: Add getter to know if output supports coloring
This commit is contained in:
parent
b37c40a575
commit
e856443c99
2 changed files with 10 additions and 0 deletions
|
|
@ -150,6 +150,8 @@ void CLG_level_set(int level);
|
|||
|
||||
void CLG_logref_init(CLG_LogRef *clg_ref);
|
||||
|
||||
int CLG_color_support_get(CLG_LogRef *clg_ref);
|
||||
|
||||
/** Declare outside function, declare as extern in header. */
|
||||
#define CLG_LOGREF_DECLARE_GLOBAL(var, id) \
|
||||
static CLG_LogRef _static_##var = {id}; \
|
||||
|
|
|
|||
|
|
@ -755,4 +755,12 @@ void CLG_logref_init(CLG_LogRef *clg_ref)
|
|||
#endif
|
||||
}
|
||||
|
||||
int CLG_color_support_get(CLG_LogRef *clg_ref)
|
||||
{
|
||||
if (clg_ref->type == NULL) {
|
||||
CLG_logref_init(clg_ref);
|
||||
}
|
||||
return clg_ref->type->ctx->use_color;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue