Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_ID.c
| Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | EnumPropertyItem rna_enum_id_type_items[] = { | ||||
| {ID_SCE, "SCENE", ICON_SCENE_DATA, "Scene", ""}, | {ID_SCE, "SCENE", ICON_SCENE_DATA, "Scene", ""}, | ||||
| {ID_SCR, "SCREEN", ICON_SPLITSCREEN, "Screen", ""}, | {ID_SCR, "SCREEN", ICON_SPLITSCREEN, "Screen", ""}, | ||||
| {ID_SO, "SOUND", ICON_PLAY_AUDIO, "Sound", ""}, | {ID_SO, "SOUND", ICON_PLAY_AUDIO, "Sound", ""}, | ||||
| {ID_SPK, "SPEAKER", ICON_SPEAKER, "Speaker", ""}, | {ID_SPK, "SPEAKER", ICON_SPEAKER, "Speaker", ""}, | ||||
| {ID_TXT, "TEXT", ICON_TEXT, "Text", ""}, | {ID_TXT, "TEXT", ICON_TEXT, "Text", ""}, | ||||
| {ID_TE, "TEXTURE", ICON_TEXTURE_DATA, "Texture", ""}, | {ID_TE, "TEXTURE", ICON_TEXTURE_DATA, "Texture", ""}, | ||||
| {ID_WM, "WINDOWMANAGER", ICON_FULLSCREEN, "Window Manager", ""}, | {ID_WM, "WINDOWMANAGER", ICON_FULLSCREEN, "Window Manager", ""}, | ||||
| {ID_WO, "WORLD", ICON_WORLD_DATA, "World", ""}, | {ID_WO, "WORLD", ICON_WORLD_DATA, "World", ""}, | ||||
| {ID_WS, "WORKSPACE", ICON_NONE, "Workspace", ""}, | |||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| #ifdef RNA_RUNTIME | #ifdef RNA_RUNTIME | ||||
| #include "DNA_anim_types.h" | #include "DNA_anim_types.h" | ||||
| #include "BLI_listbase.h" | #include "BLI_listbase.h" | ||||
| ▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | short RNA_type_to_ID_code(StructRNA *type) | ||||
| if (RNA_struct_is_a(type, &RNA_PaintCurve)) return ID_PC; | if (RNA_struct_is_a(type, &RNA_PaintCurve)) return ID_PC; | ||||
| if (RNA_struct_is_a(type, &RNA_Scene)) return ID_SCE; | if (RNA_struct_is_a(type, &RNA_Scene)) return ID_SCE; | ||||
| if (RNA_struct_is_a(type, &RNA_Screen)) return ID_SCR; | if (RNA_struct_is_a(type, &RNA_Screen)) return ID_SCR; | ||||
| if (RNA_struct_is_a(type, &RNA_Sound)) return ID_SO; | if (RNA_struct_is_a(type, &RNA_Sound)) return ID_SO; | ||||
| if (RNA_struct_is_a(type, &RNA_Speaker)) return ID_SPK; | if (RNA_struct_is_a(type, &RNA_Speaker)) return ID_SPK; | ||||
| if (RNA_struct_is_a(type, &RNA_Texture)) return ID_TE; | if (RNA_struct_is_a(type, &RNA_Texture)) return ID_TE; | ||||
| if (RNA_struct_is_a(type, &RNA_Text)) return ID_TXT; | if (RNA_struct_is_a(type, &RNA_Text)) return ID_TXT; | ||||
| if (RNA_struct_is_a(type, &RNA_VectorFont)) return ID_VF; | if (RNA_struct_is_a(type, &RNA_VectorFont)) return ID_VF; | ||||
| if (RNA_struct_is_a(type, &RNA_WorkSpace)) return ID_WS; | |||||
| if (RNA_struct_is_a(type, &RNA_World)) return ID_WO; | if (RNA_struct_is_a(type, &RNA_World)) return ID_WO; | ||||
| if (RNA_struct_is_a(type, &RNA_WindowManager)) return ID_WM; | if (RNA_struct_is_a(type, &RNA_WindowManager)) return ID_WM; | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| StructRNA *ID_code_to_RNA_type(short idcode) | StructRNA *ID_code_to_RNA_type(short idcode) | ||||
| { | { | ||||
| Show All 26 Lines | switch (idcode) { | ||||
| case ID_SCR: return &RNA_Screen; | case ID_SCR: return &RNA_Screen; | ||||
| case ID_SO: return &RNA_Sound; | case ID_SO: return &RNA_Sound; | ||||
| case ID_SPK: return &RNA_Speaker; | case ID_SPK: return &RNA_Speaker; | ||||
| case ID_TE: return &RNA_Texture; | case ID_TE: return &RNA_Texture; | ||||
| case ID_TXT: return &RNA_Text; | case ID_TXT: return &RNA_Text; | ||||
| case ID_VF: return &RNA_VectorFont; | case ID_VF: return &RNA_VectorFont; | ||||
| case ID_WM: return &RNA_WindowManager; | case ID_WM: return &RNA_WindowManager; | ||||
| case ID_WO: return &RNA_World; | case ID_WO: return &RNA_World; | ||||
| case ID_WS: return &RNA_WorkSpace; | |||||
| default: return &RNA_ID; | default: return &RNA_ID; | ||||
| } | } | ||||
| } | } | ||||
| StructRNA *rna_ID_refine(PointerRNA *ptr) | StructRNA *rna_ID_refine(PointerRNA *ptr) | ||||
| { | { | ||||
| ID *id = (ID *)ptr->data; | ID *id = (ID *)ptr->data; | ||||
| ▲ Show 20 Lines • Show All 884 Lines • Show Last 20 Lines | |||||