diff options
author | Luca Rood <dev@lucarood.com> | 2017-04-19 12:31:33 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-04-19 17:52:27 +0300 |
commit | 4bee5b80d4c5c3309771424ad40f0a7723c818b1 (patch) | |
tree | 5bedfc5c74b22e78741272cb61f3eed37f18f3df /source/blender/editors/armature | |
parent | 2f2420709c95c1af27967daa257553edf9096c7a (diff) |
Convert direct usages of base defines
This replaces all direct usage of:
- FIRSTBASE
- LASTBASE
- BASACT
- OBACT
Some usages still remain in legacy utility functions which are called
all over the place.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/editarmature_sketch.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index 63acb557c52..957048bcc42 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -33,6 +33,7 @@ #include "BKE_context.h" #include "BKE_sketch.h" +#include "BKE_layer.h" #include "RNA_define.h" #include "RNA_access.h" @@ -144,9 +145,8 @@ static RigGraph *TEMPLATE_RIGG = NULL; void BIF_makeListTemplates(const bContext *C) { Object *obedit = CTX_data_edit_object(C); - Scene *scene = CTX_data_scene(C); + SceneLayer *sl = CTX_data_scene_layer(C); ToolSettings *ts = CTX_data_tool_settings(C); - BaseLegacy *base; int index = 0; if (TEMPLATES_HASH != NULL) { @@ -156,9 +156,8 @@ void BIF_makeListTemplates(const bContext *C) TEMPLATES_HASH = BLI_ghash_int_new("makeListTemplates gh"); TEMPLATES_CURRENT = 0; - for (base = FIRSTBASE; base; base = base->next) { - Object *ob = base->object; - + FOREACH_OBJECT(sl, ob) + { if (ob != obedit && ob->type == OB_ARMATURE) { index++; BLI_ghash_insert(TEMPLATES_HASH, SET_INT_IN_POINTER(index), ob); @@ -168,6 +167,7 @@ void BIF_makeListTemplates(const bContext *C) } } } + FOREACH_OBJECT_END } #if 0 /* UNUSED */ |