[Bf-blender-cvs] [68e5c082b8d] blender2.8: Fix for crash/error drawing duplis
Campbell Barton
noreply at git.blender.org
Fri Jun 2 18:21:53 CEST 2017
Commit: 68e5c082b8dc0472dc7c9d870c68497d88bc4f19
Author: Campbell Barton
Date: Sat Jun 3 02:21:10 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB68e5c082b8dc0472dc7c9d870c68497d88bc4f19
Fix for crash/error drawing duplis
Drawing object centers used stack memory,
we don't want to draw these anyway so add check.
===================================================================
M source/blender/depsgraph/intern/depsgraph_query.cc
M source/blender/draw/modes/object_mode.c
===================================================================
diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc
index c87d6fd99e0..4241325d571 100644
--- a/source/blender/depsgraph/intern/depsgraph_query.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query.cc
@@ -100,6 +100,8 @@ Object *DEG_get_object(Depsgraph * /*depsgraph*/, Object *ob)
/* ************************ DAG ITERATORS ********************* */
+#define BASE_FLUSH_FLAGS (BASE_FROM_SET | BASE_FROMDUPLI)
+
void DEG_objects_iterator_begin(BLI_Iterator *iter, DEGObjectsIteratorData *data)
{
SceneLayer *scene_layer;
@@ -112,7 +114,7 @@ void DEG_objects_iterator_begin(BLI_Iterator *iter, DEGObjectsIteratorData *data
data->eval_ctx = DEG_evaluation_context_new(DAG_EVAL_RENDER);
data->scene = DEG_get_scene(graph);
scene_layer = DEG_get_scene_layer(graph);
- data->base_flag = ~(BASE_FROM_SET);
+ data->base_flag = ~BASE_FLUSH_FLAGS;
Base base = {(Base *)scene_layer->object_bases.first, NULL};
data->base = &base;
@@ -124,7 +126,7 @@ void DEG_objects_iterator_begin(BLI_Iterator *iter, DEGObjectsIteratorData *data
*/
static void deg_flush_data(Object *ob, Base *base, const int flag)
{
- ob->base_flag = (base->flag | BASE_FROM_SET | BASE_FROMDUPLI) & flag;
+ ob->base_flag = (base->flag | BASE_FLUSH_FLAGS) & flag;
ob->base_collection_properties = base->collection_properties;
ob->base_selection_color = base->selcol;
}
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index 8abe59b1cbf..45e035acc73 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -1610,7 +1610,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
}
/* don't show object extras in set's */
- if ((ob->base_flag & BASE_FROM_SET) == 0) {
+ if ((ob->base_flag & (BASE_FROM_SET | BASE_FROMDUPLI)) == 0) {
DRW_shgroup_object_center(stl, ob);
DRW_shgroup_relationship_lines(stl, ob);
More information about the Bf-blender-cvs
mailing list