Blender V4.3
outliner_dragdrop.cc File Reference
#include <cstring>
#include "MEM_guardedalloc.h"
#include "DNA_collection_types.h"
#include "DNA_material_types.h"
#include "DNA_object_types.h"
#include "DNA_space_types.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "BLT_translation.hh"
#include "BKE_collection.hh"
#include "BKE_context.hh"
#include "BKE_layer.hh"
#include "BKE_lib_id.hh"
#include "BKE_main.hh"
#include "BKE_material.h"
#include "BKE_object.hh"
#include "BKE_report.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_build.hh"
#include "ED_object.hh"
#include "ED_outliner.hh"
#include "ED_screen.hh"
#include "UI_interface.hh"
#include "UI_view2d.hh"
#include "RNA_access.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "outliner_intern.hh"

Go to the source code of this file.

Classes

struct  blender::ed::outliner::StackDropData
 
struct  blender::ed::outliner::CollectionDrop
 

Namespaces

namespace  blender
 
namespace  blender::ed
 
namespace  blender::ed::outliner
 

Functions

Collection Drop Operator
static Collectionblender::ed::outliner::collection_parent_from_ID (ID *id)
 
static bool blender::ed::outliner::collection_drop_init (bContext *C, wmDrag *drag, const int xy[2], CollectionDrop *data)
 
static bool blender::ed::outliner::collection_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
 
static std::string blender::ed::outliner::collection_drop_tooltip (bContext *C, wmDrag *drag, const int xy[2], wmDropBox *)
 
static int blender::ed::outliner::collection_drop_invoke (bContext *C, wmOperator *, const wmEvent *event)
 
void blender::ed::outliner::OUTLINER_OT_collection_drop (wmOperatorType *ot)
 
Parent Drop Operator
static bool blender::ed::outliner::parent_drop_allowed (TreeElement *te, Object *potential_child)
 
static bool blender::ed::outliner::allow_parenting_without_modifier_key (SpaceOutliner *space_outliner)
 
static bool blender::ed::outliner::parent_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
 
static void blender::ed::outliner::parent_drop_set_parents (bContext *C, ReportList *reports, wmDragID *drag, Object *parent, short parent_type, const bool keep_transform)
 
static int blender::ed::outliner::parent_drop_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void blender::ed::outliner::OUTLINER_OT_parent_drop (wmOperatorType *ot)
 
Parent Clear Operator
static bool blender::ed::outliner::parent_clear_poll (bContext *C, wmDrag *drag, const wmEvent *event)
 
static int blender::ed::outliner::parent_clear_invoke (bContext *C, wmOperator *, const wmEvent *event)
 
void blender::ed::outliner::OUTLINER_OT_parent_clear (wmOperatorType *ot)
 
Scene Drop Operator
static bool blender::ed::outliner::scene_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
 
static int blender::ed::outliner::scene_drop_invoke (bContext *C, wmOperator *, const wmEvent *event)
 
void blender::ed::outliner::OUTLINER_OT_scene_drop (wmOperatorType *ot)
 
Material Drop Operator
static bool blender::ed::outliner::material_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
 
static int blender::ed::outliner::material_drop_invoke (bContext *C, wmOperator *, const wmEvent *event)
 
void blender::ed::outliner::OUTLINER_OT_material_drop (wmOperatorType *ot)
 
Drop Boxes
void blender::ed::outliner::outliner_dropboxes ()
 

Outliner Drag Operator

#define OUTLINER_DRAG_SCOLL_OUTSIDE_PAD   7 /* In UI units */
 
static TreeElementblender::ed::outliner::outliner_item_drag_element_find (SpaceOutliner *space_outliner, ARegion *region, const wmEvent *event)
 
static int blender::ed::outliner::outliner_item_drag_drop_invoke (bContext *C, wmOperator *, const wmEvent *event)
 
void blender::ed::outliner::OUTLINER_OT_item_drag_drop (wmOperatorType *ot)
 

Data Stack Drop Operator

A generic operator to allow drag and drop for modifiers, constraints, and shader effects which all share the same UI stack layout.

The following operations are allowed:

  • Reordering within an object.
  • Copying a single modifier/constraint/effect to another object.
  • Copying (linking) an object's modifiers/constraints/effects to another.
enum  blender::ed::outliner::eDataStackDropAction { blender::ed::outliner::DATA_STACK_DROP_REORDER , blender::ed::outliner::DATA_STACK_DROP_COPY , blender::ed::outliner::DATA_STACK_DROP_LINK }
 
static void blender::ed::outliner::datastack_drop_data_init (wmDrag *drag, Object *ob, bPoseChannel *pchan, TreeElement *te, TreeStoreElem *tselem, void *directdata)
 
static bool blender::ed::outliner::datastack_drop_init (bContext *C, const wmEvent *event, StackDropData *drop_data)
 
static bool blender::ed::outliner::datastack_drop_are_types_valid (StackDropData *drop_data)
 
static bool blender::ed::outliner::datastack_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
 
static std::string blender::ed::outliner::datastack_drop_tooltip (bContext *, wmDrag *drag, const int[2], wmDropBox *)
 
static void blender::ed::outliner::datastack_drop_link (bContext *C, StackDropData *drop_data)
 
static void blender::ed::outliner::datastack_drop_copy (bContext *C, StackDropData *drop_data)
 
static void blender::ed::outliner::datastack_drop_reorder (bContext *C, ReportList *reports, StackDropData *drop_data)
 
static int blender::ed::outliner::datastack_drop_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void blender::ed::outliner::OUTLINER_OT_datastack_drop (wmOperatorType *ot)
 

Drop Target Find

using blender::ed::outliner::CheckTypeFn = bool (*)(TreeElement *te)
 
static TreeElementblender::ed::outliner::outliner_dropzone_element (TreeElement *te, const float fmval[2], const bool children)
 
static TreeElementblender::ed::outliner::outliner_dropzone_find (const SpaceOutliner *space_outliner, const float fmval[2], const bool children)
 
static TreeElementblender::ed::outliner::outliner_drop_find (bContext *C, const wmEvent *event)
 
static IDblender::ed::outliner::outliner_ID_drop_find (bContext *C, const wmEvent *event, short idcode)
 
static TreeElementblender::ed::outliner::outliner_drop_insert_find (bContext *C, const int xy[2], TreeElementInsertType *r_insert_type)
 
static TreeElementblender::ed::outliner::outliner_data_from_tree_element_and_parents (CheckTypeFn check_type, TreeElement *te)
 
static bool blender::ed::outliner::is_collection_element (TreeElement *te)
 
static bool blender::ed::outliner::is_object_element (TreeElement *te)
 
static bool blender::ed::outliner::is_pchan_element (TreeElement *te)
 
static TreeElementblender::ed::outliner::outliner_drop_insert_collection_find (bContext *C, const int xy[2], TreeElementInsertType *r_insert_type)
 
static int blender::ed::outliner::outliner_get_insert_index (TreeElement *drag_te, TreeElement *drop_te, TreeElementInsertType insert_type, ListBase *listbase)
 

Macro Definition Documentation

◆ OUTLINER_DRAG_SCOLL_OUTSIDE_PAD

#define OUTLINER_DRAG_SCOLL_OUTSIDE_PAD   7 /* In UI units */