Blender  V2.59
Classes | Typedefs | Functions | Variables
image_ops.c File Reference
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "DNA_object_types.h"
#include "DNA_node_types.h"
#include "DNA_packedFile_types.h"
#include "DNA_scene_types.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_image.h"
#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_packedFile.h"
#include "BKE_report.h"
#include "BKE_screen.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "RE_pipeline.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "ED_image.h"
#include "ED_render.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_uvedit.h"
#include "ED_util.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "WM_api.h"
#include "WM_types.h"
#include "image_intern.h"

Go to the source code of this file.

Classes

struct  ViewPanData
struct  ViewZoomData
struct  ImageSampleInfo
struct  RecordCompositeData

Typedefs

typedef struct ViewPanData ViewPanData
typedef struct ViewZoomData ViewZoomData
typedef struct ImageSampleInfo ImageSampleInfo
typedef struct RecordCompositeData RecordCompositeData

Functions

static void sima_zoom_set (SpaceImage *sima, ARegion *ar, float zoom)
static void sima_zoom_set_factor (SpaceImage *sima, ARegion *ar, float zoomfac)
static int space_image_buffer_exists_poll (bContext *C)
static int space_image_file_exists_poll (bContext *C)
static int space_image_poll (bContext *C)
int space_image_main_area_poll (bContext *C)
static void view_pan_init (bContext *C, wmOperator *op, wmEvent *event)
static void view_pan_exit (bContext *C, wmOperator *op, int cancel)
static int view_pan_exec (bContext *C, wmOperator *op)
static int view_pan_invoke (bContext *C, wmOperator *op, wmEvent *event)
static int view_pan_modal (bContext *C, wmOperator *op, wmEvent *event)
static int view_pan_cancel (bContext *C, wmOperator *op)
void IMAGE_OT_view_pan (wmOperatorType *ot)
static void view_zoom_init (bContext *C, wmOperator *op, wmEvent *event)
static void view_zoom_exit (bContext *C, wmOperator *op, int cancel)
static int view_zoom_exec (bContext *C, wmOperator *op)
static int view_zoom_invoke (bContext *C, wmOperator *op, wmEvent *event)
static int view_zoom_modal (bContext *C, wmOperator *op, wmEvent *event)
static int view_zoom_cancel (bContext *C, wmOperator *op)
void IMAGE_OT_view_zoom (wmOperatorType *ot)
static int view_ndof_invoke (bContext *C, wmOperator *UNUSED(op), wmEvent *event)
void IMAGE_OT_view_ndof (wmOperatorType *ot)
static int view_all_exec (bContext *C, wmOperator *UNUSED(op))
void IMAGE_OT_view_all (wmOperatorType *ot)
static int view_selected_exec (bContext *C, wmOperator *UNUSED(op))
static int view_selected_poll (bContext *C)
void IMAGE_OT_view_selected (wmOperatorType *ot)
static int view_zoom_in_exec (bContext *C, wmOperator *UNUSED(op))
void IMAGE_OT_view_zoom_in (wmOperatorType *ot)
static int view_zoom_out_exec (bContext *C, wmOperator *UNUSED(op))
void IMAGE_OT_view_zoom_out (wmOperatorType *ot)
static int view_zoom_ratio_exec (bContext *C, wmOperator *op)
void IMAGE_OT_view_zoom_ratio (wmOperatorType *ot)
static void image_filesel (bContext *C, wmOperator *op, const char *path)
static void open_init (bContext *C, wmOperator *op)
static int open_cancel (bContext *UNUSED(C), wmOperator *op)
static int open_exec (bContext *C, wmOperator *op)
static int open_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void IMAGE_OT_open (wmOperatorType *ot)
static int replace_exec (bContext *C, wmOperator *op)
static int replace_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void IMAGE_OT_replace (wmOperatorType *ot)
static void save_image_doit (bContext *C, SpaceImage *sima, Scene *scene, wmOperator *op, char *path, int do_newpath)
static int save_as_exec (bContext *C, wmOperator *op)
static int save_as_check (bContext *UNUSED(C), wmOperator *op)
static int save_as_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void IMAGE_OT_save_as (wmOperatorType *ot)
static int save_exec (bContext *C, wmOperator *op)
void IMAGE_OT_save (wmOperatorType *ot)
static int save_sequence_exec (bContext *C, wmOperator *op)
void IMAGE_OT_save_sequence (wmOperatorType *ot)
static int reload_exec (bContext *C, wmOperator *UNUSED(op))
void IMAGE_OT_reload (wmOperatorType *ot)
static int image_new_exec (bContext *C, wmOperator *op)
static int image_new_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void IMAGE_OT_new (wmOperatorType *ot)
static int image_invert_poll (bContext *C)
static int image_invert_exec (bContext *C, wmOperator *op)
void IMAGE_OT_invert (wmOperatorType *ot)
static int pack_test (bContext *C, wmOperator *op)
static int pack_exec (bContext *C, wmOperator *op)
static int pack_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void IMAGE_OT_pack (wmOperatorType *ot)
static int image_unpack_exec (bContext *C, wmOperator *op)
static int image_unpack_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
void IMAGE_OT_unpack (wmOperatorType *ot)
static void sample_draw (const bContext *UNUSED(C), ARegion *ar, void *arg_info)
static void sample_apply (bContext *C, wmOperator *op, wmEvent *event)
static void sample_exit (bContext *C, wmOperator *op)
static int sample_invoke (bContext *C, wmOperator *op, wmEvent *event)
static int sample_modal (bContext *C, wmOperator *op, wmEvent *event)
static int sample_cancel (bContext *C, wmOperator *op)
void IMAGE_OT_sample (wmOperatorType *ot)
static int sample_line_exec (bContext *C, wmOperator *op)
static int sample_line_invoke (bContext *C, wmOperator *op, wmEvent *event)
void IMAGE_OT_sample_line (wmOperatorType *ot)
void IMAGE_OT_curves_point_set (wmOperatorType *ot)
static int record_composite_apply (bContext *C, wmOperator *op)
static int record_composite_init (bContext *C, wmOperator *op)
static void record_composite_exit (bContext *C, wmOperator *op)
static int record_composite_exec (bContext *C, wmOperator *op)
static int record_composite_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
static int record_composite_modal (bContext *C, wmOperator *op, wmEvent *event)
static int record_composite_cancel (bContext *C, wmOperator *op)
void IMAGE_OT_record_composite (wmOperatorType *ot)
static int cycle_render_slot_poll (bContext *C)
static int cycle_render_slot_exec (bContext *C, wmOperator *op)
void IMAGE_OT_cycle_render_slot (wmOperatorType *ot)
void ED_image_update_frame (const Main *mainp, int cfra)

