Blender  V3.3
Functions
ed_util.c File Reference
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLT_translation.h"
#include "BKE_collection.h"
#include "BKE_global.h"
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_lib_remap.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_multires.h"
#include "BKE_object.h"
#include "BKE_packedFile.h"
#include "BKE_paint.h"
#include "BKE_screen.h"
#include "BKE_undo_system.h"
#include "DEG_depsgraph.h"
#include "DNA_gpencil_types.h"
#include "ED_armature.h"
#include "ED_asset.h"
#include "ED_gpencil.h"
#include "ED_image.h"
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_paint.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_util.h"
#include "GPU_immediate.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "WM_api.h"
#include "WM_types.h"

Go to the source code of this file.

Functions

void ED_editors_init_for_undo (Main *bmain)
 
void ED_editors_init (bContext *C)
 
void ED_editors_exit (Main *bmain, bool do_undo_system)
 
bool ED_editors_flush_edits_for_object_ex (Main *bmain, Object *ob, bool for_render, bool check_needs_flush)
 
bool ED_editors_flush_edits_for_object (Main *bmain, Object *ob)
 
bool ED_editors_flush_edits_ex (Main *bmain, bool for_render, bool check_needs_flush)
 
bool ED_editors_flush_edits (Main *bmain)
 
void apply_keyb_grid (bool shift, bool ctrl, float *val, float fac1, float fac2, float fac3, int invert)
 
void unpack_menu (bContext *C, const char *opname, const char *id_name, const char *abs_name, const char *folder, struct PackedFile *pf)
 
void ED_spacedata_id_remap (struct ScrArea *area, struct SpaceLink *sl, const struct IDRemapper *mappings)
 
void ED_spacedata_id_remap_single (struct ScrArea *area, struct SpaceLink *sl, ID *old_id, ID *new_id)
 

Function Documentation

◆ apply_keyb_grid()

void apply_keyb_grid ( bool  shift,
bool  ctrl,
float val,
float  fac1,
float  fac2,
float  fac3,
int  invert 
)

Now only used in 2D spaces, like time, f-curve, NLA, image, etc.

Note
Shift/Control are not configurable key-bindings.

Definition at line 332 of file ed_util.c.

References floorf, and invert().

Referenced by ed_marker_move_modal().

◆ ED_editors_exit()

void ED_editors_exit ( struct Main bmain,
bool  do_undo_system 
)

◆ ED_editors_flush_edits()

bool ED_editors_flush_edits ( Main bmain)

◆ ED_editors_flush_edits_ex()

bool ED_editors_flush_edits_ex ( struct Main bmain,
bool  for_render,
bool  check_needs_flush 
)

Flush any temp data from object editing to DNA before writing files, rendering, copying, etc.

Definition at line 308 of file ed_util.c.

References ED_editors_flush_edits_for_object_ex(), ListBase::first, Object::id, Main::is_memfile_undo_flush_needed, ID::next, and Main::objects.

Referenced by ED_editors_flush_edits(), memfile_undosys_step_encode(), and screen_render_invoke().

◆ ED_editors_flush_edits_for_object()

bool ED_editors_flush_edits_for_object ( Main bmain,
Object ob 
)

Definition at line 303 of file ed_util.c.

References ED_editors_flush_edits_for_object_ex().

◆ ED_editors_flush_edits_for_object_ex()

bool ED_editors_flush_edits_for_object_ex ( Main bmain,
Object ob,
bool  for_render,
bool  check_needs_flush 
)

◆ ED_editors_init()

void ED_editors_init ( bContext C)

◆ ED_editors_init_for_undo()

void ED_editors_init_for_undo ( Main bmain)

◆ ED_spacedata_id_remap()

void ED_spacedata_id_remap ( struct ScrArea area,
struct SpaceLink sl,
const struct IDRemapper *  mappings 
)

◆ ED_spacedata_id_remap_single()

void ED_spacedata_id_remap_single ( struct ScrArea area,
struct SpaceLink sl,
struct ID old_id,
struct ID new_id 
)

Use to free ID references within runtime data (stored outside of DNA)

Parameters
new_idmay be NULL to unlink old_id.

Definition at line 462 of file ed_util.c.

References blender::compositor::area(), BKE_id_remapper_add(), BKE_id_remapper_create(), BKE_id_remapper_free(), BKE_spacetype_from_id(), SpaceLink::spacetype, and usdtokens::st().

Referenced by WM_init().

◆ unpack_menu()

void unpack_menu ( bContext C,
const char *  opname,
const char *  id_name,
const char *  abs_name,
const char *  folder,
struct PackedFile pf 
)