UI: preset popover buttons in panel headers.
Moves the preset into a menu for the panel header, so it can be changed without opening the panel and takes up less space. Two remaining issues: * For long lists the add new preset button can be scrolled off screen. * We should support showing the name of the chosen preset in the panel header, but the current preset system does not support detecting which preset is used. Differential Revision: https://developer.blender.org/D3366
This commit is contained in:
@@ -22,14 +22,6 @@ from bpy.types import Menu, Panel
|
||||
from rna_prop_ui import PropertyPanel
|
||||
|
||||
|
||||
class LAMP_MT_sunsky_presets(Menu):
|
||||
bl_label = "Sun & Sky Presets"
|
||||
preset_subdir = "sunsky"
|
||||
preset_operator = "script.execute_preset"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
draw = Menu.draw_preset
|
||||
|
||||
|
||||
class DataButtonsPanel:
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
@@ -352,7 +344,6 @@ class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel, Panel):
|
||||
|
||||
|
||||
classes = (
|
||||
LAMP_MT_sunsky_presets,
|
||||
DATA_PT_context_lamp,
|
||||
DATA_PT_preview,
|
||||
DATA_PT_lamp,
|
||||
|
||||
Reference in New Issue
Block a user