Variables

static const EnumPropertyItem image_file_type_items []

Detailed Description

Definition in file image_ops.c.


Typedef Documentation

typedef struct ViewPanData ViewPanData
typedef struct ViewZoomData ViewZoomData

Function Documentation

static int cycle_render_slot_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int cycle_render_slot_poll ( bContext *  C) [static]

Definition at line 2174 of file image_ops.c.

References CTX_data_edit_image(), IMA_TYPE_R_RESULT, and Image::type.

Referenced by IMAGE_OT_cycle_render_slot().

void ED_image_update_frame ( const Main *  mainp,
int  cfra 
)
static void image_filesel ( bContext *  C,
wmOperator *  op,
const char *  path 
) [static]
static int image_invert_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int image_invert_poll ( bContext *  C) [static]

Definition at line 1433 of file image_ops.c.

References BKE_image_get_ibuf(), CTX_data_edit_image(), and NULL.

Referenced by IMAGE_OT_invert().

static int image_new_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int image_new_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  UNUSEDevent 
) [static]

Definition at line 1397 of file image_ops.c.

References WM_operator_props_dialog_popup().

Referenced by IMAGE_OT_new().

void IMAGE_OT_curves_point_set ( wmOperatorType *  ot)
void IMAGE_OT_cycle_render_slot ( wmOperatorType *  ot)
void IMAGE_OT_invert ( wmOperatorType *  ot)
void IMAGE_OT_new ( wmOperatorType *  ot)
void IMAGE_OT_open ( wmOperatorType *  ot)
void IMAGE_OT_pack ( wmOperatorType *  ot)
void IMAGE_OT_record_composite ( wmOperatorType *  ot)
void IMAGE_OT_reload ( wmOperatorType *  ot)
void IMAGE_OT_replace ( wmOperatorType *  ot)
void IMAGE_OT_sample ( wmOperatorType *  ot)
void IMAGE_OT_sample_line ( wmOperatorType *  ot)
void IMAGE_OT_save ( wmOperatorType *  ot)
void IMAGE_OT_save_as ( wmOperatorType *  ot)
void IMAGE_OT_save_sequence ( wmOperatorType *  ot)
void IMAGE_OT_unpack ( wmOperatorType *  ot)
void IMAGE_OT_view_all ( wmOperatorType *  ot)
void IMAGE_OT_view_ndof ( wmOperatorType *  ot)
void IMAGE_OT_view_pan ( wmOperatorType *  ot)
void IMAGE_OT_view_selected ( wmOperatorType *  ot)
void IMAGE_OT_view_zoom ( wmOperatorType *  ot)
void IMAGE_OT_view_zoom_in ( wmOperatorType *  ot)
void IMAGE_OT_view_zoom_out ( wmOperatorType *  ot)
void IMAGE_OT_view_zoom_ratio ( wmOperatorType *  ot)
static int image_unpack_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int image_unpack_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  UNUSEDevent 
) [static]
static int open_cancel ( bContext *  UNUSEDC,
wmOperator *  op 
) [static]

Definition at line 753 of file image_ops.c.

References wmOperator::customdata, MEM_freeN(), NULL, and OPERATOR_CANCELLED.

Referenced by IMAGE_OT_open().

static int open_exec ( bContext *  C,
wmOperator *  op 
) [static]
static void open_init ( bContext *  C,
wmOperator *  op 
) [static]
static int open_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  UNUSEDevent 
) [static]
static int pack_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int pack_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  UNUSEDevent 
) [static]
static int pack_test ( bContext *  C,
wmOperator *  op 
) [static]
static int record_composite_apply ( bContext *  C,
wmOperator *  op 
) [static]
static int record_composite_cancel ( bContext *  C,
wmOperator *  op 
) [static]

