diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-02-19 07:06:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-02-19 07:07:32 +0300 |
commit | 3afe218a7d71ce4bb5d9b661bc966e8c99541184 (patch) | |
tree | 4834aea5f3a08fac6aba2debbf491992ccfa414e /source/blender/editors/space_outliner | |
parent | 9f8dd4f9e5c0a397485262ec815a88de4fa6cee4 (diff) |
Cleanup: assign Main, use existing assignments
Avoid accessing inline since it's often used multiple times.
In some cases it was already defined.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 8d6aff1bd6e..503a4570352 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -1926,6 +1926,7 @@ static void actionset_id_cb(TreeElement *UNUSED(te), static int outliner_action_set_exec(bContext *C, wmOperator *op) { + Main *bmain = CTX_data_main(C); SpaceOutliner *soops = CTX_wm_space_outliner(C); int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0; @@ -1938,7 +1939,7 @@ static int outliner_action_set_exec(bContext *C, wmOperator *op) set_operation_types(soops, &soops->tree, &scenelevel, &objectlevel, &idlevel, &datalevel); /* get action to use */ - act = BLI_findlink(&CTX_data_main(C)->actions, RNA_enum_get(op->ptr, "action")); + act = BLI_findlink(&bmain->actions, RNA_enum_get(op->ptr, "action")); if (act == NULL) { BKE_report(op->reports, RPT_ERROR, "No valid action to add"); |