diff options
author | Sergey Sharybin <sergey@blender.org> | 2021-09-16 18:01:28 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2021-09-20 18:35:30 +0300 |
commit | 2413da215160403d026d776bdbe0b883de5516ae (patch) | |
tree | 04d6220cccbf8c4dcac5fc85e51c7709baccc45b /source/blender/makesrna | |
parent | 2493c470d61a5b4cbfef87734f131a8d2e06d9c0 (diff) |
Cycles X: Re-implement tile highlight
Since the GPUDisplay usage for offline rendering we've lost tile
highlight functionality. This change brings it back.
Introduced new RenderEngine API call to manipulate highlight state
without acquiring RenderResult (so that we don't allocate passes).
Not fully ideal since the last tile will be highlighted after render
is done until first full-frame is done, but is a cosmetic thing we
can improve in the future.
Differential Revision: https://developer.blender.org/D12519
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_render.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index bfbfc6fc055..fcb46904e8d 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -820,6 +820,22 @@ static void rna_def_render_engine(BlenderRNA *brna) func = RNA_def_function(srna, "free_blender_memory", "RE_engine_free_blender_memory"); RNA_def_function_ui_description(func, "Free Blender side memory of render engine"); + func = RNA_def_function(srna, "tile_highlight_set", "RE_engine_tile_highlight_set"); + RNA_def_function_ui_description(func, "Set highlighted state of the given tile"); + parm = RNA_def_int(func, "x", 0, 0, INT_MAX, "X", "", 0, INT_MAX); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + parm = RNA_def_int(func, "y", 0, 0, INT_MAX, "Y", "", 0, INT_MAX); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + parm = RNA_def_int(func, "width", 0, 0, INT_MAX, "Width", "", 0, INT_MAX); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + parm = RNA_def_int(func, "height", 0, 0, INT_MAX, "Height", "", 0, INT_MAX); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + parm = RNA_def_boolean(func, "highlight", 0, "Highlight", ""); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + + func = RNA_def_function(srna, "tile_highlight_clear_all", "RE_engine_tile_highlight_clear_all"); + RNA_def_function_ui_description(func, "Clear highlight from all tiles"); + RNA_define_verify_sdna(0); prop = RNA_def_property(srna, "is_animation", PROP_BOOLEAN, PROP_NONE); |