adds color source

This commit is contained in:
Michel Fedde 2024-01-30 21:22:33 +01:00
parent c0ab4bb7ad
commit 6fbf07b96c
10 changed files with 78 additions and 20 deletions

View file

@ -21,4 +21,4 @@ class BakeToIDAdvancedMenu(bpy.types.Panel):
layout.prop(props, "adv_total_satuations")
layout.prop(props, "adv_total_brightnesses")
layout.label(text="Max ID-count: " + str(
math.pow(math.pow(props.adv_total_hues, props.adv_total_satuations), props.adv_total_brightnesses)))
))

View file

@ -1,5 +1,6 @@
import bpy
from ..types.colors import get_color
from .. types.sources import get_source
@ -20,7 +21,6 @@ class BakeToIDInfoPanel(bpy.types.Panel):
if props.selection_mode != 'SINGLE':
layout.label(text="Selected Object-Count: " + str(len(context.selected_objects)))
layout.separator()
if props.selection_mode == 'SINGLE':
layout.label(text="ID-Total: " + str(source.estimate_ids([context.active_object])))
@ -42,4 +42,8 @@ class BakeToIDInfoPanel(bpy.types.Panel):
layout.label(text="Estimated ID-Average: 0")
if props.selection_mode == 'MULTIPLE_COMBINED':
layout.label(text="ID-Total: " + str(source.estimate_ids(context.selected_objects)))
layout.label(text="ID-Total: " + str(source.estimate_ids(context.selected_objects)))
color = get_color(props.colors)
layout.label(text="Colors available: " + str(color.get_count(props)))

View file

@ -37,3 +37,7 @@ class BakeToIDOptionsPanel(bpy.types.Panel):
target_settings_box = layout.box()
for setting in target.connected_properties:
target_settings_box.prop(props, setting)
layout.separator()
layout.prop(props, "colors")