Hi,
I try to create various topologies for reporting in the info windows, at least, i got [INFO] and [WARNING] options, green and red color background, i would like to get more options
self.report({'INFO'}, "# this is a green color report ")
maybe something like that, with a blue background…:
self.report({'DATA'}, "# information data processing ")
i tried by many ways, but i couldn t find the way, thanks
uriel
Hi,
this is what i found so far, can be used by others…
i could´nt create new class for info panel (so sad, i really dont see how !), so my solution (not elegant at all) is to write a script that modifiy the theme…
here is my code for this:
import bpy
import struct
current_theme = bpy.context.user_preferences.themes.items()[0][0]
info_newtheme = bpy.context.user_preferences.themes[current_theme].info
def hex_to_rgb(rgb_str):
int_tuple = struct.unpack('BBB', bytes.fromhex(rgb_str))
return tuple([val/255 for val in int_tuple])
# settings for new theme for Info windows aka console terminal
info_newtheme.info_debug = hex_to_rgb('88D48D')
info_newtheme.info_debug_text = hex_to_rgb('88D48D')
info_newtheme.info_error = hex_to_rgb('F33506')
info_newtheme.info_error_text = hex_to_rgb('000000')
info_newtheme.info_info = hex_to_rgb('27A5CD')
info_newtheme.info_info_text = hex_to_rgb('000000')
info_newtheme.info_warning = hex_to_rgb('FFAF50')
info_newtheme.info_warning_text = hex_to_rgb('FFAF50')
info_newtheme.info_selected = hex_to_rgb('27A5CD')
info_newtheme.info_selected_text = hex_to_rgb('000000')
# change background color and normal text debug
info_newtheme.space.back = hex_to_rgb('FFFFFF')
info_newtheme.space.text = hex_to_rgb('666666')
If there is a way you know to create other types, please, let me know, i really want to use more the info window for printing debug infos with multiples styles… thanks
enjoy