Hi there,
Is it possible to add a color to the objects in the viewport ?
This would be so helpfull for crowded scenes.
Thank you
Best regards
Marc
class OctaneMaterial_PT_settings(OctaneButtonsPanel, Panel):
bl_label = "Viewport Material Color"
bl_context = "material"
bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
return context.material and OctaneButtonsPanel.poll(context)
def draw(self, context):
layout = self.layout
mat = context.material
obj = context.object
obj_type = obj.type
split = layout.split()
col = split.column()
col.prop(obj, "draw_type", text="Type")
if obj_type == 'MESH' or (obj_type == 'EMPTY' and obj.empty_draw_type == 'IMAGE'):
col.prop(obj, "show_transparent", text="Transparency")
col = split.column()
col.prop(mat, "diffuse_color", text="")
if context.object.show_transparent:
col.prop(mat, "alpha")
Users browsing this forum: No registered users and 22 guests