Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/depsgraph_query.cc
| Show First 20 Lines • Show All 205 Lines • ▼ Show 20 Lines | else { | ||||
| data->dupli_parent = NULL; | data->dupli_parent = NULL; | ||||
| data->dupli_list = NULL; | data->dupli_list = NULL; | ||||
| data->dupli_object_next = NULL; | data->dupli_object_next = NULL; | ||||
| data->dupli_object_current = NULL; | data->dupli_object_current = NULL; | ||||
| } | } | ||||
| } | } | ||||
| base = data->base->next; | base = data->base->next; | ||||
| while (base != NULL) { | while (base != NULL) { | ||||
sergey: You don't need `while` here, it should just be `if (base != NULL)`. | |||||
| if ((base->flag & BASE_VISIBLED) != 0) { | |||||
| // Object *ob = DEG_get_evaluated_object(data->graph, base->object); | // Object *ob = DEG_get_evaluated_object(data->graph, base->object); | ||||
| Object *ob = base->object; | Object *ob = base->object; | ||||
| iter->current = ob; | iter->current = ob; | ||||
| data->base = base; | data->base = base; | ||||
| BLI_assert(DEG::deg_validate_copy_on_write_datablock(&ob->id)); | BLI_assert(DEG::deg_validate_copy_on_write_datablock(&ob->id)); | ||||
| /* Make sure we have the base collection settings is already populated. | /* Make sure we have the base collection settings is already populated. | ||||
| * This will fail when BKE_layer_eval_layer_collection_pre hasn't run yet | * This will fail when BKE_layer_eval_layer_collection_pre hasn't run yet | ||||
| * Which usually means a missing call to DEG_id_tag_update(). */ | * Which usually means a missing call to DEG_id_tag_update(). */ | ||||
| BLI_assert(!BLI_listbase_is_empty(&base->collection_properties->data.group)); | BLI_assert(!BLI_listbase_is_empty(&base->collection_properties->data.group)); | ||||
| /* Flushing depsgraph data. */ | /* Flushing depsgraph data. */ | ||||
| deg_flush_base_flags_and_settings(ob, | deg_flush_base_flags_and_settings(ob, | ||||
| base, | base, | ||||
| data->base_flag); | data->base_flag); | ||||
| if ((data->flag & DEG_OBJECT_ITER_FLAG_DUPLI) && (ob->transflag & OB_DUPLI)) { | if ((data->flag & DEG_OBJECT_ITER_FLAG_DUPLI) && (ob->transflag & OB_DUPLI)) { | ||||
| data->dupli_parent = ob; | data->dupli_parent = ob; | ||||
| data->dupli_list = object_duplilist(&data->eval_ctx, data->scene, ob); | data->dupli_list = object_duplilist(&data->eval_ctx, data->scene, ob); | ||||
| data->dupli_object_next = (DupliObject *)data->dupli_list->first; | data->dupli_object_next = (DupliObject *)data->dupli_list->first; | ||||
| } | } | ||||
| return; | return; | ||||
| } | } | ||||
| base = base->next; | |||||
| } | |||||
| /* Look for an object in the next set. */ | /* Look for an object in the next set. */ | ||||
| if ((data->flag & DEG_OBJECT_ITER_FLAG_SET) && data->scene->set) { | if ((data->flag & DEG_OBJECT_ITER_FLAG_SET) && data->scene->set) { | ||||
| SceneLayer *scene_layer; | SceneLayer *scene_layer; | ||||
| data->scene = data->scene->set; | data->scene = data->scene->set; | ||||
| data->base_flag = ~(BASE_SELECTED | BASE_SELECTABLED); | data->base_flag = ~(BASE_SELECTED | BASE_SELECTABLED); | ||||
| /* For the sets we use the layer used for rendering. */ | /* For the sets we use the layer used for rendering. */ | ||||
| Show All 23 Lines | |||||
You don't need while here, it should just be if (base != NULL).