Definition at line 2152 of file image_ops.c.

References OPERATOR_CANCELLED, and record_composite_exit().

Referenced by IMAGE_OT_record_composite().

static int record_composite_exec ( bContext *  C,
wmOperator *  op 
) [static]
static void record_composite_exit ( bContext *  C,
wmOperator *  op 
) [static]
static int record_composite_init ( bContext *  C,
wmOperator *  op 
) [static]
static int record_composite_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  UNUSEDevent 
) [static]
static int record_composite_modal ( bContext *  C,
wmOperator *  op,
wmEvent *  event 
) [static]
static int reload_exec ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static int replace_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int replace_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  UNUSEDevent 
) [static]
static void sample_apply ( bContext *  C,
wmOperator *  op,
wmEvent *  event 
) [static]
static int sample_cancel ( bContext *  C,
wmOperator *  op 
) [static]

Definition at line 1864 of file image_ops.c.

References OPERATOR_CANCELLED, and sample_exit().

Referenced by IMAGE_OT_curves_point_set(), and IMAGE_OT_sample().

static void sample_draw ( const bContext *  UNUSEDC,
ARegion *  ar,
void *  arg_info 
) [static]
static void sample_exit ( bContext *  C,
wmOperator *  op 
) [static]
static int sample_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  event 
) [static]
static int sample_line_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int sample_line_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  event 
) [static]
static int sample_modal ( bContext *  C,
wmOperator *  op,
wmEvent *  event 
) [static]
static int save_as_check ( bContext *  UNUSEDC,
wmOperator *  op 
) [static]
static int save_as_exec ( bContext *  C,
wmOperator *  op 
) [static]
static int save_as_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  UNUSEDevent 
) [static]
static int save_exec ( bContext *  C,
wmOperator *  op 
) [static]
static void save_image_doit ( bContext *  C,
SpaceImage *  sima,
Scene *  scene,
wmOperator *  op,
char *  path,
int  do_newpath 
) [static]
static int save_sequence_exec ( bContext *  C,
wmOperator *  op 
) [static]
static void sima_zoom_set ( SpaceImage *  sima,
ARegion *  ar,
float  zoom 
) [static]
static void sima_zoom_set_factor ( SpaceImage *  sima,
ARegion *  ar,
float  zoomfac 
) [static]
static int space_image_buffer_exists_poll ( bContext *  C) [static]
static int space_image_file_exists_poll ( bContext *  C) [static]
int space_image_main_area_poll ( bContext *  C)
static int space_image_poll ( bContext *  C) [static]

Definition at line 155 of file image_ops.c.

References CTX_wm_space_image(), SpaceImage::image, SPACE_IMAGE, and SpaceImage::spacetype.

Referenced by IMAGE_OT_replace().

static int view_all_exec ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static int view_ndof_invoke ( bContext *  C,
wmOperator *  UNUSEDop,
wmEvent *  event 
) [static]
static int view_pan_cancel ( bContext *  C,
wmOperator *  op 
) [static]

Definition at line 282 of file image_ops.c.

References OPERATOR_CANCELLED, and view_pan_exit().

Referenced by IMAGE_OT_view_pan().

static int view_pan_exec ( bContext *  C,
wmOperator *  op 
) [static]
static void view_pan_exit ( bContext *  C,
wmOperator *  op,
int  cancel 
) [static]
static void view_pan_init ( bContext *  C,
wmOperator *  op,
wmEvent *  event 
) [static]
static int view_pan_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  event 
) [static]
static int view_pan_modal ( bContext *  C,
wmOperator *  op,
wmEvent *  event 
) [static]
static int view_selected_exec ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static int view_selected_poll ( bContext *  C) [static]

Definition at line 596 of file image_ops.c.

References ED_operator_uvedit(), and space_image_main_area_poll().

Referenced by IMAGE_OT_view_selected().

static int view_zoom_cancel ( bContext *  C,
wmOperator *  op 
) [static]

Definition at line 413 of file image_ops.c.

References OPERATOR_CANCELLED, and view_zoom_exit().

Referenced by IMAGE_OT_view_zoom().

static int view_zoom_exec ( bContext *  C,
wmOperator *  op 
) [static]
static void view_zoom_exit ( bContext *  C,
wmOperator *  op,
int  cancel 
) [static]
static int view_zoom_in_exec ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static void view_zoom_init ( bContext *  C,
wmOperator *  op,
wmEvent *  event 
) [static]
static int view_zoom_invoke ( bContext *  C,
wmOperator *  op,
wmEvent *  event 
) [static]
static int view_zoom_modal ( bContext *  C,
wmOperator *  op,
wmEvent *  event 
) [static]
static int view_zoom_out_exec ( bContext *  C,
wmOperator *  UNUSEDop 
) [static]
static int view_zoom_ratio_exec ( bContext *  C,
wmOperator *  op 
) [static]

Variable Documentation

Definition at line 705 of file image_ops.c.