Blender V2.61 - r43446
|
#include <string.h>
#include <stdio.h>
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_node_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_editVert.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_image.h"
#include "BKE_mesh.h"
#include "BKE_node.h"
#include "BKE_screen.h"
#include "RE_pipeline.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 | RNAUpdateCb |
Defines | |
#define | B_REDR 1 |
#define | B_IMAGECHANGED 2 |
#define | B_NOP 0 |
#define | B_TWINANIM 5 |
#define | B_SIMAGETILE 6 |
#define | B_IDNAME 10 |
#define | B_FACESEL_PAINT_TEST 11 |
#define | B_SIMA_RECORD 12 |
#define | B_SIMA_PLAY 13 |
#define | B_SIMANOTHING 16 |
#define | B_SIMABRUSHCHANGE 17 |
#define | B_SIMABRUSHBROWSE 18 |
#define | B_SIMABRUSHLOCAL 19 |
#define | B_SIMABRUSHDELETE 20 |
#define | B_KEEPDATA 21 |
#define | B_SIMABTEXBROWSE 22 |
#define | B_SIMABTEXDELETE 23 |
#define | B_VPCOLSLI 24 |
#define | B_SIMACLONEBROWSE 25 |
#define | B_SIMACLONEDELETE 26 |
Typedefs | |
typedef struct RNAUpdateCb | RNAUpdateCb |
Functions | |
static void | image_info (Scene *scene, ImageUser *iuser, Image *ima, ImBuf *ibuf, char *str) |
struct ImageUser * | ntree_get_active_iuser (bNodeTree *ntree) |
static int | image_panel_poll (const bContext *C, PanelType *UNUSED(pt)) |
static void | image_panel_curves (const bContext *C, Panel *pa) |
static char * | slot_menu (void) |
static char * | layer_menu (RenderResult *rr, short *UNUSED(curlay)) |
static char * | pass_menu (RenderLayer *rl, short *curpass) |
static void | set_frames_cb (bContext *C, void *ima_v, void *iuser_v) |
static void | image_multi_cb (bContext *C, void *rr_v, void *iuser_v) |
static void | image_multi_inclay_cb (bContext *C, void *rr_v, void *iuser_v) |
static void | image_multi_declay_cb (bContext *C, void *rr_v, void *iuser_v) |
static void | image_multi_incpass_cb (bContext *C, void *rr_v, void *iuser_v) |
static void | image_multi_decpass_cb (bContext *C, void *rr_v, void *iuser_v) |
static void | uiblock_layer_pass_buttons (uiLayout *layout, RenderResult *rr, ImageUser *iuser, int w, short *render_slot) |
static void | uiblock_layer_pass_arrow_buttons (uiLayout *layout, RenderResult *rr, ImageUser *iuser, short *render_slot) |
static void | rna_update_cb (bContext *C, void *arg_cb, void *UNUSED(arg)) |
void | uiTemplateImage (uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *userptr, int compact) |
void | uiTemplateImageSettings (uiLayout *layout, PointerRNA *imfptr) |
void | uiTemplateImageLayers (uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser) |
void | image_buttons_register (ARegionType *art) |
static int | image_properties (bContext *C, wmOperator *UNUSED(op)) |
void | IMAGE_OT_properties (wmOperatorType *ot) |
static int | image_scopes (bContext *C, wmOperator *UNUSED(op)) |
void | IMAGE_OT_scopes (wmOperatorType *ot) |
Definition in file image_buttons.c.
#define B_FACESEL_PAINT_TEST 11 |
Definition at line 81 of file image_buttons.c.
#define B_IDNAME 10 |
Definition at line 80 of file image_buttons.c.
#define B_IMAGECHANGED 2 |
Definition at line 76 of file image_buttons.c.
Referenced by uiTemplateImage().
#define B_KEEPDATA 21 |
Definition at line 90 of file image_buttons.c.
#define B_NOP 0 |
Definition at line 77 of file image_buttons.c.
#define B_REDR 1 |
Definition at line 75 of file image_buttons.c.
#define B_SIMA_PLAY 13 |
Definition at line 83 of file image_buttons.c.
Referenced by uiTemplateImage().
#define B_SIMA_RECORD 12 |
Definition at line 82 of file image_buttons.c.
Referenced by uiTemplateImage().
#define B_SIMABRUSHBROWSE 18 |
Definition at line 87 of file image_buttons.c.
#define B_SIMABRUSHCHANGE 17 |
Definition at line 86 of file image_buttons.c.
#define B_SIMABRUSHDELETE 20 |
Definition at line 89 of file image_buttons.c.
#define B_SIMABRUSHLOCAL 19 |
Definition at line 88 of file image_buttons.c.
#define B_SIMABTEXBROWSE 22 |
Definition at line 91 of file image_buttons.c.
#define B_SIMABTEXDELETE 23 |
Definition at line 92 of file image_buttons.c.
#define B_SIMACLONEBROWSE 25 |
Definition at line 94 of file image_buttons.c.
#define B_SIMACLONEDELETE 26 |
Definition at line 95 of file image_buttons.c.
#define B_SIMAGETILE 6 |
Definition at line 79 of file image_buttons.c.
#define B_SIMANOTHING 16 |
Definition at line 85 of file image_buttons.c.
#define B_TWINANIM 5 |
Definition at line 78 of file image_buttons.c.
#define B_VPCOLSLI 24 |
Definition at line 93 of file image_buttons.c.
typedef struct RNAUpdateCb RNAUpdateCb |
void image_buttons_register | ( | ARegionType * | art | ) |
Definition at line 889 of file image_buttons.c.
References BLI_addtail(), PanelType::draw, PanelType::flag, gpencil_panel_standard(), PanelType::idname, image_panel_curves(), image_panel_poll(), PanelType::label, MEM_callocN(), ARegionType::paneltypes, PNL_DEFAULT_CLOSED, and PanelType::poll.
Referenced by ED_spacetype_image().
static void image_info | ( | Scene * | scene, |
ImageUser * | iuser, | ||
Image * | ima, | ||
ImBuf * | ibuf, | ||
char * | str | ||
) | [static] |
Definition at line 99 of file image_buttons.c.
References Image::anim, BKE_image_user_get_frame(), BLI_last_slash(), CFRA, ImBuf::channels, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMB_anim_get_duration(), IMB_TC_RECORD_RUN, ImBuf::name, NULL, ImBuf::planes, R_IMF_PLANES_RGBA, ImBuf::rect_float, Image::source, ImBuf::x, ImBuf::y, ImBuf::zbuf, and ImBuf::zbuf_float.
Referenced by uiTemplateImage().
static void image_multi_cb | ( | bContext * | C, |
void * | rr_v, | ||
void * | iuser_v | ||
) | [static] |
Definition at line 439 of file image_buttons.c.
References BKE_image_multilayer_index(), NC_IMAGE, ND_DRAW, NULL, and WM_event_add_notifier().
Referenced by uiblock_layer_pass_buttons().
static void image_multi_declay_cb | ( | bContext * | C, |
void * | rr_v, | ||
void * | iuser_v | ||
) | [static] |
Definition at line 461 of file image_buttons.c.
References BKE_image_multilayer_index(), ImageUser::layer, NC_IMAGE, ND_DRAW, NULL, and WM_event_add_notifier().
Referenced by uiblock_layer_pass_arrow_buttons().
static void image_multi_decpass_cb | ( | bContext * | C, |
void * | rr_v, | ||
void * | iuser_v | ||
) | [static] |
Definition at line 490 of file image_buttons.c.
References BKE_image_multilayer_index(), NC_IMAGE, ND_DRAW, NULL, ImageUser::pass, and WM_event_add_notifier().
Referenced by uiblock_layer_pass_arrow_buttons().
static void image_multi_inclay_cb | ( | bContext * | C, |
void * | rr_v, | ||
void * | iuser_v | ||
) | [static] |
Definition at line 446 of file image_buttons.c.
References BKE_image_multilayer_index(), BLI_countlist(), ImageUser::layer, RenderResult::layers, NC_IMAGE, ND_DRAW, NULL, RenderResult::rect32, RenderResult::rectf, and WM_event_add_notifier().
Referenced by uiblock_layer_pass_arrow_buttons().
static void image_multi_incpass_cb | ( | bContext * | C, |
void * | rr_v, | ||
void * | iuser_v | ||
) | [static] |
Definition at line 471 of file image_buttons.c.
References BKE_image_multilayer_index(), BLI_countlist(), BLI_findlink(), ImageUser::layer, RenderResult::layers, NC_IMAGE, ND_DRAW, NULL, ImageUser::pass, RenderLayer::passes, RenderResult::rect32, RenderResult::rectf, and WM_event_add_notifier().
Referenced by uiblock_layer_pass_arrow_buttons().
void IMAGE_OT_properties | ( | wmOperatorType * | ot | ) |
Definition at line 919 of file image_buttons.c.
References wmOperatorType::description, ED_operator_image_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, image_properties(), wmOperatorType::name, and wmOperatorType::poll.
Referenced by image_operatortypes().
void IMAGE_OT_scopes | ( | wmOperatorType * | ot | ) |
Definition at line 943 of file image_buttons.c.
References wmOperatorType::description, ED_operator_image_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, image_scopes(), wmOperatorType::name, and wmOperatorType::poll.
Referenced by image_operatortypes().
Definition at line 189 of file image_buttons.c.
References ImBuf::channels, CTX_wm_screen(), CTX_wm_space_image(), SpaceImage::cumap, curvemapping_add(), ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), bScreen::id, Panel::layout, NULL, RNA_pointer_create(), RNA_SpaceImageEditor, and uiTemplateCurveMapping().
Referenced by image_buttons_register().
Definition at line 175 of file image_buttons.c.
References CTX_wm_space_image(), ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), and ImBuf::rect_float.
Referenced by image_buttons_register().
static int image_properties | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 908 of file image_buttons.c.
References CTX_wm_area(), ED_region_toggle_hidden(), image_has_buttons_region(), and OPERATOR_FINISHED.
Referenced by IMAGE_OT_properties().
static int image_scopes | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 932 of file image_buttons.c.
References CTX_wm_area(), ED_region_toggle_hidden(), image_has_scope_region(), and OPERATOR_FINISHED.
Referenced by IMAGE_OT_scopes().
static char* layer_menu | ( | RenderResult * | rr, |
short * | UNUSEDcurlay | ||
) | [static] |
Definition at line 371 of file image_buttons.c.
References BLI_countlist(), ListBase::first, RenderResult::layers, len(), MEM_callocN(), RenderLayer::name, RenderLayer::next, RenderResult::rect32, RenderResult::rectf, str, and strlen().
Referenced by uiblock_layer_pass_buttons().
Definition at line 158 of file image_buttons.c.
References CMP_NODE_SPLITVIEWER, CMP_NODE_VIEWER, ELEM, ListBase::first, bNode::flag, bNode::next, NODE_DO_OUTPUT, bNodeTree::nodes, NULL, bNode::storage, and bNode::type.
Referenced by draw_image_main(), and uiTemplateImage().
static char* pass_menu | ( | RenderLayer * | rl, |
short * | curpass | ||
) | [static] |
Definition at line 400 of file image_buttons.c.
References BLI_countlist(), ListBase::first, len(), MEM_callocN(), RenderPass::name, RenderPass::next, NULL, RenderLayer::passes, RenderLayer::rectf, str, and strlen().
Referenced by uiblock_layer_pass_buttons().
static void rna_update_cb | ( | bContext * | C, |
void * | arg_cb, | ||
void * | UNUSEDarg | ||
) | [static] |
Definition at line 601 of file image_buttons.c.
References RNAUpdateCb::iuser, ImageUser::ok, RNAUpdateCb::prop, RNAUpdateCb::ptr, and RNA_property_update().
Referenced by uiTemplateImage().
static void set_frames_cb | ( | bContext * | C, |
void * | ima_v, | ||
void * | iuser_v | ||
) | [static] |
Definition at line 426 of file image_buttons.c.
References Image::anim, BKE_image_user_calc_frame(), RenderData::cfra, CTX_data_scene(), ImageUser::frames, IMB_anim_get_duration(), IMB_TC_RECORD_RUN, Scene::r, and ImageUser::scene.
Referenced by uiTemplateImage().
static char* slot_menu | ( | void | ) | [static] |
Definition at line 354 of file image_buttons.c.
References IMA_MAX_RENDER_SLOT, MEM_callocN(), str, and strlen().
Referenced by uiblock_layer_pass_buttons().
static void uiblock_layer_pass_arrow_buttons | ( | uiLayout * | layout, |
RenderResult * | rr, | ||
ImageUser * | iuser, | ||
short * | render_slot | ||
) | [static] |
Definition at line 559 of file image_buttons.c.
References BUT, ListBase::first, image_multi_declay_cb(), image_multi_decpass_cb(), image_multi_inclay_cb(), image_multi_incpass_cb(), RenderResult::layers, NULL, UI_DPI_FAC, uiblock_layer_pass_buttons(), uiBlockEndAlign(), uiButSetFunc(), uiDefIconBut(), uiItemL(), uiLayoutGetBlock(), and uiLayoutRow().
Referenced by uiTemplateImage().
static void uiblock_layer_pass_buttons | ( | uiLayout * | layout, |
RenderResult * | rr, | ||
ImageUser * | iuser, | ||
int | w, | ||
short * | render_slot | ||
) | [static] |
Definition at line 518 of file image_buttons.c.
References BLI_findlink(), image_multi_cb(), ImageUser::layer, layer_menu(), RenderResult::layers, MEM_freeN(), MENU, NULL, ImageUser::pass, pass_menu(), RenderResult::rect32, RenderResult::rectf, slot_menu(), UI_UNIT_Y, uiButSetFunc(), uiDefButS(), uiLayoutGetBlock(), uiLayoutRow(), and simple_enum_gen::w.
Referenced by uiblock_layer_pass_arrow_buttons(), and uiTemplateImageLayers().
void uiTemplateImage | ( | uiLayout * | layout, |
bContext * | C, | ||
PointerRNA * | ptr, | ||
const char * | propname, | ||
PointerRNA * | userptr, | ||
int | compact | ||
) |
Definition at line 615 of file image_buttons.c.
References Image::anim, B_IMAGECHANGED, B_NOP, B_SIMA_PLAY, B_SIMA_RECORD, BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), BLI_snprintf(), BUT, CTX_data_scene(), PointerRNA::data, ELEM, ImageUser::flag, ImageUser::framenr, ImageUser::frames, Scene::id, Image::id, IMA_ANIM_REFRESHED, IMA_SRC_GENERATED, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMA_SRC_VIEWER, IMA_TYPE_COMPOSITE, IMA_TYPE_MULTILAYER, IMA_TYPE_R_RESULT, image_info(), RNAUpdateCb::iuser, MAXFRAMEF, MEM_callocN(), MEM_dupallocN(), MEM_freeN(), ID::name, NC_IMAGE, Scene::nodetree, ntree_get_active_iuser(), NULL, NUM, Image::packedfile, RNAUpdateCb::prop, PROP_POINTER, RNAUpdateCb::ptr, RE_AcquireResultRead(), RE_GetRender(), RE_ReleaseResult(), 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, set_frames_cb(), ImageUser::sfra, Image::source, split(), str, Image::type, PointerRNA::type, UI_ITEM_R_EXPAND, UI_UNIT_X, UI_UNIT_Y, uiblock_layer_pass_arrow_buttons(), uiBlockBeginAlign(), uiBlockSetNFunc(), uiButSetFunc(), uiDefBut(), uiDefButI(), uiDefIconTextBut(), uiItemL(), uiItemO(), uiItemR(), uiItemS(), uiLayoutColumn(), uiLayoutGetBlock(), uiLayoutRow(), uiLayoutSetActive(), uiLayoutSetContextPointer(), uiLayoutSetEnabled(), uiLayoutSplit(), uiTemplateID(), and WM_event_add_notifier().
Definition at line 875 of file image_buttons.c.
References BKE_image_acquire_renderresult(), BKE_image_release_renderresult(), CTX_data_scene(), IMA_TYPE_R_RESULT, NULL, Image::render_slot, Image::type, UI_DPI_FAC, and uiblock_layer_pass_buttons().
void uiTemplateImageSettings | ( | uiLayout * | layout, |
PointerRNA * | imfptr | ||
) |
Definition at line 803 of file image_buttons.c.
References BKE_imtype_supports_compress(), BKE_imtype_supports_quality(), BKE_imtype_supports_zbuf(), BKE_imtype_valid_depths(), PointerRNA::data, ELEM, ELEM6, GS, PointerRNA::id, ID_SCE, ImageFormatData::imtype, ID::name, NULL, R_IMF_CHAN_DEPTH_1, 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_IMTYPE_CINEON, R_IMF_IMTYPE_JP2, R_IMF_IMTYPE_MULTILAYER, R_IMF_IMTYPE_OPENEXR, split(), UI_ITEM_R_EXPAND, uiItemL(), uiItemR(), uiLayoutColumn(), uiLayoutRow(), and uiLayoutSplit().
Referenced by image_save_as_draw(), and node_composit_buts_file_output().