Commit: 2efb91609f9f313beb0aa5db0e20c4fe3e404386
Author: Julian Eisel
Date: Fri Aug 12 17:17:15 2016 +0200
Branches: soc-2016-layer_manager
https://developer.blender.org/rB2efb91609f9f313beb0aa5db0e20c4fe3e404386
Deprecate Base.next/prev pointers
For now we won't use them, but we might go back to storing bases in lists again
to avoid trouble with file read/write. However, these lists will still work
different than the current base list.
===================================================================
M source/blender/blenkernel/intern/dynamicpaint.c
M source/blender/blenkernel/intern/scene.c
M source/blender/editors/space_logic/logic_window.c
M source/blender/editors/space_outliner/outliner_tools.c
M source/blender/editors/space_view3d/view3d_select.c
M source/blender/makesdna/DNA_scene_types.h
===================================================================
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c
b/source/blender/blenkernel/intern/dynamicpaint.c
index 45d9b9f..e3dcad0 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -507,7 +507,7 @@ static int surface_getBrushFlags(DynamicPaintSurface
*surface, const Scene *scen
if (surface->brush_group)
go = go->next;
else
- base = base->next;
+ base = BKE_objectlayer_base_next_find(base, false);
if (!brushObj) {
continue;
@@ -5466,7 +5466,7 @@ static int dynamicPaint_doStep(Scene *scene, Object *ob,
DynamicPaintSurface *su
if (surface->brush_group)
go = go->next;
else
- base = base->next;
+ base = BKE_objectlayer_base_next_find(base,
false);
if (!brushObj) {
/* skip item */
diff --git a/source/blender/blenkernel/intern/scene.c
b/source/blender/blenkernel/intern/scene.c
index 9254df0..9ffe26c 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -968,7 +968,7 @@ int BKE_scene_base_iter_next(EvaluationContext *eval_ctx,
SceneBaseIter *iter,
}
else {
if (*base && iter->phase != F_DUPLI) {
- *base = (*base)->next;
+ *base =
BKE_objectlayer_base_next_find(*base, false);
if (*base) {
*ob = (*base)->object;
}
@@ -2164,9 +2164,10 @@ float get_render_aosss_error(const RenderData *r, float
error)
/* helper function for the SETLOOPER macro */
Base *_setlooper_base_step(Scene **sce_iter, Base *base)
{
- if (base && base->next) {
+ Base *nextbase;
+ if (base && (nextbase = BKE_objectlayer_base_next_find(base, false))) {
/* common case, step to the next */
- return base->next;
+ return nextbase;
}
else if (base == NULL &&
BKE_objectlayer_base_first_find((*sce_iter)->object_layers)) {
/* first time looping, return the scenes first base */
diff --git a/source/blender/editors/space_logic/logic_window.c
b/source/blender/editors/space_logic/logic_window.c
index e5ca452..713d8b1 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -498,7 +498,6 @@ static ID **get_selected_and_linked_obs(bContext *C, short
*count, short scavisf
if (scavisflag & BUTS_ACT_SEL)
base->object->scavisflag |= OB_VIS_ACT;
}
}
- base= base->next;
}
BKE_BASES_ITER_END;
diff --git a/source/blender/editors/space_outliner/outliner_tools.c
b/source/blender/editors/space_outliner/outliner_tools.c
index 4c04bc7..d95c166 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -838,7 +838,7 @@ static Base *outline_delete_hierarchy(bContext *C,
ReportList *reports, Scene *s
}
BKE_BASES_ITER_END;
- base_next = base->next;
+ base_next = BKE_objectlayer_base_next_find(base_next, false);
Main *bmain = CTX_data_main(C);
if (base->object->id.tag & LIB_TAG_INDIRECT) {
diff --git a/source/blender/editors/space_view3d/view3d_select.c
b/source/blender/editors/space_view3d/view3d_select.c
index 169da0e..1a263ba 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -1419,8 +1419,13 @@ static bool ed_object_select_pick(
}
/* always start list from basact in wire mode */
- startbase = BKE_objectlayer_base_first_find(scene->object_layers);
- if (BASACT && BASACT->next) startbase = BASACT->next;
+ startbase = BKE_objectlayer_base_first_find(scene->object_layers);
+ if (BASACT) {
+ Base *nextbase = BKE_objectlayer_base_next_find(BASACT, false);
+ if (nextbase) {
+ startbase = nextbase;
+ }
+ }
/* This block uses the control key to make the object selected by its
center point rather than its contents */
/* in editmode do not activate */
diff --git a/source/blender/makesdna/DNA_scene_types.h
b/source/blender/makesdna/DNA_scene_types.h
index c0ca1b3..4571301 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -73,7 +73,7 @@ struct uiLayout;
/* Base - Wrapper for referencing Objects in a Scene */
typedef struct Base {
- struct Base *next, *prev;
+ struct Base *next DNA_DEPRECATED, *prev DNA_DEPRECATED;
unsigned int lay, selcol;
int flag;
short sx, sy;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs