Browse Source

Add icons for decals.

pull/172/head
Adam Johnson 5 years ago
parent
commit
1e3855790e
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 6
      korman/ui/modifiers/render.py
  2. 4
      korman/ui/ui_scene.py

6
korman/ui/modifiers/render.py

@ -21,7 +21,7 @@ from ...exporter.mesh import _VERTEX_COLOR_LAYERS
class DecalMgrListUI(bpy.types.UIList): class DecalMgrListUI(bpy.types.UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_property, index=0, flt_flag=0): def draw_item(self, context, layout, data, item, icon, active_data, active_property, index=0, flt_flag=0):
if item.name: if item.name:
layout.label(item.name) layout.label(item.name, icon="BRUSH_DATA")
layout.prop(item, "enabled", text="") layout.prop(item, "enabled", text="")
else: else:
layout.label("[Empty]") layout.label("[Empty]")
@ -50,7 +50,7 @@ def decal_print(modifier, layout, context):
decal_mgr = next((i for i in scene.decal_managers if i.display_name == mgr_ref), None) decal_mgr = next((i for i in scene.decal_managers if i.display_name == mgr_ref), None)
layout.alert = decal_mgr is None layout.alert = decal_mgr is None
layout.prop_search(mgr_ref, "name", scene, "decal_managers", icon="NONE") layout.prop_search(mgr_ref, "name", scene, "decal_managers", icon="BRUSH_DATA")
layout.alert = False layout.alert = False
def decal_receive(modifier, layout, context): def decal_receive(modifier, layout, context):
@ -65,7 +65,7 @@ def decal_receive(modifier, layout, context):
decal_mgr = next((i for i in scene.decal_managers if i.display_name == mgr_ref), None) decal_mgr = next((i for i in scene.decal_managers if i.display_name == mgr_ref), None)
layout.alert = decal_mgr is None layout.alert = decal_mgr is None
layout.prop_search(mgr_ref, "name", scene, "decal_managers", icon="NONE") layout.prop_search(mgr_ref, "name", scene, "decal_managers", icon="BRUSH_DATA")
def fademod(modifier, layout, context): def fademod(modifier, layout, context):
layout.prop(modifier, "fader_type") layout.prop(modifier, "fader_type")

4
korman/ui/ui_scene.py

@ -29,13 +29,13 @@ class SceneButtonsPanel:
class DecalManagerListUI(bpy.types.UIList): class DecalManagerListUI(bpy.types.UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_property, index=0, flt_flag=0): def draw_item(self, context, layout, data, item, icon, active_data, active_property, index=0, flt_flag=0):
layout.prop(item, "display_name", emboss=False, text="") layout.prop(item, "display_name", emboss=False, text="", icon="BRUSH_DATA")
class WetManagerListUI(bpy.types.UIList): class WetManagerListUI(bpy.types.UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_property, index=0, flt_flag=0): def draw_item(self, context, layout, data, item, icon, active_data, active_property, index=0, flt_flag=0):
if item.name: if item.name:
layout.label(item.name) layout.label(item.name, icon="BRUSH_DATA")
layout.prop(item, "enabled", text="") layout.prop(item, "enabled", text="")
else: else:
layout.label("[Empty]") layout.label("[Empty]")

Loading…
Cancel
Save