Blender V5.0
view3d_dropboxes.cc File Reference
#include "AS_asset_representation.hh"
#include "BKE_asset.hh"
#include "BKE_context.hh"
#include "BKE_idprop.hh"
#include "BKE_layer.hh"
#include "BKE_lib_id.hh"
#include "BKE_lib_remap.hh"
#include "BKE_library.hh"
#include "BKE_object.hh"
#include "BLI_listbase.h"
#include "BLI_math_matrix.h"
#include "BLI_math_rotation.h"
#include "BLI_math_vector.h"
#include "BLT_translation.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_build.hh"
#include "DNA_ID.h"
#include "DNA_collection_types.h"
#include "DNA_screen_types.h"
#include "ED_object.hh"
#include "ED_outliner.hh"
#include "ED_screen.hh"
#include "ED_undo.hh"
#include "ED_view3d.hh"
#include "UI_resources.hh"
#include "RNA_access.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "view3d_intern.hh"

Go to the source code of this file.

Functions

static bool view3d_drop_in_main_region_poll (bContext *C, const wmEvent *event)
static ID_Type view3d_drop_id_in_main_region_poll_get_id_type (bContext *C, wmDrag *drag, const wmEvent *event)
static bool view3d_drop_id_in_main_region_poll (bContext *C, wmDrag *drag, const wmEvent *event, ID_Type id_type)
static V3DSnapCursorStateview3d_drop_snap_init (wmDropBox *drop)
static void view3d_drop_snap_exit (wmDropBox *drop, wmDrag *)
static void view3d_ob_drop_on_enter (wmDropBox *drop, wmDrag *drag)
static bool view3d_ob_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
static bool view3d_ob_drop_poll_external_asset (bContext *C, wmDrag *drag, const wmEvent *event)
static bool view3d_ob_drop_poll_local_id (bContext *C, wmDrag *drag, const wmEvent *event)
static bool view3d_collection_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
static bool view3d_collection_drop_poll_local_id (bContext *C, wmDrag *drag, const wmEvent *event)
static bool view3d_collection_drop_poll_external_asset (bContext *C, wmDrag *drag, const wmEvent *event)
static bool view3d_mat_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
static std::string view3d_mat_drop_tooltip (bContext *C, wmDrag *drag, const int xy[2], wmDropBox *)
static bool view3d_world_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
static bool view3d_object_data_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
static std::string view3d_object_data_drop_tooltip (bContext *, wmDrag *, const int[2], wmDropBox *)
static bool view3d_ima_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
static bool view3d_ima_bg_is_camera_view (bContext *C)
static bool view3d_ima_bg_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
static bool view3d_ima_empty_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
static bool view3d_geometry_nodes_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
static std::string view3d_geometry_nodes_drop_tooltip (bContext *C, wmDrag *, const int xy[2], wmDropBox *drop)
static void view3d_ob_drop_matrix_from_snap (V3DSnapCursorState *snap_state, Object *ob, float obmat_final[4][4])
static void view3d_ob_drop_copy_local_id (bContext *, wmDrag *drag, wmDropBox *drop)
static void make_selected_objects_local (Main &bmain, Scene &scene, ViewLayer &view_layer, View3D &v3d, const bool localize_parent_collections)
static void view3d_ob_drop_copy_external_asset (bContext *C, wmDrag *drag, wmDropBox *drop)
static void view3d_collection_drop_on_enter (wmDropBox *drop, wmDrag *drag)
static void view3d_collection_drop_matrix_from_snap (V3DSnapCursorState *snap_state, float r_loc[3], float r_rot[3])
static void view3d_collection_drop_copy_local_id (bContext *, wmDrag *drag, wmDropBox *drop)
static void view3d_collection_drop_copy_external_asset (bContext *C, wmDrag *drag, wmDropBox *drop)
static void view3d_id_drop_copy (bContext *C, wmDrag *drag, wmDropBox *drop)
static void view3d_geometry_nodes_drop_copy (bContext *C, wmDrag *drag, wmDropBox *drop)
static void view3d_id_drop_copy_with_type (bContext *C, wmDrag *drag, wmDropBox *drop)
static void view3d_id_path_drop_copy (bContext *C, wmDrag *drag, wmDropBox *drop)
void view3d_dropboxes ()

Function Documentation

◆ make_selected_objects_local()

void make_selected_objects_local ( Main & bmain,
Scene & scene,
ViewLayer & view_layer,
View3D & v3d,
const bool localize_parent_collections )
static

◆ view3d_collection_drop_copy_external_asset()

◆ view3d_collection_drop_copy_local_id()

◆ view3d_collection_drop_matrix_from_snap()

◆ view3d_collection_drop_on_enter()

◆ view3d_collection_drop_poll()

bool view3d_collection_drop_poll ( bContext * C,
wmDrag * drag,
const wmEvent * event )
static

◆ view3d_collection_drop_poll_external_asset()

bool view3d_collection_drop_poll_external_asset ( bContext * C,
wmDrag * drag,
const wmEvent * event )
static

Definition at line 182 of file view3d_dropboxes.cc.

References C, wmDrag::type, view3d_collection_drop_poll(), and WM_DRAG_ASSET.

