Page MenuHome

Expose Color Management as argument for gpu.types.GPUOffScreen.draw_view3d()
ClosedPublic

Authored by Gottfried Hofmann (gottfried) on Jun 18 2021, 11:20 AM.

Details

Summary

Fix for https://developer.blender.org/T84227

The problem was that https://developer.blender.org/rBe0ffb911a22bb03755687f45fc1a996870e059a8 turned color management for offscreen rendering off by default, which makes it non-color-managed in some cases. So the idea here is that script authors get the choice wether they want color managed non-color-managed output. Thus this patch introduces a new argument do_color_management as a bool to gpu.types.GPUOffScreen.draw_view3d().

Diff Detail

Repository
rB Blender

Event Timeline

Gottfried Hofmann (gottfried) requested review of this revision.Jun 18 2021, 11:20 AM
Gottfried Hofmann (gottfried) created this revision.
Gottfried Hofmann (gottfried) edited the summary of this revision. (Show Details)

do_color_management is now a keyword-only argument and optional, defaulting to false. Thus no changes need to be done to existing addons.

The defaulting to false is now also visible in the doc.

This revision is now accepted and ready to land.Jun 21 2021, 9:46 AM
Julian Eisel (Severin) resigned from this revision.Jun 21 2021, 2:26 PM

do_color_management is now a keyword-only argument and optional, defaulting to false. Thus no changes need to be done to existing addons.

I would like to point out that 3.0 is a major and therefore API breaking release. I suspect many add-ones will require refactoring anyway. Color Management was previously always done, and was only removed due to the fact that it was being applied twice. Assuming that issue has been solved, having Color Management on by default seems to me to be what one would expect.

I would like to point out that 3.0 is a major and therefore API breaking release. I suspect many add-ones will require refactoring anyway. Color Management was previously always done, and was only removed due to the fact that it was being applied twice. Assuming that issue has been solved, having Color Management on by default seems to me to be what one would expect.

Unfortunately that issue has not been resolved yet, at least to my knowledge.