Blender
V3.3
|
#include <stdio.h>
#include <string.h>
#include "DNA_node_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "BKE_context.h"
#include "BKE_image.h"
#include "BKE_image_format.h"
#include "BKE_node.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "RE_pipeline.h"
#include "IMB_colormanagement.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "ED_gpencil.h"
#include "ED_image.h"
#include "ED_screen.h"
#include "RNA_access.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "image_intern.h"
Go to the source code of this file.
Classes | |
struct | ImageUI_Data |
struct | RNAUpdateCb |
Macros | |
#define | B_NOP -1 |
#define | MAX_IMAGE_INFO_LEN 128 |
Typedefs | |
typedef struct RNAUpdateCb | RNAUpdateCb |
#define B_NOP -1 |
Definition at line 48 of file image_buttons.c.
#define MAX_IMAGE_INFO_LEN 128 |
Definition at line 49 of file image_buttons.c.
typedef struct RNAUpdateCb RNAUpdateCb |
void image_buttons_register | ( | ARegionType * | art | ) |
Definition at line 1273 of file image_buttons.c.
References BLI_addtail(), BLT_I18NCONTEXT_DEFAULT_BPYRNA, PanelType::category, PanelType::draw, PanelType::flag, PanelType::idname, PanelType::label, MEM_callocN, metadata_panel_context_draw(), metadata_panel_context_poll(), N_, PanelType::order, PANEL_TYPE_DEFAULT_CLOSED, ARegionType::paneltypes, PanelType::poll, and PanelType::translation_context.
Referenced by ED_spacetype_image().
Definition at line 409 of file image_buttons.c.
References BKE_image_multilayer_index(), C, ImageUI_Data::iuser, NC_IMAGE, ND_DRAW, NULL, and WM_event_add_notifier().
Referenced by uiblock_layer_pass_buttons().
Definition at line 543 of file image_buttons.c.
References BKE_image_multiview_index(), C, ImageUI_Data::image, ImageUI_Data::iuser, NC_IMAGE, ND_DRAW, NULL, and WM_event_add_notifier().
Referenced by uiblock_layer_pass_buttons().
Definition at line 1261 of file image_buttons.c.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), C, CTX_wm_space_image(), ED_region_image_metadata_panel_draw(), image(), SpaceImage::image, SpaceImage::iuser, Panel::layout, lock, and NULL.
Referenced by image_buttons_register().
Definition at line 1255 of file image_buttons.c.
References C, CTX_wm_space_image(), SpaceImage::image, and NULL.
Referenced by image_buttons_register().
Gets active viewer user.
Definition at line 51 of file image_buttons.c.
References CMP_NODE_SPLITVIEWER, CMP_NODE_VIEWER, ELEM, ListBase::first, node, NODE_DO_OUTPUT, bNodeTree::nodes, ntree, and NULL.
Definition at line 712 of file image_buttons.c.
References C, RNAUpdateCb::prop, RNAUpdateCb::ptr, and RNA_property_update().
Referenced by uiTemplateImage().
|
static |
Definition at line 146 of file image_buttons.c.
References MEM_mallocN.
Referenced by uiblock_layer_pass_buttons().
|
static |
Definition at line 127 of file image_buttons.c.
References IFACE_, NULL, RE_RenderViewGetById(), RenderView::rect32, and RenderView::rectf.
Referenced by ui_imageuser_layer_menu(), and uiblock_layer_pass_buttons().
Definition at line 153 of file image_buttons.c.
References B_NOP, BKE_image_acquire_renderresult(), BKE_image_release_renderresult(), ListBase::first, IFACE_, image(), ImageUI_Data::image, ImageUI_Data::iuser, ImageUser::layer, RenderResult::layers, NULL, scene, ImageUser::scene, UI_block_layout_set_current(), UI_BTYPE_BUT_MENU, UI_BTYPE_LABEL, ui_imageuser_layer_fake_name(), UI_UNIT_X, UI_UNIT_Y, uiDefBut(), uiDefButS(), uiItemS(), uiLayoutColumn(), uiLayoutGetBlock(), and UNLIKELY.
Referenced by uiblock_layer_pass_buttons().
Definition at line 418 of file image_buttons.c.
References BKE_image_acquire_renderresult(), BKE_image_multilayer_index(), BKE_image_release_renderresult(), BLI_assert, BLI_listbase_count(), C, CTX_data_scene(), image(), ImageUI_Data::image, ImageUI_Data::iuser, ImageUser::layer, RenderResult::layers, NC_IMAGE, ND_DRAW, NULL, RE_HasCombinedLayer(), scene, UNLIKELY, and WM_event_add_notifier().
Referenced by uiblock_layer_pass_buttons().
Definition at line 225 of file image_buttons.c.
References B_NOP, BKE_image_acquire_renderresult(), BKE_image_release_renderresult(), BLI_addtail(), BLI_findlink(), BLI_findstring_ptr(), BLI_freelistN(), BLI_genericNodeN(), BLI_listbase_clear(), data, ListBase::first, IFACE_, image(), ImageUI_Data::image, ImageUI_Data::iuser, RenderResult::layers, RenderPass::name, RenderPass::next, NULL, ImageUser::pass, RenderLayer::passes, ImageUI_Data::rpass_index, scene, ImageUser::scene, UI_block_layout_set_current(), UI_BTYPE_BUT_MENU, UI_BTYPE_LABEL, UI_UNIT_X, UI_UNIT_Y, uiDefBut(), uiDefButS(), uiItemS(), uiLayoutColumn(), uiLayoutGetBlock(), and UNLIKELY.
Referenced by uiblock_layer_pass_buttons().
Definition at line 464 of file image_buttons.c.
References BKE_image_acquire_renderresult(), BKE_image_multilayer_index(), BKE_image_release_renderresult(), BLI_assert, BLI_findlink(), C, CTX_data_scene(), ListBase::first, image(), ImageUI_Data::image, ImageUI_Data::iuser, ImageUser::layer, RenderResult::layers, RenderPass::name, NC_IMAGE, ND_DRAW, RenderPass::next, NULL, ImageUser::pass, RenderLayer::passes, RE_HasCombinedLayer(), scene, STREQ, UNLIKELY, and WM_event_add_notifier().
Referenced by uiblock_layer_pass_buttons().
Definition at line 69 of file image_buttons.c.
References B_NOP, BLI_snprintf(), BLI_strncpy(), IFACE_, image(), LISTBASE_FOREACH_INDEX, NULL, str, UI_BTYPE_BUT_MENU, UI_BTYPE_LABEL, UI_UNIT_X, UI_UNIT_Y, uiDefBut(), uiDefButS(), uiItemS(), and uiLayoutGetBlock().
Referenced by uiblock_layer_pass_buttons().
Definition at line 116 of file image_buttons.c.
References C, ED_image_slot_cycle(), image(), NC_IMAGE, ND_DRAW, NULL, and WM_event_add_notifier().
Referenced by uiblock_layer_pass_buttons().
|
static |
Definition at line 360 of file image_buttons.c.
References B_NOP, BLI_listbase_count(), IFACE_, image(), ImageUI_Data::image, ImageUI_Data::iuser, ImageView::name, NULL, ImageView::prev, UI_block_layout_set_current(), UI_BTYPE_BUT_MENU, UI_BTYPE_LABEL, UI_UNIT_X, UI_UNIT_Y, uiDefBut(), uiDefButS(), uiItemS(), uiLayoutColumn(), uiLayoutGetBlock(), and ImageUser::view.
Referenced by uiblock_layer_pass_buttons().
|
static |
Definition at line 302 of file image_buttons.c.
References B_NOP, BKE_image_acquire_renderresult(), BKE_image_release_renderresult(), BLI_listbase_count(), IFACE_, image(), ImageUI_Data::image, ImageUI_Data::iuser, ListBase::last, RenderView::name, NULL, RenderView::prev, scene, ImageUser::scene, UI_block_layout_set_current(), UI_BTYPE_BUT_MENU, UI_BTYPE_LABEL, UI_UNIT_X, UI_UNIT_Y, uiDefBut(), uiDefButS(), uiItemS(), uiLayoutColumn(), uiLayoutGetBlock(), UNLIKELY, ImageUser::view, and RenderResult::views.
Referenced by uiblock_layer_pass_buttons().
|
static |
Definition at line 553 of file image_buttons.c.
References BKE_image_get_renderslot(), BKE_image_is_multiview(), BKE_image_is_stereo(), BLI_findlink(), BLI_listbase_count_at_most(), BLI_snprintf(), BLI_strncpy(), ImageUser::flag, IFACE_, IMA_SHOW_STEREO, image(), ImageUI_Data::image, image_multi_cb(), image_multiview_cb(), ImageUI_Data::iuser, ImageUser::layer, RenderResult::layers, ImageView::name, RenderSlot::name, RenderView::name, RenderPass::name, RenderLayer::name, ImageView::next, NULL, ImageUser::pass, RenderLayer::passes, RE_layers_have_name(), RE_passes_have_name(), RE_RenderResult_is_stereo(), ImageUI_Data::rpass_index, ImageUser::scene, str, TIP_, UI_but_func_menu_step_set(), UI_but_funcN_set(), UI_but_type_set_menu_from_pulldown(), ui_imageuser_data_copy(), ui_imageuser_layer_fake_name(), ui_imageuser_layer_menu(), ui_imageuser_layer_menu_step(), ui_imageuser_pass_menu(), ui_imageuser_pass_menu_step(), ui_imageuser_slot_menu(), ui_imageuser_slot_menu_step(), ui_imageuser_view_menu_multiview(), ui_imageuser_view_menu_rr(), UI_UNIT_Y, uiDefMenuBut(), uiLayoutGetBlock(), uiLayoutRow(), ImageUser::view, RenderResult::views, and w().
Referenced by uiTemplateImage(), and uiTemplateImageLayers().
void uiTemplateImage | ( | uiLayout * | layout, |
bContext * | C, | ||
PointerRNA * | ptr, | ||
const char * | propname, | ||
PointerRNA * | userptr, | ||
bool | compact, | ||
bool | multiview | ||
) |
Definition at line 722 of file image_buttons.c.
References BKE_image_acquire_ibuf(), BKE_image_acquire_renderresult(), BKE_image_has_alpha(), BKE_image_has_filepath(), BKE_image_has_packedfile(), BKE_image_is_animated(), BKE_image_is_dirty(), BKE_image_release_ibuf(), BKE_image_release_renderresult(), BKE_image_user_frame_calc(), C, RenderData::cfra, col, Image::colorspace_settings, CTX_data_scene(), CTX_wm_space_image(), PointerRNA::data, ImBuf::flags, Image::gen_type, IB_halffloat, IFACE_, IMA_GENTYPE_BLANK, IMA_SRC_GENERATED, IMA_SRC_MOVIE, IMA_SRC_VIEWER, IMA_TYPE_COMPOSITE, IMA_TYPE_MULTILAYER, IMA_TYPE_R_RESULT, IMB_colormanagement_space_name_is_data(), RNAUpdateCb::iuser, SpaceImage::iuser, lock, MEM_callocN, ColorManagedColorspaceSettings::name, NULL, RNAUpdateCb::prop, PROP_POINTER, RNAUpdateCb::ptr, ptr, Scene::r, R_MULTIVIEW, ImBuf::rect_float, Image::render_slot, RNA_boolean_get(), RNA_property_pointer_get(), RNA_property_type(), RNA_struct_find_property(), RNA_struct_identifier(), rna_update_cb(), Image::rr, RenderData::scemode, scene, Image::source, Image::type, PointerRNA::type, UI_block_funcN_set(), UI_DPI_FAC, UI_ITEM_R_EXPAND, UI_TEMPLATE_ID_FILTER_ALL, UI_UNIT_Y, uiblock_layer_pass_buttons(), uiDefAutoButR(), uiItemO(), uiItemR(), uiItemS(), uiLayoutColumn(), uiLayoutGetBlock(), uiLayoutRow(), uiLayoutSetActive(), uiLayoutSetContextPointer(), uiLayoutSetEnabled(), uiLayoutSetPropDecorate(), uiLayoutSetPropSep(), uiTemplateColorspaceSettings(), uiTemplateID(), uiTemplateImageInfo(), and uiTemplateImageViews().
Referenced by blender::ed::space_node::node_composit_buts_image_ex(), blender::ed::space_node::node_shader_buts_tex_environment_ex(), blender::ed::space_node::node_shader_buts_tex_image_ex(), and blender::ed::space_node::node_texture_buts_image_ex().
void uiTemplateImageFormatViews | ( | uiLayout * | layout, |
PointerRNA * | imfptr, | ||
PointerRNA * | ptr | ||
) |
Definition at line 1123 of file image_buttons.c.
References PointerRNA::data, ImageFormatData::imtype, NULL, ptr, R_IMF_IMTYPE_MULTILAYER, RNA_boolean_get(), RNA_property_pointer_get(), RNA_struct_find_property(), uiItemR(), and uiTemplateViewsFormat().
Referenced by image_open_draw(), image_save_as_draw(), blender::nodes::node_composite_output_file_cc::node_composit_buts_file_output_ex(), and sequencer_add_draw().
Definition at line 1167 of file image_buttons.c.
References Image::anims, BKE_image_acquire_ibuf(), BKE_image_has_anim(), BKE_image_release_ibuf(), BKE_image_user_frame_get(), BLI_path_slash_rfind(), BLI_snprintf(), BLI_snprintf_rlen(), BLI_strncpy_rlen(), C, RenderData::cfra, ImBuf::channels, col, CTX_data_scene(), ELEM, ListBase::first, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMB_anim_get_duration(), IMB_TC_RECORD_RUN, len, lock, MAX_IMAGE_INFO_LEN, ImBuf::name, NULL, ImBuf::planes, Scene::r, R_IMF_PLANES_RGBA, ImBuf::rect_float, scene, Image::source, str, TIP_, UI_LAYOUT_ALIGN_RIGHT, uiItemL(), uiLayoutColumn(), uiLayoutSetAlignment(), ImBuf::x, ImBuf::y, ImBuf::zbuf, and ImBuf::zbuf_float.
Referenced by uiTemplateImage().
Definition at line 1148 of file image_buttons.c.
References BKE_image_acquire_renderresult(), BKE_image_release_renderresult(), C, CTX_data_scene(), IMA_TYPE_R_RESULT, NULL, Image::render_slot, scene, Image::type, UI_DPI_FAC, and uiblock_layer_pass_buttons().
void uiTemplateImageSettings | ( | uiLayout * | layout, |
PointerRNA * | imfptr, | ||
bool | color_management | ||
) |
Definition at line 960 of file image_buttons.c.
References BKE_imtype_requires_linear_float(), BKE_imtype_supports_compress(), BKE_imtype_supports_quality(), BKE_imtype_supports_zbuf(), BKE_imtype_valid_depths(), col, ImageFormatData::color_management, PointerRNA::data, ELEM, GS, id, ID_SCE, IFACE_, ImageFormatData::imtype, ID::name, NULL, PointerRNA::owner_id, R_IMF_CHAN_DEPTH_1, R_IMF_CHAN_DEPTH_10, R_IMF_CHAN_DEPTH_12, R_IMF_CHAN_DEPTH_16, R_IMF_CHAN_DEPTH_24, R_IMF_CHAN_DEPTH_32, R_IMF_CHAN_DEPTH_8, R_IMF_COLOR_MANAGEMENT_OVERRIDE, R_IMF_IMTYPE_CINEON, R_IMF_IMTYPE_DPX, R_IMF_IMTYPE_JP2, R_IMF_IMTYPE_MULTILAYER, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_TIFF, RNA_pointer_get(), TIP_, UI_ITEM_R_EXPAND, uiItemL(), uiItemR(), uiItemS(), uiLayoutColumn(), uiLayoutRow(), uiLayoutSetPropDecorate(), uiLayoutSetPropSep(), and uiTemplateColormanagedViewSettings().
Referenced by image_save_as_draw(), blender::nodes::node_composite_output_file_cc::node_composit_buts_file_output_ex(), and screenshot_draw().
void uiTemplateImageStereo3d | ( | uiLayout * | layout, |
PointerRNA * | stereo3d_format_ptr | ||
) |
Definition at line 1058 of file image_buttons.c.
References ATTR_FALLTHROUGH, col, PointerRNA::data, Stereo3dFormat::display_mode, NULL, S3D_DISPLAY_ANAGLYPH, S3D_DISPLAY_INTERLACE, S3D_DISPLAY_SIDEBYSIDE, S3D_DISPLAY_TOPBOTTOM, uiItemR(), and uiLayoutColumn().
Referenced by uiTemplateViewsFormat().
void uiTemplateImageViews | ( | uiLayout * | layout, |
PointerRNA * | imaptr | ||
) |
Definition at line 1105 of file image_buttons.c.
References PointerRNA::data, IMA_TYPE_MULTILAYER, NULL, RNA_property_pointer_get(), RNA_struct_find_property(), Image::type, and uiTemplateViewsFormat().
Referenced by uiTemplateImage().
|
static |
Definition at line 1087 of file image_buttons.c.
References col, NULL, ptr, R_IMF_VIEWS_STEREO_3D, RNA_enum_get(), UI_ITEM_R_EXPAND, uiItemR(), uiLayoutColumn(), uiLayoutSetPropDecorate(), uiLayoutSetPropSep(), and uiTemplateImageStereo3d().
Referenced by uiTemplateImageFormatViews(), and uiTemplateImageViews().