Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_image/image_buttons.c
| Show First 20 Lines • Show All 942 Lines • ▼ Show 20 Lines | if (ima && iuser) { | ||||
| uiblock_layer_pass_buttons(layout, rr, iuser, 160 * dpi_fac, (ima->type == IMA_TYPE_R_RESULT) ? &ima->render_slot : NULL); | uiblock_layer_pass_buttons(layout, rr, iuser, 160 * dpi_fac, (ima->type == IMA_TYPE_R_RESULT) ? &ima->render_slot : NULL); | ||||
| BKE_image_release_renderresult(scene, ima); | BKE_image_release_renderresult(scene, ima); | ||||
| } | } | ||||
| } | } | ||||
| void image_buttons_register(ARegionType *art) | void image_buttons_register(ARegionType *art) | ||||
| { | { | ||||
| PanelType *pt; | PanelType *pt; | ||||
| const char *category = "Grease Pencil"; | |||||
| pt = MEM_callocN(sizeof(PanelType), "spacetype image panel gpencil"); | pt = MEM_callocN(sizeof(PanelType), "spacetype image panel gpencil"); | ||||
| strcpy(pt->idname, "IMAGE_PT_gpencil"); | strcpy(pt->idname, "IMAGE_PT_gpencil"); | ||||
| strcpy(pt->label, N_("Grease Pencil")); | strcpy(pt->label, N_("Grease Pencil")); | ||||
| strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); | strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); | ||||
| pt->draw_header = gpencil_panel_standard_header; | pt->draw_header = gpencil_panel_standard_header; | ||||
| pt->draw = gpencil_panel_standard; | pt->draw = gpencil_panel_standard; | ||||
| BLI_strncpy(pt->category, category, BLI_strlen_utf8(category)); | |||||
| BLI_addtail(&art->paneltypes, pt); | BLI_addtail(&art->paneltypes, pt); | ||||
| } | } | ||||
| static int image_properties_toggle_exec(bContext *C, wmOperator *UNUSED(op)) | static int image_properties_toggle_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| { | { | ||||
| ScrArea *sa = CTX_wm_area(C); | ScrArea *sa = CTX_wm_area(C); | ||||
| ARegion *ar = image_has_buttons_region(sa); | ARegion *ar = image_has_buttons_region(sa); | ||||
| ▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines | |||||