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:
authorDalai Felinto <dfelinto@gmail.com>2017-03-30 12:41:33 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-03-30 12:41:33 +0300
commit3f6a74560e0ee4fb247e36e6ef2516a997316dba (patch)
tree75080644daae244e3a11234a261b1ae9ee9e80ce /source/blender/editors/object/object_hook.c
parent35b731c9c8bdd996e9f418763f107a2e8e98516d (diff)
Layers: Scene->basact > SceneLayer->basact (more work)
This brings back adding hooks among other areas
Diffstat (limited to 'source/blender/editors/object/object_hook.c')
-rw-r--r--source/blender/editors/object/object_hook.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index f41f21f5bd4..abb0172d9ce 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -49,6 +49,7 @@
#include "BKE_action.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
+#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
@@ -447,19 +448,19 @@ static int hook_op_edit_poll(bContext *C)
static Object *add_hook_object_new(Main *bmain, Scene *scene, SceneLayer *sl, Object *obedit)
{
- BaseLegacy *base, *basedit;
+ Base *base, *basedit;
Object *ob;
ob = BKE_object_add(bmain, scene, sl, OB_EMPTY, NULL);
- basedit = BKE_scene_base_find(scene, obedit);
- base = scene->basact;
+ basedit = BKE_scene_layer_base_find(sl, obedit);
+ base = sl->basact;
base->lay = ob->lay = obedit->lay;
- BLI_assert(scene->basact->object == ob);
+ BLI_assert(sl->basact->object == ob);
/* icky, BKE_object_add sets new base as active.
* so set it back to the original edit object */
- scene->basact = basedit;
+ sl->basact = basedit;
return ob;
}