Blender  V3.3
ED_util.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #include "BLI_compiler_attrs.h"
11 #include "WM_types.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 struct GPUBatch;
18 struct IDRemapper;
19 struct Main;
20 struct bContext;
21 
22 /* ed_util.c */
23 
24 void ED_editors_init_for_undo(struct Main *bmain);
25 void ED_editors_init(struct bContext *C);
29 void ED_editors_exit(struct Main *bmain, bool do_undo_system);
30 
32  struct Object *ob,
33  bool for_render,
34  bool check_needs_flush);
35 bool ED_editors_flush_edits_for_object(struct Main *bmain, struct Object *ob);
36 
40 bool ED_editors_flush_edits_ex(struct Main *bmain, bool for_render, bool check_needs_flush);
41 bool ED_editors_flush_edits(struct Main *bmain);
42 
49  struct SpaceLink *sl,
50  struct ID *old_id,
51  struct ID *new_id);
53  struct SpaceLink *sl,
54  const struct IDRemapper *mappings);
55 
56 void ED_operatortypes_edutils(void);
57 
58 /* Drawing */
59 
64  struct ARegion *region,
65  void *arg_info);
66 
71  int x, int y, struct ImBuf *ibuf, const rctf *frame, float zoomx, float zoomy);
72 
73 /* Slider */
74 
75 struct tSlider;
76 
77 struct tSlider *ED_slider_create(struct bContext *C);
81 void ED_slider_init(struct tSlider *slider, const struct wmEvent *event);
85 bool ED_slider_modal(struct tSlider *slider, const struct wmEvent *event);
86 void ED_slider_destroy(struct bContext *C, struct tSlider *slider);
87 
91 void ED_slider_status_string_get(const struct tSlider *slider,
92  char *status_string,
93  size_t size_of_status_string);
94 
95 float ED_slider_factor_get(struct tSlider *slider);
96 void ED_slider_factor_set(struct tSlider *slider, float factor);
97 
98 bool ED_slider_allow_overshoot_get(struct tSlider *slider);
99 void ED_slider_allow_overshoot_set(struct tSlider *slider, bool value);
100 
101 /* ************** XXX OLD CRUFT WARNING ************* */
102 
108 void apply_keyb_grid(
109  bool shift, bool ctrl, float *val, float fac1, float fac2, float fac3, int invert);
110 
111 /* where else to go ? */
112 void unpack_menu(struct bContext *C,
113  const char *opname,
114  const char *id_name,
115  const char *abs_name,
116  const char *folder,
117  struct PackedFile *pf);
118 
119 #ifdef __cplusplus
120 }
121 #endif
bool ED_editors_flush_edits_for_object(struct Main *bmain, struct Object *ob)
Definition: ed_util.c:303
void ED_editors_init_for_undo(struct Main *bmain)
Definition: ed_util.c:60
void ED_slider_init(struct tSlider *slider, const struct wmEvent *event)
void ED_slider_allow_overshoot_set(struct tSlider *slider, bool value)
Definition: ed_draw.c:498
void ED_slider_status_string_get(const struct tSlider *slider, char *status_string, size_t size_of_status_string)
Definition: ed_draw.c:424
void ED_editors_exit(struct Main *bmain, bool do_undo_system)
Definition: ed_util.c:213
bool ED_editors_flush_edits_for_object_ex(struct Main *bmain, struct Object *ob, bool for_render, bool check_needs_flush)
Definition: ed_util.c:254
void ED_spacedata_id_remap(struct ScrArea *area, struct SpaceLink *sl, const struct IDRemapper *mappings)
Definition: ed_util.c:452
void ED_editors_init(struct bContext *C)
Definition: ed_util.c:78
void ED_operatortypes_edutils(void)
Definition: ed_util_ops.cc:372
bool ED_editors_flush_edits(struct Main *bmain)
Definition: ed_util.c:325
void ED_spacedata_id_remap_single(struct ScrArea *area, struct SpaceLink *sl, struct ID *old_id, struct ID *new_id)
Definition: ed_util.c:462
void ED_region_image_metadata_draw(int x, int y, struct ImBuf *ibuf, const rctf *frame, float zoomx, float zoomy)
Definition: ed_draw.c:755
float ED_slider_factor_get(struct tSlider *slider)
Definition: ed_draw.c:480
void apply_keyb_grid(bool shift, bool ctrl, float *val, float fac1, float fac2, float fac3, int invert)
Definition: ed_util.c:332
bool ED_slider_allow_overshoot_get(struct tSlider *slider)
Definition: ed_draw.c:493
bool ED_editors_flush_edits_ex(struct Main *bmain, bool for_render, bool check_needs_flush)
Definition: ed_util.c:308
bool ED_slider_modal(struct tSlider *slider, const struct wmEvent *event)
void ED_region_draw_mouse_line_cb(const struct bContext *C, struct ARegion *region, void *arg_info)
void ED_slider_factor_set(struct tSlider *slider, float factor)
Definition: ed_draw.c:485
void unpack_menu(struct bContext *C, const char *opname, const char *id_name, const char *abs_name, const char *folder, struct PackedFile *pf)
Definition: ed_util.c:357
void ED_slider_destroy(struct bContext *C, struct tSlider *slider)
Definition: ed_draw.c:467
struct tSlider * ED_slider_create(struct bContext *C)
Definition: ed_draw.c:358
GPUBatch
Definition: GPU_batch.h:78
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
#define C
Definition: RandGen.cpp:25
std::string id_name(void *id)
#define pf(_x, _i)
Prefetch 64.
Definition: gim_memory.h:48
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
Definition: invert.h:8
static void area(int d1, int d2, int e1, int e2, float weights[2])
Definition: DNA_ID.h:368
Definition: BKE_main.h:121
struct ARegion * region
Definition: context.c:66
float factor
Definition: ed_draw.c:73