Referenced by view3d_dropboxes().

◆ view3d_collection_drop_poll_local_id()

bool view3d_collection_drop_poll_local_id ( bContext * C,
wmDrag * drag,
const wmEvent * event )
static

Definition at line 174 of file view3d_dropboxes.cc.

References C, wmDrag::type, view3d_collection_drop_poll(), and WM_DRAG_ID.

Referenced by view3d_dropboxes().

◆ view3d_drop_id_in_main_region_poll()

bool view3d_drop_id_in_main_region_poll ( bContext * C,
wmDrag * drag,
const wmEvent * event,
ID_Type id_type )
static

◆ view3d_drop_id_in_main_region_poll_get_id_type()

◆ view3d_drop_in_main_region_poll()

bool view3d_drop_in_main_region_poll ( bContext * C,
const wmEvent * event )
static

◆ view3d_drop_snap_exit()

void view3d_drop_snap_exit ( wmDropBox * drop,
wmDrag *  )
static

Definition at line 106 of file view3d_dropboxes.cc.

References wmDropBox::draw_data, ED_view3d_cursor_snap_state_free(), and state.

Referenced by view3d_dropboxes().

◆ view3d_drop_snap_init()

V3DSnapCursorState * view3d_drop_snap_init ( wmDropBox * drop)
static

◆ view3d_dropboxes()

◆ view3d_geometry_nodes_drop_copy()

void view3d_geometry_nodes_drop_copy ( bContext * C,
wmDrag * drag,
wmDropBox * drop )
static

◆ view3d_geometry_nodes_drop_poll()

◆ view3d_geometry_nodes_drop_tooltip()

std::string view3d_geometry_nodes_drop_tooltip ( bContext * C,
wmDrag * ,
const int xy[2],
wmDropBox * drop )
static

◆ view3d_id_drop_copy()

void view3d_id_drop_copy ( bContext * C,
wmDrag * drag,
wmDropBox * drop )
static

◆ view3d_id_drop_copy_with_type()

void view3d_id_drop_copy_with_type ( bContext * C,
wmDrag * drag,
wmDropBox * drop )
static

◆ view3d_id_path_drop_copy()

void view3d_id_path_drop_copy ( bContext * C,
wmDrag * drag,
wmDropBox * drop )
static

◆ view3d_ima_bg_drop_poll()

bool view3d_ima_bg_drop_poll ( bContext * C,
wmDrag * drag,
const wmEvent * event )
static

◆ view3d_ima_bg_is_camera_view()

bool view3d_ima_bg_is_camera_view ( bContext * C)
static

◆ view3d_ima_drop_poll()

bool view3d_ima_drop_poll ( bContext * C,
wmDrag * drag,
const wmEvent * event )
static

◆ view3d_ima_empty_drop_poll()

bool view3d_ima_empty_drop_poll ( bContext * C,
wmDrag * drag,
const wmEvent * event )
static

◆ view3d_mat_drop_poll()

bool view3d_mat_drop_poll ( bContext * C,
wmDrag * drag,
const wmEvent * event )
static

◆ view3d_mat_drop_tooltip()

std::string view3d_mat_drop_tooltip ( bContext * C,
wmDrag * drag,
const int xy[2],
wmDropBox *  )
static

◆ view3d_ob_drop_copy_external_asset()

◆ view3d_ob_drop_copy_local_id()

◆ view3d_ob_drop_matrix_from_snap()

◆ view3d_ob_drop_on_enter()

◆ view3d_ob_drop_poll()

bool view3d_ob_drop_poll ( bContext * C,
wmDrag * drag,
const wmEvent * event )
static

◆ view3d_ob_drop_poll_external_asset()

bool view3d_ob_drop_poll_external_asset ( bContext * C,
wmDrag * drag,
const wmEvent * event )
static

Definition at line 149 of file view3d_dropboxes.cc.

References C, wmDrag::type, view3d_ob_drop_poll(), and WM_DRAG_ASSET.

Referenced by view3d_dropboxes().

◆ view3d_ob_drop_poll_local_id()

bool view3d_ob_drop_poll_local_id ( bContext * C,
wmDrag * drag,
const wmEvent * event )
static
Note
the term local here refers to not being an external asset, poll will succeed for linked library objects.

Definition at line 161 of file view3d_dropboxes.cc.

References C, wmDrag::type, view3d_ob_drop_poll(), and WM_DRAG_ID.

Referenced by view3d_dropboxes().

◆ view3d_object_data_drop_poll()

bool view3d_object_data_drop_poll ( bContext * C,
wmDrag * drag,
const wmEvent * event )
static

◆ view3d_object_data_drop_tooltip()

std::string view3d_object_data_drop_tooltip ( bContext * ,
wmDrag * ,
const int [2],
wmDropBox *  )
static

Definition at line 231 of file view3d_dropboxes.cc.

References TIP_.

Referenced by view3d_dropboxes().

◆ view3d_world_drop_poll()

bool view3d_world_drop_poll ( bContext * C,
wmDrag * drag,
const wmEvent * event )
static

Definition at line 217 of file view3d_dropboxes.cc.

References C, ID_WO, and view3d_drop_id_in_main_region_poll().

Referenced by view3d_dropboxes().