Refactor: Move display pass to Cycles viewport parameters
Allows to centralize storage and modification checks in a single place, avoiding duplication in the synchronization code. Ideally we would somehow be able to more granularly modify Cycles side objects. Leaving this for a future decision, because it might be better to implement it as a graph on the sync side.
This commit is contained in:
@@ -230,12 +230,7 @@ void BlenderSync::sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d
|
||||
has_updates_ = true;
|
||||
}
|
||||
|
||||
if (!has_updates_) {
|
||||
Film *film = scene->film;
|
||||
|
||||
const PassType new_display_pass = new_viewport_parameters.get_render_pass(b_v3d);
|
||||
has_updates_ |= film->get_display_pass() != new_display_pass;
|
||||
}
|
||||
has_updates_ |= viewport_parameters.modified(new_viewport_parameters);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user