diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-10-14 13:08:53 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-10-14 13:08:53 +0400 |
commit | 1ef163f1e0dd1c535c3c9b81670333f02c45b236 (patch) | |
tree | 7712db76cbd30debb515ce4ab70d028197d55b93 /source/blender/makesrna/intern/rna_ID.c | |
parent | daebfaaa49186886af5bef2b579baed7c4c6e93f (diff) |
UI Templates: ('Any ID' Selector)
Added new template for choosing to use any type of ID-block. The first combo box allows you to choose the type of ID-block that gets used, and the second box allows you to choose the ID-block of the type specified by the first one.
This is currently used for setting the ID-block used for Keying Sets, but the main user for this was intended to be the Drivers UI. However, I still need to clear up a few button-event issues there before I can port this over.
Additional Bugfixes:
* Adding new Keying Set path was setting the active path wrong, meaning that you had to click on the list to get some response after adding
* Bone Groups list was being drawn too long by default (when empty)
Diffstat (limited to 'source/blender/makesrna/intern/rna_ID.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 8ab5a1442c7..c52021b3a49 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -33,6 +33,38 @@ #include "rna_internal.h" +/* enum of ID-block types + * NOTE: need to keep this in line with the other defines for these + */ +EnumPropertyItem id_type_items[] = { + {ID_AC, "ACTION", ICON_ACTION, "Action", ""}, + {ID_AR, "ARMATURE", ICON_ARMATURE_DATA, "Armature", ""}, + {ID_BR, "BRUSH", ICON_BRUSH_DATA, "Brush", ""}, + {ID_CA, "CAMERA", ICON_CAMERA_DATA, "Camera", ""}, + {ID_CU, "CURVE", ICON_CURVE_DATA, "Curve", ""}, + {ID_VF, "FONT", ICON_FONT_DATA, "Font", ""}, + {ID_GD, "GREASEPENCIL", ICON_GREASEPENCIL, "Grease Pencil", ""}, + {ID_GR, "GROUP", ICON_GROUP, "Group", ""}, + {ID_IM, "IMAGE", ICON_IMAGE_DATA, "Image", ""}, + {ID_KE, "KEY", ICON_SHAPEKEY_DATA, "Key", ""}, + {ID_LA, "LAMP", ICON_LAMP_DATA, "Lamp", ""}, + {ID_LI, "LIBRARY", 0, "Library", ""}, + {ID_LT, "LATTICE", ICON_LATTICE_DATA, "Lattice", ""}, + {ID_MA, "MATERIAL", ICON_MATERIAL_DATA, "Material", ""}, + {ID_MB, "META", ICON_META_DATA, "MetaBall", ""}, + {ID_ME, "MESH", ICON_MESH_DATA, "Mesh", ""}, + {ID_NT, "NODETREE", 0, "NodeTree", ""}, + {ID_OB, "OBJECT", ICON_OBJECT_DATA, "Object", ""}, + {ID_PA, "PARTICLE", ICON_PARTICLE_DATA, "Particle", ""}, + {ID_SCE, "SCENE", ICON_SCENE_DATA, "Scene", ""}, + {ID_SCR, "SCREEN", 0, "Screen", ""}, + {ID_SO, "SOUND", 0, "Sound", ""}, + {ID_TXT, "TEXT", ICON_TEXT, "Text", ""}, + {ID_TE, "TEXTURE", ICON_TEXTURE_DATA, "Texture", ""}, + {ID_WO, "WORLD", ICON_WORLD_DATA, "World", ""}, + {ID_WM, "WINDOWMANAGER", 0, "Window Manager", ""}, + {0, NULL, 0, NULL, NULL}}; + #ifdef RNA_RUNTIME #include "BKE_idprop.h" |