Blender  V3.3
BKE_image_save.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 #pragma once
4 
5 #include "DNA_scene_types.h"
6 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 struct Image;
16 struct ImageUser;
17 struct Main;
18 struct RenderResult;
19 struct ReportList;
20 struct Scene;
21 
22 /* Image datablock saving. */
23 
24 typedef struct ImageSaveOptions {
25  /* Context within which image is saved. */
26  struct Main *bmain;
27  struct Scene *scene;
28 
29  /* Format and absolute file path. */
31  char filepath[1024]; /* 1024 = FILE_MAX */
32 
33  /* Options. */
34  bool relative;
35  bool save_copy;
37  bool do_newpath;
38 
39  /* Keep track of previous values for auto updates in UI. */
43 
45  struct Main *bmain,
46  struct Scene *scene,
47  struct Image *ima,
48  struct ImageUser *iuser,
49  const bool guess_path,
50  const bool save_as_render);
51 void BKE_image_save_options_update(struct ImageSaveOptions *opts, const struct Image *ima);
53 
54 bool BKE_image_save(struct ReportList *reports,
55  struct Main *bmain,
56  struct Image *ima,
57  struct ImageUser *iuser,
58  const struct ImageSaveOptions *opts);
59 
60 /* Render saving. */
61 
67  const struct RenderResult *rr,
68  const char *filepath,
69  const struct ImageFormatData *imf,
70  const bool save_as_render,
71  const char *view,
72  int layer);
73 
77 bool BKE_image_render_write(struct ReportList *reports,
78  struct RenderResult *rr,
79  const struct Scene *scene,
80  const bool stamp,
81  const char *filepath_basis);
82 
83 #ifdef __cplusplus
84 }
85 #endif
struct ImageSaveOptions ImageSaveOptions
bool BKE_image_save(struct ReportList *reports, struct Main *bmain, struct Image *ima, struct ImageUser *iuser, const struct ImageSaveOptions *opts)
bool BKE_image_render_write(struct ReportList *reports, struct RenderResult *rr, const struct Scene *scene, const bool stamp, const char *filepath_basis)
void BKE_image_save_options_update(struct ImageSaveOptions *opts, const struct Image *ima)
bool BKE_image_save_options_init(ImageSaveOptions *opts, struct Main *bmain, struct Scene *scene, struct Image *ima, struct ImageUser *iuser, const bool guess_path, const bool save_as_render)
Definition: image_save.cc:76
bool BKE_image_render_write_exr(struct ReportList *reports, const struct RenderResult *rr, const char *filepath, const struct ImageFormatData *imf, const bool save_as_render, const char *view, int layer)
void BKE_image_save_options_free(struct ImageSaveOptions *opts)
Definition: image_save.cc:241
static AppView * view
Scene scene
struct ImageFormatData im_format
struct Scene * scene
struct Main * bmain
char filepath[1024]
Definition: BKE_main.h:121