Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Craddock <nzcraddock@gmail.com>2020-09-16 00:23:08 +0300
committerNathan Craddock <nzcraddock@gmail.com>2020-09-16 00:29:59 +0300
commit1572da858df49af04e4ddb5dbb87a96e57ea6f14 (patch)
treef6f7ba54d9b21acee13a0b26377a2d74f47530f0 /source/blender/editors/space_outliner/outliner_select.c
parent583354e9e989a66a684053e16bcbd950cac91428 (diff)
Outliner: Modifier/constraint/shaderfx drag and drop operator
This adds an operator to allow drag and drop of modifiers, constraints, and shader effects within the outliner. Referred to as "data stack" in the code for simplicity. The following operations are allowed: * Reordering within an object or bone * Copying a single modifier/constraint/effect to another object or bone * Copying (linking) all modifiers/constraints/effects to another object or bone. This complements the recent work done for panel-based modifier layouts by allowing reordering in the outliner. It also makes it simple to copy a single modifier/constraint/effect to another object. Differential Revision: https://developer.blender.org/D8642
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 61228e24ed9..602bb351c0f 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1032,6 +1032,23 @@ eOLDrawState tree_element_type_active(bContext *C,
return OL_DRAWSEL_NONE;
}
+bPoseChannel *outliner_find_parent_bone(TreeElement *te, TreeElement **r_bone_te)
+{
+ TreeStoreElem *tselem;
+
+ te = te->parent;
+ while (te) {
+ tselem = TREESTORE(te);
+ if (tselem->type == TSE_POSE_CHANNEL) {
+ *r_bone_te = te;
+ return (bPoseChannel *)te->directdata;
+ }
+ te = te->parent;
+ }
+
+ return NULL;
+}
+
/* ================================================ */
/**