[Bf-blender-cvs] [761199ecf2d] new-object-types: Volumes: show data type in grids list
Brecht Van Lommel
noreply at git.blender.org
Thu Feb 13 18:39:58 CET 2020
Commit: 761199ecf2dc45a3146f0f85b38c512309108efc
Author: Brecht Van Lommel
Date: Thu Feb 13 16:46:14 2020 +0100
Branches: new-object-types
https://developer.blender.org/rB761199ecf2dc45a3146f0f85b38c512309108efc
Volumes: show data type in grids list
===================================================================
M release/scripts/startup/bl_ui/properties_data_volume.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_data_volume.py b/release/scripts/startup/bl_ui/properties_data_volume.py
index d84bfd0aea1..f0f394b6e2f 100644
--- a/release/scripts/startup/bl_ui/properties_data_volume.py
+++ b/release/scripts/startup/bl_ui/properties_data_volume.py
@@ -84,8 +84,15 @@ class DATA_PT_volume_file(DataButtonsPanel, Panel):
class VOLUME_UL_grids(UIList):
- def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
- layout.prop(item, "name", text="", emboss=False)
+ def draw_item(self, context, layout, data, grid, icon, active_data, active_propname, index):
+ name = grid.name
+ data_type = grid.bl_rna.properties['data_type'].enum_items[grid.data_type]
+
+ layout.label(text=name)
+ row = layout.row()
+ row.alignment = 'RIGHT'
+ row.active = False
+ row.label(text=data_type.name)
class DATA_PT_volume_grids(DataButtonsPanel, Panel):
@@ -98,7 +105,7 @@ class DATA_PT_volume_grids(DataButtonsPanel, Panel):
volume = context.volume
volume.grids.load()
- layout.template_list("VOLUME_UL_grids", "grids", volume, "grids", volume.grids, "active_index", rows=2)
+ layout.template_list("VOLUME_UL_grids", "grids", volume, "grids", volume.grids, "active_index", rows=3)
class DATA_PT_custom_props_volume(DataButtonsPanel, PropertyPanel, Panel):
More information about the Bf-blender-cvs
mailing list