Make object visibility and instancing creation to be calculated via depsgraph #57

Merged
Bogdan Nagirniak merged 16 commits from BLEN-442 into hydra-render 2023-07-08 10:09:53 +02:00
Showing only changes of commit a87f3ce062 - Show all commits

View File

@ -373,12 +373,7 @@ void BlenderSceneDelegate::check_updates()
} }
if (set_light_shading_settings()) { if (set_light_shading_settings()) {
if (shading_settings.use_scene_lights) { do_update_collection = true;
add_new_objects();
}
else {
do_update_collection = true;
}
} }
DEGIDIterData data = {0}; DEGIDIterData data = {0};
@ -411,19 +406,15 @@ void BlenderSceneDelegate::check_updates()
} break; } break;
case ID_SCE: { case ID_SCE: {
if (id->recalc & ID_RECALC_COPY_ON_WRITE && !(id->recalc & ID_RECALC_SELECT)) { if ((id->recalc & ID_RECALC_COPY_ON_WRITE && !(id->recalc & ID_RECALC_SELECT)) ||
id->recalc & (ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_BASE_FLAGS))
{
do_update_collection = true; do_update_collection = true;
} }
if (id->recalc & ID_RECALC_BASE_FLAGS) { if (id->recalc & ID_RECALC_AUDIO_VOLUME &&
do_update_collection = true; ((scene->world && !world_data_) || (!scene->world && world_data_)))
} {
if (id->recalc & (ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY)) { do_update_world = true;
do_update_collection = true;
}
if (id->recalc & ID_RECALC_AUDIO_VOLUME) {
if ((scene->world && !world_data_) || (!scene->world && world_data_)) {
do_update_world = true;
}
} }
} break; } break;