43#include "RNA_prototypes.hh"
83 ID *
id =
static_cast<ID *
>(
ptr.data);
97 const char *msg_single =
98 "Data-block does not support asset operations - must be "
100 const char *msg_multiple =
101 "No data-block selected that supports asset operations - select at least "
103 return is_single ? msg_single : msg_multiple;
118 int tot_already_asset = 0;
119 ID *last_id =
nullptr;
130 ID *
id =
static_cast<ID *
>(
ptr.data);
132 stats.tot_already_asset++;
147 return stats.tot_created > 0;
154 if (stats.tot_already_asset > 0) {
157 "Selected data-blocks are already assets (or do not support use as assets)");
162 "No data-blocks to create assets for found (or do not support use as assets)");
166 else if (stats.tot_created == 1) {
168 BKE_reportf(&reports,
RPT_INFO,
"Data-block '%s' is now an asset", stats.last_id->name + 2);
180 mark_helper(*
C, ids);
207 ot->name =
"Mark as Asset";
209 "Enable easier reuse of selected data-blocks through the Asset Browser, with the help of "
210 "customizable metadata (like previews, descriptions and tags)";
211 ot->idname =
"ASSET_OT_mark";
228 ot->name =
"Mark as Single Asset";
230 "Enable easier reuse of a data-block through the Asset Browser, with the help of "
231 "customizable metadata (like previews, descriptions and tags)";
232 ot->idname =
"ASSET_OT_mark_single";
247 const bool set_fake_user_;
260 ID *last_id =
nullptr;
271 ID *
id =
static_cast<ID *
>(
ptr.data);
280 if (set_fake_user_) {
297 "No asset data-blocks from the current file selected (assets must be stored in "
298 "the current file to be able to edit or clear them)");
304 else if (stats.tot_cleared == 1) {
307 &reports,
RPT_INFO,
"Data-block '%s' is not an asset anymore", stats.last_id->name + 2);
310 BKE_reportf(&reports,
RPT_INFO,
"%i data-blocks are not assets anymore", stats.tot_cleared);
316 return stats.tot_cleared > 0;
343 const char *msg_single =
N_(
"Data-block is not marked as asset");
344 const char *msg_multiple =
N_(
"No data-block selected that is marked as asset");
361 if (!set_fake_user) {
365 "Delete all asset metadata, turning the selected asset data-blocks back into normal "
366 "data-blocks, and set Fake User to ensure the data-blocks will still be saved");
374 ot->name =
"Clear Asset";
376 "Delete all asset metadata and turn the selected asset data-blocks back into normal "
379 ot->idname =
"ASSET_OT_clear";
394 "Ensure the data-block is saved, even when it is no longer marked as asset");
399 ot->name =
"Clear Single Asset";
401 "Delete all asset metadata and turn the asset data-block back into a normal data-block";
403 ot->idname =
"ASSET_OT_clear_single";
418 "Ensure the data-block is saved, even when it is no longer marked as asset");
453 ot->name =
"Refresh Asset Library";
454 ot->description =
"Reread assets and asset catalogs from the asset library on disk";
455 ot->idname =
"ASSET_OT_library_refresh";
471 if (!asset_library) {
488 asset_library,
DATA_(
"Catalog"), parent_path);
503 ot->name =
"New Asset Catalog";
504 ot->description =
"Create a new catalog to put assets in";
505 ot->idname =
"ASSET_OT_catalog_new";
516 "Optional path defining the location to put the new catalog under");
540 ot->name =
"Delete Asset Catalog";
542 "Remove an asset catalog from the asset library (contained assets will not be affected and "
543 "show up as unassigned)";
544 ot->idname =
"ASSET_OT_catalog_delete";
550 RNA_def_string(
ot->srna,
"catalog_id",
nullptr, 0,
"Catalog ID",
"ID of the catalog to delete");
571 if (!catalog_service) {
575 catalog_service->
undo();
589 ot->name =
"Undo Catalog Edits";
590 ot->description =
"Undo the last edit to the asset catalogs";
591 ot->idname =
"ASSET_OT_catalog_undo";
601 if (!catalog_service) {
605 catalog_service->
redo();
619 ot->name =
"Redo Catalog Edits";
620 ot->description =
"Redo the last undone edit to the asset catalogs";
621 ot->idname =
"ASSET_OT_catalog_redo";
631 if (!catalog_service) {
647 ot->name =
"Store undo snapshot for asset catalog edits";
648 ot->description =
"Store the current state of the asset catalogs in the undo buffer";
649 ot->idname =
"ASSET_OT_catalog_undo_push";
697 ot->name =
"Save Asset Catalogs";
699 "Make any edits to any catalogs permanent by writing the current set up to the asset "
701 ot->idname =
"ASSET_OT_catalogs_save";
720 if (sfile ==
nullptr) {
771 const size_t len = strlen(filepath);
802 return operator_result;
809 R
"(Saved "%s" to asset library "%s")",
833 ot->name =
"Copy to Asset Library";
835 "Copy the current .blend file into an Asset Library. Only works on standalone .blend files "
836 "(i.e. when no other files are referenced)";
837 ot->idname =
"ASSET_OT_bundle_install";
862 return fnmatch(
"*_bundle.blend", bmain->
filepath, FNM_CASEFOLD) == 0;
867 const int enum_value =
RNA_enum_get(op->
ptr,
"asset_library_reference");
891 if (
lib ==
nullptr) {
897 if (blend_filename ==
nullptr || blend_filename[0] ==
'\0') {
916 const char *path_src)
958 "Unable to copy bundle due to external dependency: \"%s\"",
967 "Unable to copy bundle due to %zu external dependencies; more details on the console",
969 printf(
"Unable to copy bundle due to %zu external dependencies:\n",
972 printf(
" \"%s\"\n", path.c_str());
998 std::swap(p1.x, p2.x);
1001 std::swap(p1.y, p2.y);
1009 return {
clamp_i(point.x, 0, win_size.x - 1),
clamp_i(point.y, 0, win_size.y - 1)};
1017 const int2 delta = p2 - p1;
1020 const int dir_x = (delta.x >= 0) ? 1 : -1;
1021 const int dir_y = (delta.y >= 0) ? 1 : -1;
1023 const int size_x = std::abs(delta.x);
1024 const int size_y = std::abs(delta.y);
1025 int square_size = std::max(size_x, size_y);
1029 const int max_size_x = (dir_x > 0) ? win_size.x - p1.x - 1 : p1.x;
1030 const int max_size_y = (dir_y > 0) ? win_size.y - p1.y - 1 : p1.y;
1033 square_size = std::min(square_size, std::min(max_size_x, max_size_y));
1036 p2.x = p1.x + dir_x * square_size;
1037 p2.y = p1.y + dir_y * square_size;
1047 int width = image_buffer->
x;
1048 int height = image_buffer->
y;
1058 if (max_size == 0) {
1066 if (image_buffer->
x > image_buffer->
y) {
1068 height = image_buffer->
y * (width /
float(image_buffer->
x));
1070 else if (image_buffer->
y > image_buffer->
x) {
1072 width = image_buffer->
x * (height /
float(image_buffer->
y));
1075 width = height = max_size;
1094 int dumprect_size[2];
1099 rcti safe_rect = crop_rect;
1117 return image_buffer;
1140 constexpr int min_side = 16;
1141 if (p2.x - p1.x < min_side || p2.y - p1.y < min_side) {
1143 op->
reports,
RPT_ERROR,
"Screenshot cannot be smaller than %i pixels on a side", min_side);
1147 ImBuf *image_buffer;
1155 bool render_offscreen =
false;
1161 const char *engine_name = scene->
r.
engine;
1162 render_offscreen =
STR_ELEM(engine_name,
1168 render_offscreen =
true;
1171 if (render_offscreen) {
1179 char err_out[256] =
"unknown";
1203 const rcti crop_rect = {p1.x, p2.x, p1.y, p2.y};
1205 if (!image_buffer) {
1212 BLI_assert_msg(asset_handle !=
nullptr,
"This is ensured by poll");
1217 *bmain, asset_handle->get_id_type(), asset_reference);
1252 if (
data->force_square) {
1259 const rctf screenshot_rect = {
1263 float4 mask_color = {1, 1, 1, 0.25};
1265 const rctf mask_rect_bottom = {0,
float(win_size.x), 0, screenshot_rect.
ymin};
1267 const rctf mask_rect_top = {0,
float(win_size.x), screenshot_rect.
ymax,
float(win_size.y)};
1269 const rctf mask_rect_left = {
1270 0, screenshot_rect.
xmin, screenshot_rect.
ymin, screenshot_rect.
ymax};
1272 const rctf mask_rect_right = {
1273 screenshot_rect.
xmax,
float(win_size.x), screenshot_rect.
ymin, screenshot_rect.
ymax};
1304 const int2 screen_space_cursor = {
1308 switch (event->
type) {
1310 switch (event->
val) {
1312 data->is_mouse_down =
true;
1313 data->crossed_threshold =
false;
1314 data->drag_start = screen_space_cursor;
1317 data->is_mouse_down =
false;
1343 switch (event->
val) {
1345 data->shift_area =
true;
1348 data->shift_area =
false;
1359 switch (event->
val) {
1361 data->force_square =
false;
1364 data->force_square =
true;
1374 if (
data->shift_area) {
1375 const int2 delta = screen_space_cursor -
data->last_cursor;
1376 const int2 new_p1 =
data->p1 + delta;
1377 const int2 new_p2 =
data->p2 + delta;
1379 auto is_within_window = [win](
const int2 &pt) ->
bool {
1381 return pt.x >= 0 && pt.x < win_size.x && pt.y >= 0 && pt.y < win_size.y;
1385 if (is_within_window(new_p1) && is_within_window(new_p2)) {
1390 else if (
data->is_mouse_down) {
1393 if (!
data->crossed_threshold) {
1398 data->crossed_threshold =
true;
1403 if (
data->crossed_threshold) {
1409 data->last_cursor = screen_space_cursor;
1418 if (
data->is_mouse_down) {
1419 status.item(
IFACE_(
"Cancel"), ICON_EVENT_ESC, ICON_MOUSE_RMB);
1424 status.item(
IFACE_(
"Confirm"), ICON_MOUSE_LMB, ICON_EVENT_RETURN);
1426 status.item(
IFACE_(
"Unlock Aspect Ratio"), ICON_EVENT_SHIFT);
1441 data->is_mouse_down =
false;
1445 data->shift_area =
false;
1446 data->crossed_threshold =
false;
1462 if (!asset_handle) {
1466 if (asset_handle->is_local_id()) {
1470 std::string lib_path = asset_handle->full_library_path();
1483 ot->name =
"Capture Screenshot Preview";
1484 ot->description =
"Capture a screenshot to use as a preview for the selected asset";
1485 ot->idname =
"ASSET_OT_screenshot_preview";
1499 "First point of the screenshot in screenspace",
1509 "Second point of the screenshot in screenspace",
1516 "If enabled, the screenshot will have the same height as width");
bool AS_asset_library_has_any_unsaved_catalogs()
Main runtime representation of an asset.
#define BLENDER_ASSET_FILE_SUFFIX
@ BKE_BPATH_TRAVERSE_SKIP_WEAK_REFERENCES
@ BKE_BPATH_FOREACH_PATH_SKIP_PACKED
@ BKE_BPATH_FOREACH_PATH_SKIP_MULTIFILE
void BKE_bpath_foreach_path_main(BPathForeachPathData *bpath_data)
bScreen * CTX_wm_screen(const bContext *C)
SpaceFile * CTX_wm_space_file(const bContext *C)
void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
const AssetLibraryReference * CTX_wm_asset_library_ref(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
class blender::asset_system::AssetRepresentation * CTX_wm_asset(const bContext *C)
Main * CTX_data_main(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
#define ICON_RENDER_DEFAULT_HEIGHT
void id_fake_user_set(ID *id)
struct bUserAssetLibrary * BKE_preferences_asset_library_find_index(const struct UserDef *userdef, int index) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
struct bUserAssetLibrary * BKE_preferences_asset_library_containing_path(const struct UserDef *userdef, const char *path) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
void BKE_previewimg_ensure(PreviewImage *prv, int size)
PreviewImage * BKE_previewimg_id_ensure(ID *id)
void BKE_previewimg_clear(PreviewImage *prv)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
ARegion * BKE_area_find_region_type(const ScrArea *area, int region_type)
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
MINLINE int clamp_i(int value, int min, int max)
void void void const char * BLI_path_basename(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
bool BLI_path_contains(const char *container_path, const char *containee_path) ATTR_NONNULL(1
#define BLI_path_join(...)
bool BLI_rcti_is_valid(const struct rcti *rect)
bool BLI_uuid_parse_string(bUUID *uuid, const char *buffer) ATTR_NONNULL()
struct AssetRepresentationHandle AssetRepresentationHandle
#define ED_ASSET_TYPE_IDS_NON_EXPERIMENTAL_UI_STRING
void ED_fileselect_activate_asset_catalog(const SpaceFile *sfile, bUUID catalog_id)
bool ED_fileselect_is_file_browser(const SpaceFile *sfile)
bool ED_fileselect_is_local_asset_library(const SpaceFile *sfile)
blender::asset_system::AssetLibrary * ED_fileselect_active_asset_library_get(const SpaceFile *sfile)
void ED_preview_kill_jobs_for_id(wmWindowManager *wm, const ID *id)
ScrArea * ED_area_find_under_cursor(const bContext *C, int spacetype, const int event_xy[2])
bool ED_operator_asset_browsing_active(bContext *C)
void ED_workspace_status_text(bContext *C, const char *str)
blender::Vector< PointerRNA > ED_operator_single_id_from_context_as_vec(const bContext *C)
blender::Vector< PointerRNA > ED_operator_get_ids_from_context_as_vec(const bContext *C)
ImBuf * ED_view3d_draw_offscreen_imbuf(Depsgraph *depsgraph, Scene *scene, eDrawType drawtype, View3D *v3d, ARegion *region, int sizex, int sizey, eImBufFlags imbuf_flag, int alpha_mode, const char *viewname, bool restore_rv3d_mats, GPUOffScreen *ofs, GPUViewport *viewport, char err_out[256])
void IMB_rect_crop(ImBuf *ibuf, const rcti *crop)
void IMB_freeImBuf(ImBuf *ibuf)
ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
ImBuf * IMB_scale_into_new(const ImBuf *ibuf, unsigned int newx, unsigned int newy, IMBScaleFilter filter, bool threaded=true)
void IMB_assign_byte_buffer(ImBuf *ibuf, uint8_t *buffer_data, ImBufOwnership ownership)
#define PREVIEW_RENDER_LARGE_HEIGHT
void UI_draw_roundbox_aa(const rctf *rect, bool filled, float rad, const float color[4])
void UI_GetThemeColor4fv(int colorid, float col[4])
#define ND_ASSET_LIST_READING
#define ND_SPACE_ASSET_PARAMS
#define ND_ASSET_CATALOGS
BMesh const char void * data
constexpr int64_t size() const
bool is_undo_possbile() const
void prepare_to_merge_on_write()
bool is_redo_possbile() const
const CatalogID catalog_id
AssetCatalogService & catalog_service() const
void reportResults(const bContext *C, ReportList &reports) const
void operator()(Span< PointerRNA > ids)
AssetClearHelper(const bool set_fake_user)
bool wasSuccessful() const
bool wasSuccessful() const
void operator()(const bContext &C, Span< PointerRNA > ids)
void reportResults(ReportList &reports) const
void * MEM_callocN(size_t len, const char *str)
void * MEM_dupallocN(const void *vmemh)
void MEM_freeN(void *vmemh)
ID * asset_edit_id_from_weak_reference(Main &global_main, ID_Type id_type, const AssetWeakReference &weak_ref)
bool asset_edit_id_is_writable(const ID &id)
bool asset_edit_id_save(Main &global_main, const ID &id, ReportList &reports)
void storage_tag_main_data_dirty()
bool has_asset_browser_storage_for_library(const AssetLibraryReference *library_reference, const bContext *C)
void clear(const AssetLibraryReference *library_reference, const bContext *C)
bool has_list_storage_for_library(const AssetLibraryReference *library_reference)
static bool asset_catalogs_save_poll(bContext *C)
static bool could_be_asset_bundle(const Main *bmain)
void catalog_remove(asset_system::AssetLibrary *library, const asset_system::CatalogID &catalog_id)
static void generate_previewimg_from_buffer(ID *id, const ImBuf *image_buffer)
bool catalogs_read_only(const asset_system::AssetLibrary &library)
static bool asset_catalog_undo_push_poll(bContext *C)
static bool external_file_check_callback(BPathForeachPathData *bpath_data, char *, size_t, const char *path_src)
static void ASSET_OT_clear(wmOperatorType *ot)
static wmOperatorStatus asset_catalogs_save_exec(bContext *C, wmOperator *)
void catalogs_save_from_main_path(asset_system::AssetLibrary *library, const Main *bmain)
static void ASSET_OT_catalog_redo(wmOperatorType *ot)
AssetLibraryReference library_reference_from_enum_value(int value)
static std::string asset_clear_get_description(bContext *, wmOperatorType *, PointerRNA *ptr)
static void ASSET_OT_catalog_new(wmOperatorType *ot)
static bool asset_catalog_redo_poll(bContext *C)
static void ASSET_OT_clear_single(wmOperatorType *ot)
static void ASSET_OT_catalog_delete(wmOperatorType *ot)
static wmOperatorStatus asset_bundle_install_invoke(bContext *C, wmOperator *op, const wmEvent *)
static IDVecStats asset_operation_get_id_vec_stats_from_ids(const Span< PointerRNA > id_pointers)
asset_system::AssetCatalog * catalog_add(asset_system::AssetLibrary *library, StringRefNull name, StringRef parent_path=nullptr)
static void ASSET_OT_mark_single(wmOperatorType *ot)
static bool is_contained_in_selected_asset_library(wmOperator *op, const char *filepath)
static bool asset_clear_poll(bContext *C, const Span< PointerRNA > ids)
static int2 clamp_point_to_window(const int2 &point, const wmWindow *window)
static wmOperatorStatus asset_catalog_new_exec(bContext *C, wmOperator *op)
static bool asset_bundle_install_poll(bContext *C)
void operatortypes_asset()
static void screenshot_preview_draw(const wmWindow *window, void *operator_data)
const EnumPropertyItem * custom_libraries_rna_enum_itemf()
static void ASSET_OT_catalog_undo_push(wmOperatorType *ot)
static bool set_filepath_for_asset_lib(const Main *bmain, wmOperator *op)
static wmOperatorStatus screenshot_preview_exec(bContext *C, wmOperator *op)
static wmOperatorStatus asset_catalog_redo_exec(bContext *C, wmOperator *)
static ImBuf * take_screenshot_crop(bContext *C, const rcti &crop_rect)
static wmOperatorStatus screenshot_preview_modal(bContext *C, wmOperator *op, const wmEvent *event)
void generate_preview(const bContext *C, ID *id)
constexpr int DRAG_THRESHOLD
static void ASSET_OT_bundle_install(wmOperatorType *ot)
static bool screenshot_preview_poll(bContext *C)
static const char * asset_operation_unsupported_type_msg(const bool is_single)
static bool asset_catalog_undo_poll(bContext *C)
static wmOperatorStatus asset_library_refresh_exec(bContext *C, wmOperator *)
static void screenshot_preview_exit(bContext *C, wmOperator *op)
static bool asset_mark_poll(bContext *C, const Span< PointerRNA > ids)
static void ASSET_OT_mark(wmOperatorType *ot)
static wmOperatorStatus asset_catalog_delete_exec(bContext *C, wmOperator *op)
static void ASSET_OT_catalog_undo(wmOperatorType *ot)
static bool asset_library_refresh_poll(bContext *C)
void refresh_asset_library_from_asset(const bContext *C, const blender::asset_system::AssetRepresentation &asset)
static asset_system::AssetCatalogService * get_catalog_service(bContext *C)
static void ASSET_OT_screenshot_preview(wmOperatorType *ot)
static void sort_points(int2 &p1, int2 &p2)
static wmOperatorStatus asset_catalog_undo_exec(bContext *C, wmOperator *)
static wmOperatorStatus screenshot_preview_invoke(bContext *C, wmOperator *op, const wmEvent *)
static void square_points_clamp_to_window(const int2 &p1, int2 &p2, const wmWindow *window)
static const bUserAssetLibrary * selected_asset_library(wmOperator *op)
static wmOperatorStatus asset_clear_exec(const bContext *C, const wmOperator *op, const Span< PointerRNA > ids)
static wmOperatorStatus asset_bundle_install_exec(bContext *C, wmOperator *op)
static void screenshot_area_transfer_to_rna(wmOperator *op, ScreenshotOperatorData *data)
static wmOperatorStatus asset_mark_exec(const bContext *C, const wmOperator *op, const Span< PointerRNA > ids)
static void ASSET_OT_library_refresh(wmOperatorType *ot)
bool id_type_is_supported(const ID *id)
static void ASSET_OT_catalogs_save(wmOperatorType *ot)
static bool has_external_files(Main *bmain, ReportList *reports)
static wmOperatorStatus asset_catalog_undo_push_exec(bContext *C, wmOperator *)
static const EnumPropertyItem * rna_asset_library_reference_itemf(bContext *, PointerRNA *, PropertyRNA *, bool *r_free)
static bool asset_catalog_operator_poll(bContext *C)
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
void RNA_int_set_array(PointerRNA *ptr, const char *name, const int *values)
void RNA_int_get_array(PointerRNA *ptr, const char *name, int *values)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
bool RNA_struct_is_ID(const StructRNA *type)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_int_array(StructOrFunctionRNA *cont_, const char *identifier, const int len, const int *default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
const char * RE_engine_id_BLENDER_EEVEE_NEXT
const char * RE_engine_id_BLENDER_WORKBENCH
const char * RE_engine_id_BLENDER_EEVEE
struct AssetMetaData * asset_data
ImBufByteBuffer byte_buffer
Set< std::string > external_files
struct ReportList * reports
static DynamicLibrary lib
void WM_cursor_modal_set(wmWindow *win, int val)
void WM_cursor_modal_restore(wmWindow *win)
void WM_cursor_wait(bool val)
uint8_t * WM_window_pixels_read(bContext *C, wmWindow *win, int r_size[2])
void * WM_draw_cb_activate(wmWindow *win, void(*draw)(const wmWindow *win, void *customdata), void *customdata)
void WM_draw_cb_exit(wmWindow *win, void *handle)
void WM_event_add_fileselect(bContext *C, wmOperator *op)
void WM_event_add_notifier_ex(wmWindowManager *wm, const wmWindow *win, uint type, void *reference)
void WM_main_add_notifier(uint type, void *reference)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmOperatorStatus WM_operator_name_call(bContext *C, const char *opstring, blender::wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
void WM_operator_properties_filesel(wmOperatorType *ot, const int filter, const short type, const eFileSel_Action action, const eFileSel_Flag flag, const short display, const short sort)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
bool WM_operator_winactive(bContext *C)
blender::int2 WM_window_native_pixel_size(const wmWindow *win)