Blender V4.3
ed_util_ops.cc File Reference
#include <cstring>
#include "DNA_space_types.h"
#include "DNA_windowmanager_types.h"
#include "BLI_fileops.h"
#include "BLI_utildefines.h"
#include "BKE_context.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_override.hh"
#include "BKE_preview_image.hh"
#include "BKE_report.hh"
#include "ED_asset.hh"
#include "ED_render.hh"
#include "ED_undo.hh"
#include "ED_util.hh"
#include "RNA_access.hh"
#include "RNA_prototypes.hh"
#include "UI_interface.hh"
#include "WM_api.hh"
#include "WM_types.hh"

Go to the source code of this file.

Functions

void ED_operatortypes_edutils ()
ID Previews
static bool lib_id_preview_editing_poll (bContext *C)
static IDlib_id_load_custom_preview_id_get (bContext *C, const wmOperator *op)
static int lib_id_load_custom_preview_exec (bContext *C, wmOperator *op)
static int lib_id_load_custom_preview_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static void ED_OT_lib_id_load_custom_preview (wmOperatorType *ot)
static bool lib_id_generate_preview_poll (bContext *C)
static int lib_id_generate_preview_exec (bContext *C, wmOperator *)
static void ED_OT_lib_id_generate_preview (wmOperatorType *ot)
static bool lib_id_generate_preview_from_object_poll (bContext *C)
static int lib_id_generate_preview_from_object_exec (bContext *C, wmOperator *)
static void ED_OT_lib_id_generate_preview_from_object (wmOperatorType *ot)
Generic ID Operators
static int lib_id_fake_user_toggle_exec (bContext *C, wmOperator *op)
static void ED_OT_lib_id_fake_user_toggle (wmOperatorType *ot)
static int lib_id_unlink_exec (bContext *C, wmOperator *op)
static void ED_OT_lib_id_unlink (wmOperatorType *ot)
static bool lib_id_override_editable_toggle_poll (bContext *C)
static int lib_id_override_editable_toggle_exec (bContext *C, wmOperator *)
static void ED_OT_lib_id_override_editable_toggle (wmOperatorType *ot)
General editor utils.
static int ed_flush_edits_exec (bContext *C, wmOperator *)
static void ED_OT_flush_edits (wmOperatorType *ot)

Detailed Description

Utility operators for UI data or for the UI to use.

Definition in file ed_util_ops.cc.

Function Documentation

◆ ed_flush_edits_exec()

int ed_flush_edits_exec ( bContext * C,
wmOperator *  )
static

Definition at line 382 of file ed_util_ops.cc.

References C, CTX_data_main(), ED_editors_flush_edits(), and OPERATOR_FINISHED.

Referenced by ED_OT_flush_edits().

◆ ED_operatortypes_edutils()

◆ ED_OT_flush_edits()

void ED_OT_flush_edits ( wmOperatorType * ot)
static

Definition at line 389 of file ed_util_ops.cc.

References ed_flush_edits_exec(), OPTYPE_INTERNAL, and ot.

Referenced by ED_operatortypes_edutils().

◆ ED_OT_lib_id_fake_user_toggle()

void ED_OT_lib_id_fake_user_toggle ( wmOperatorType * ot)
static

Definition at line 277 of file ed_util_ops.cc.

References lib_id_fake_user_toggle_exec(), OPTYPE_INTERNAL, OPTYPE_UNDO, and ot.

Referenced by ED_operatortypes_edutils().

◆ ED_OT_lib_id_generate_preview()

void ED_OT_lib_id_generate_preview ( wmOperatorType * ot)
static

◆ ED_OT_lib_id_generate_preview_from_object()

void ED_OT_lib_id_generate_preview_from_object ( wmOperatorType * ot)
static

◆ ED_OT_lib_id_load_custom_preview()

◆ ED_OT_lib_id_override_editable_toggle()

void ED_OT_lib_id_override_editable_toggle ( wmOperatorType * ot)
static

◆ ED_OT_lib_id_unlink()

void ED_OT_lib_id_unlink ( wmOperatorType * ot)
static

Definition at line 315 of file ed_util_ops.cc.

References lib_id_unlink_exec(), OPTYPE_INTERNAL, OPTYPE_UNDO, and ot.

Referenced by ED_operatortypes_edutils().

◆ lib_id_fake_user_toggle_exec()

◆ lib_id_generate_preview_exec()

◆ lib_id_generate_preview_from_object_exec()

◆ lib_id_generate_preview_from_object_poll()

bool lib_id_generate_preview_from_object_poll ( bContext * C)
static

◆ lib_id_generate_preview_poll()

◆ lib_id_load_custom_preview_exec()

◆ lib_id_load_custom_preview_id_get()

ID * lib_id_load_custom_preview_id_get ( bContext * C,
const wmOperator * op )
static

◆ lib_id_load_custom_preview_invoke()

int lib_id_load_custom_preview_invoke ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

Obtain the ID from context, and spawn a File Browser to select the preview image. The File Browser may re-use the Asset Browser under the cursor, and clear the file-list on confirmation, leading to failure to obtain the ID at that point. So get it before spawning the File Browser (store it in the operator custom data).

Definition at line 109 of file ed_util_ops.cc.

References C, wmOperator::customdata, lib_id_load_custom_preview_id_get(), and WM_operator_filesel().

Referenced by ED_OT_lib_id_load_custom_preview().

◆ lib_id_override_editable_toggle_exec()

◆ lib_id_override_editable_toggle_poll()

bool lib_id_override_editable_toggle_poll ( bContext * C)
static

◆ lib_id_preview_editing_poll()

◆ lib_id_unlink_exec()