Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_templates.c
| Show First 20 Lines • Show All 387 Lines • ▼ Show 20 Lines | static void template_ID( | ||||
| const bool editable = RNA_property_editable(&template->ptr, template->prop); | const bool editable = RNA_property_editable(&template->ptr, template->prop); | ||||
| idptr = RNA_property_pointer_get(&template->ptr, template->prop); | idptr = RNA_property_pointer_get(&template->ptr, template->prop); | ||||
| id = idptr.data; | id = idptr.data; | ||||
| idfrom = template->ptr.id.data; | idfrom = template->ptr.id.data; | ||||
| // lb = template->idlb; | // lb = template->idlb; | ||||
| block = uiLayoutGetBlock(layout); | block = uiLayoutGetBlock(layout); | ||||
| UI_block_align_begin(block); | // UI_block_align_begin(block); | ||||
| if (idptr.type) | if (idptr.type) | ||||
| type = idptr.type; | type = idptr.type; | ||||
| if (flag & UI_ID_PREVIEWS) { | if (flag & UI_ID_PREVIEWS) { | ||||
| template->preview = true; | template->preview = true; | ||||
| but = uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X * 6, UI_UNIT_Y * 6, | but = uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X * 6, UI_UNIT_Y * 6, | ||||
| ▲ Show 20 Lines • Show All 179 Lines • ▼ Show 20 Lines | if (but) { | ||||
| if ((idfrom && idfrom->lib) || !editable) { | if ((idfrom && idfrom->lib) || !editable) { | ||||
| UI_but_flag_enable(but, UI_BUT_DISABLED); | UI_but_flag_enable(but, UI_BUT_DISABLED); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (idcode == ID_TE) | if (idcode == ID_TE) | ||||
| uiTemplateTextureShow(layout, C, &template->ptr, template->prop); | uiTemplateTextureShow(layout, C, &template->ptr, template->prop); | ||||
| UI_block_align_end(block); | // UI_block_align_end(block); | ||||
| } | } | ||||
| static void ui_template_id( | static void ui_template_id( | ||||
| uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, const char *newop, | uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, const char *newop, | ||||
| const char *openop, const char *unlinkop, int flag, int prv_rows, int prv_cols) | const char *openop, const char *unlinkop, int flag, int prv_rows, int prv_cols) | ||||
| { | { | ||||
| TemplateID *template; | TemplateID *template; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| ▲ Show 20 Lines • Show All 3,120 Lines • Show Last 20 Lines | |||||