|
This patch frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.), which now makes lists completely independent from Panels!
This UIList has a draw_item callback which allows to customize items' drawing from python, which all addons can now use.
To make all this work, other changes were also necessary:
* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.
* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.
* UILayout class has now four new functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.
Note: Is UILayout the best place for these funcs??? Probably not, but where then? WindowManager? Or even Context itself?
* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
Note: not sure whether we should add that one to all UILayout's prop funcs?
Total comments: 7
Total comments: 9
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+979 lines, -457 lines) |
Patch |
|
|
release/scripts/modules/bpy_types.py
|
View
|
1
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
|
|
release/scripts/startup/bl_ui/__init__.py
|
View
|
1
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
|
release/scripts/startup/bl_ui/properties_data_armature.py
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
release/scripts/startup/bl_ui/properties_data_mesh.py
|
View
|
1
|
6 chunks |
+57 lines, -5 lines |
2 comments
|
Download
|
|
|
release/scripts/startup/bl_ui/properties_mask_common.py
|
View
|
1
|
2 chunks |
+20 lines, -3 lines |
1 comment
|
Download
|
|
|
release/scripts/startup/bl_ui/properties_material.py
|
View
|
1
|
3 chunks |
+22 lines, -2 lines |
0 comments
|
Download
|
|
|
release/scripts/startup/bl_ui/properties_particle.py
|
View
|
1
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
|
release/scripts/startup/bl_ui/properties_physics_common.py
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
|
View
|
1
|
2 chunks |
+25 lines, -2 lines |
0 comments
|
Download
|
|
|
release/scripts/startup/bl_ui/properties_render.py
|
View
|
1
|
3 chunks |
+20 lines, -2 lines |
0 comments
|
Download
|
|
|
release/scripts/startup/bl_ui/properties_scene.py
|
View
|
1
|
3 chunks |
+16 lines, -3 lines |
0 comments
|
Download
|
|
|
release/scripts/startup/bl_ui/properties_texture.py
|
View
|
1
|
3 chunks |
+19 lines, -2 lines |
0 comments
|
Download
|
|
|
release/scripts/startup/bl_ui/space_clip.py
|
View
|
1
|
3 chunks |
+15 lines, -4 lines |
0 comments
|
Download
|
|
|
release/scripts/startup/bl_ui/space_view3d_toolbar.py
|
View
|
1
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
|
source/blender/blenkernel/BKE_screen.h
|
View
|
1
|
2 chunks |
+18 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blender/blenloader/intern/readfile.c
|
View
|
1
|
2 chunks |
+8 lines, -1 line |
0 comments
|
Download
|
|
|
source/blender/blenloader/intern/writefile.c
|
View
|
1
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blender/editors/include/UI_interface.h
|
View
|
1
|
3 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
|
|
source/blender/editors/include/UI_interface_icons.h
|
View
|
1
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blender/editors/interface/interface_handlers.c
|
View
|
1
|
2 chunks |
+45 lines, -42 lines |
0 comments
|
Download
|
|
|
source/blender/editors/interface/interface_icons.c
|
View
|
1
|
2 chunks |
+39 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blender/editors/interface/interface_intern.h
|
View
|
1
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blender/editors/interface/interface_layout.c
|
View
|
1
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
|
|
source/blender/editors/interface/interface_templates.c
|
View
|
1
|
5 chunks |
+173 lines, -343 lines |
2 comments
|
Download
|
|
|
source/blender/editors/space_node/drawnode.c
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
|
source/blender/makesdna/DNA_screen_types.h
|
View
|
1
|
3 chunks |
+26 lines, -4 lines |
0 comments
|
Download
|
|
|
source/blender/makesrna/RNA_access.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
|
source/blender/makesrna/RNA_enum_types.h
|
View
|
1
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blender/makesrna/intern/rna_dynamicpaint.c
|
View
|
1
|
7 chunks |
+22 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blender/makesrna/intern/rna_ui.c
|
View
|
1
|
5 chunks |
+163 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blender/makesrna/intern/rna_ui_api.c
|
View
|
1
|
7 chunks |
+172 lines, -24 lines |
4 comments
|
Download
|
|
|
source/blender/python/intern/bpy_rna.c
|
View
|
1
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
|
source/blender/windowmanager/WM_api.h
|
View
|
1
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blender/windowmanager/intern/wm.c
|
View
|
1
|
1 chunk |
+57 lines, -1 line |
0 comments
|
Download
|
|
|
source/blender/windowmanager/intern/wm_init_exit.c
|
View
|
1
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
|
source/blenderplayer/bad_level_call_stubs/stubs.c
|
View
|
1
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
Total messages: 7
|