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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-01-16 19:34:31 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-01-16 19:35:51 +0300
commitc2dee803e31446c42dc6a371b9e89c4f4d559ead (patch)
tree5236b21a6522178bd2422cf77f650551192fffcb /source/blender/editors/space_outliner
parentece72e15d5789bcb5e9a140131768863d724cff4 (diff)
Outilner: pass userdata void pointer to outliner_do_object_operation_ex().
Even though it is not used currently, an _ex() func should not ignore that, it is kind of mandatory for many advanced/complex behaviors.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_intern.h2
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index f8c32375bdf..b3e4ea88b4c 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -219,7 +219,7 @@ typedef void (*outliner_operation_cb)(
void outliner_do_object_operation_ex(
struct bContext *C, struct ReportList *reports, struct Scene *scene, struct SpaceOops *soops,
- struct ListBase *lb, outliner_operation_cb operation_cb, bool recurse_selected);
+ struct ListBase *lb, outliner_operation_cb operation_cb, void *user_data, bool recurse_selected);
void outliner_do_object_operation(
struct bContext *C, struct ReportList *reports, struct Scene *scene, struct SpaceOops *soops,
struct ListBase *lb, outliner_operation_cb operation_cb);
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 401f76947bb..4532ee5cd51 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -561,7 +561,7 @@ static void singleuser_world_cb(
*/
void outliner_do_object_operation_ex(
bContext *C, ReportList *reports, Scene *scene_act, SpaceOops *soops, ListBase *lb,
- outliner_operation_cb operation_cb, bool select_recurse)
+ outliner_operation_cb operation_cb, void *user_data, bool select_recurse)
{
TreeElement *te;
@@ -578,14 +578,14 @@ void outliner_do_object_operation_ex(
/* important to use 'scene_owner' not scene_act else deleting objects can crash.
* only use 'scene_act' when 'scene_owner' is NULL, which can happen when the
* outliner isn't showing scenes: Visible Layer draw mode for eg. */
- operation_cb(C, reports, scene_owner ? scene_owner : scene_act, te, NULL, tselem, NULL);
+ operation_cb(C, reports, scene_owner ? scene_owner : scene_act, te, NULL, tselem, user_data);
select_handled = true;
}
}
if (TSELEM_OPEN(tselem, soops)) {
if ((select_handled == false) || select_recurse) {
outliner_do_object_operation_ex(
- C, reports, scene_act, soops, &te->subtree, operation_cb, select_recurse);
+ C, reports, scene_act, soops, &te->subtree, operation_cb, NULL, select_recurse);
}
}
}
@@ -595,7 +595,7 @@ void outliner_do_object_operation(
bContext *C, ReportList *reports, Scene *scene_act, SpaceOops *soops, ListBase *lb,
outliner_operation_cb operation_cb)
{
- outliner_do_object_operation_ex(C, reports, scene_act, soops, lb, operation_cb, true);
+ outliner_do_object_operation_ex(C, reports, scene_act, soops, lb, operation_cb, NULL, true);
}
/* ******************************************** */
@@ -961,7 +961,8 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op)
}
else if (event == OL_OP_SELECT_HIERARCHY) {
Scene *sce = scene; // to be able to delete, scenes are set...
- outliner_do_object_operation_ex(C, op->reports, scene, soops, &soops->tree, object_select_hierarchy_cb, false);
+ outliner_do_object_operation_ex(
+ C, op->reports, scene, soops, &soops->tree, object_select_hierarchy_cb, NULL, false);
if (scene != sce) {
WM_window_set_active_scene(bmain, C, win, sce);
}
@@ -991,7 +992,8 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
}
else if (event == OL_OP_DELETE_HIERARCHY) {
- outliner_do_object_operation_ex(C, op->reports, scene, soops, &soops->tree, object_delete_hierarchy_cb, false);
+ outliner_do_object_operation_ex(
+ C, op->reports, scene, soops, &soops->tree, object_delete_hierarchy_cb, NULL, false);
/* XXX: See OL_OP_DELETE comment above. */
outliner_cleanup_tree(soops);