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:
authorCampbell Barton <ideasman42@gmail.com>2020-02-19 07:06:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-02-19 07:07:32 +0300
commit3afe218a7d71ce4bb5d9b661bc966e8c99541184 (patch)
tree4834aea5f3a08fac6aba2debbf491992ccfa414e /source/blender/editors/space_nla
parent9f8dd4f9e5c0a397485262ec815a88de4fa6cee4 (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_nla')
-rw-r--r--source/blender/editors/space_nla/nla_edit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index ac6ee125798..150a4ef127f 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -587,6 +587,7 @@ void NLA_OT_view_frame(wmOperatorType *ot)
/* add the specified action as new strip */
static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op)
{
+ Main *bmain = CTX_data_main(C);
bAnimContext ac;
Scene *scene;
@@ -608,7 +609,7 @@ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op)
cfra = (float)CFRA;
/* 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");