UI: Smoke panels as sub-panels
Remove suffix from name since they are sub-panels now. Display Settings -> Viewport Display, and two sub-panels as well for less used settings.
This commit is contained in:
parent
fbae373db5
commit
e49f6bb208
|
@ -135,7 +135,8 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
|
|||
|
||||
|
||||
class PHYSICS_PT_smoke_flow_advanced(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Smoke Flow Advanced"
|
||||
bl_label = "Advanced"
|
||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
|
||||
|
@ -170,7 +171,8 @@ class PHYSICS_PT_smoke_flow_advanced(PhysicButtonsPanel, Panel):
|
|||
|
||||
|
||||
class PHYSICS_PT_smoke_fire(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Smoke Flames"
|
||||
bl_label = "Flames"
|
||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
|
||||
|
@ -200,7 +202,8 @@ class PHYSICS_PT_smoke_fire(PhysicButtonsPanel, Panel):
|
|||
|
||||
|
||||
class PHYSICS_PT_smoke_adaptive_domain(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Smoke Adaptive Domain"
|
||||
bl_label = "Adaptive Domain"
|
||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
|
||||
|
@ -234,7 +237,8 @@ class PHYSICS_PT_smoke_adaptive_domain(PhysicButtonsPanel, Panel):
|
|||
|
||||
|
||||
class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Smoke High Resolution"
|
||||
bl_label = "High Resolution"
|
||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
|
||||
|
@ -273,7 +277,8 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel):
|
|||
|
||||
|
||||
class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Smoke Groups"
|
||||
bl_label = "Groups"
|
||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
|
||||
|
@ -301,7 +306,8 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel):
|
|||
|
||||
|
||||
class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Smoke Cache"
|
||||
bl_label = "Cache"
|
||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
|
||||
|
@ -337,7 +343,8 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel):
|
|||
|
||||
|
||||
class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Smoke Field Weights"
|
||||
bl_label = "Field Weights"
|
||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
||||
|
||||
|
@ -351,8 +358,9 @@ class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, Panel):
|
|||
effector_weights_ui(self, context, domain.effector_weights, 'SMOKE')
|
||||
|
||||
|
||||
class PHYSICS_PT_smoke_display_settings(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Smoke Display Settings"
|
||||
class PHYSICS_PT_smoke_viewport_display(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Viewport Display"
|
||||
bl_parent_id = 'PHYSICS_PT_smoke'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
|
@ -389,22 +397,52 @@ class PHYSICS_PT_smoke_display_settings(PhysicButtonsPanel, Panel):
|
|||
row.enabled = do_full_slicing or not do_axis_slicing
|
||||
row.prop(domain, "slice_per_voxel")
|
||||
|
||||
layout.separator()
|
||||
layout.label(text="Debug:")
|
||||
|
||||
class PHYSICS_PT_smoke_viewport_display_color(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Color Mapping"
|
||||
bl_parent_id = 'PHYSICS_PT_smoke_viewport_display'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
md = context.smoke
|
||||
return md and (md.smoke_type == 'DOMAIN')
|
||||
|
||||
def draw_header(self, context):
|
||||
md = context.smoke.domain_settings
|
||||
|
||||
self.layout.prop(md, "use_color_ramp", text="")
|
||||
|
||||
def draw(self, context):
|
||||
domain = context.smoke.domain_settings
|
||||
layout = self.layout
|
||||
|
||||
col = layout.column()
|
||||
col.enabled = domain.use_color_ramp
|
||||
col.prop(domain, "coba_field")
|
||||
col.template_color_ramp(domain, "color_ramp", expand=True)
|
||||
|
||||
|
||||
class PHYSICS_PT_smoke_viewport_display_debug(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Debug"
|
||||
bl_parent_id = 'PHYSICS_PT_smoke_viewport_display'
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
md = context.smoke
|
||||
return md and (md.smoke_type == 'DOMAIN')
|
||||
|
||||
def draw(self, context):
|
||||
domain = context.smoke.domain_settings
|
||||
layout = self.layout
|
||||
|
||||
layout.prop(domain, "draw_velocity")
|
||||
col = layout.column()
|
||||
col.enabled = domain.draw_velocity
|
||||
col.prop(domain, "vector_draw_type")
|
||||
col.prop(domain, "vector_scale")
|
||||
|
||||
layout.separator()
|
||||
layout.label(text="Color Mapping:")
|
||||
layout.prop(domain, "use_color_ramp")
|
||||
col = layout.column()
|
||||
col.enabled = domain.use_color_ramp
|
||||
col.prop(domain, "coba_field")
|
||||
col.template_color_ramp(domain, "color_ramp", expand=True)
|
||||
|
||||
|
||||
classes = (
|
||||
PHYSICS_PT_smoke,
|
||||
|
@ -415,7 +453,9 @@ classes = (
|
|||
PHYSICS_PT_smoke_groups,
|
||||
PHYSICS_PT_smoke_cache,
|
||||
PHYSICS_PT_smoke_field_weights,
|
||||
PHYSICS_PT_smoke_display_settings,
|
||||
PHYSICS_PT_smoke_viewport_display,
|
||||
PHYSICS_PT_smoke_viewport_display_color,
|
||||
PHYSICS_PT_smoke_viewport_display_debug,
|
||||
)
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
|
|
Loading…
Reference in New Issue