Compositor: Remove Auto Render option

This patch removes the Auto Render option from the compositor. This is
done for the following reason:

- The option didn't really work except in the case of transforming an
  object. So it wasn't really reliable.
- It made little sense to use since the introduction of the Viewport
  Compositor.
- It had a number of UX issues, including the fact that it can't be used
  with animation playback, and the fact that rendering can get in the
  way of the UI depending on the preferences for temporary editors.

Pull Request: https://projects.blender.org/blender/blender/pulls/123132
This commit is contained in:
Omar Emara 2024-06-13 07:29:37 +02:00 committed by Omar Emara
parent ad3c92b660
commit cbabe2d3ef
10 changed files with 16 additions and 51 deletions

@ -1059,7 +1059,6 @@ url_manual_mapping = (
("bpy.types.spacefilebrowser.recent_folders*", "editors/file_browser.html#bpy-types-spacefilebrowser-recent-folders"),
("bpy.types.spacefilebrowser.system_folders*", "editors/file_browser.html#bpy-types-spacefilebrowser-system-folders"),
("bpy.types.spacenodeeditor.show_annotation*", "interface/controls/nodes/introduction.html#bpy-types-spacenodeeditor-show-annotation"),
("bpy.types.spacenodeeditor.use_auto_render*", "compositing/sidebar.html#bpy-types-spacenodeeditor-use-auto-render"),
("bpy.types.spaceoutliner.use_filter_object*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object"),
("bpy.types.spacesequenceeditor.use_proxies*", "editors/video_sequencer/preview/sidebar.html#bpy-types-spacesequenceeditor-use-proxies"),
("bpy.types.spaceuveditor.edge_display_type*", "editors/uv/overlays.html#bpy-types-spaceuveditor-edge-display-type"),

@ -849,9 +849,6 @@ class NODE_PT_quality(bpy.types.Panel):
col = layout.column()
col.prop(tree, "use_viewer_border")
col = layout.column()
col.prop(snode, "use_auto_render")
class NODE_PT_overlay(Panel):
bl_space_type = 'NODE_EDITOR'

@ -29,7 +29,7 @@ extern "C" {
/* Blender file format version. */
#define BLENDER_FILE_VERSION BLENDER_VERSION
#define BLENDER_FILE_SUBVERSION 1
#define BLENDER_FILE_SUBVERSION 2
/* Minimum Blender version that supports reading file written with the current
* version. Older Blender versions will test this and cancel loading the file, showing a warning to

@ -4163,6 +4163,19 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain)
FOREACH_NODETREE_END;
}
if (!MAIN_VERSION_FILE_ATLEAST(bmain, 403, 2)) {
LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
LISTBASE_FOREACH (SpaceLink *, space_link, &area->spacedata) {
if (space_link->spacetype == SPACE_NODE) {
SpaceNode *space_node = reinterpret_cast<SpaceNode *>(space_link);
space_node->flag &= ~SNODE_FLAG_UNUSED_5;
}
}
}
}
}
/**
* Always bump subversion in BKE_blender_version.h when adding versioning
* code here, and wrap it inside a MAIN_VERSION_FILE_ATLEAST check.

@ -88,13 +88,6 @@ struct SpaceNode_Runtime {
/** Mouse position for drawing socket-less links and adding nodes. */
float2 cursor;
/**
* Indicates that the compositing tree in the space needs to be re-evaluated using the
* auto-compositing pipeline.
* Takes priority over the regular compositing.
*/
bool recalc_auto_compositing;
/**
* Indicates that the compositing int the space tree needs to be re-evaluated using
* regular compositing pipeline.

@ -491,24 +491,6 @@ static bool any_node_uses_id(const bNodeTree *ntree, const ID *id)
return false;
}
/**
* Tag the space to recalculate the compositing tree using auto-compositing pipeline.
*
* Will check the space to be using a compositing tree, and check whether auto-compositing
* is enabled. If the checks do not pass then the function has no affect.
*/
static void node_area_tag_recalc_auto_compositing(SpaceNode *snode, ScrArea *area)
{
if (!ED_node_is_compositor(snode)) {
return;
}
if (snode->flag & SNODE_AUTO_RENDER) {
snode->runtime->recalc_auto_compositing = true;
ED_area_tag_refresh(area);
}
}
/**
* Tag the space to recalculate the current tree.
*
@ -562,9 +544,6 @@ static void node_area_listener(const wmSpaceTypeListenerParams *params)
WM_gizmomap_tag_refresh(region->gizmo_map);
break;
}
case ND_TRANSFORM_DONE:
node_area_tag_recalc_auto_compositing(snode, area);
break;
}
break;
@ -715,13 +694,7 @@ static void node_area_refresh(const bContext *C, ScrArea *area)
if (snode->nodetree->type == NTREE_COMPOSIT) {
Scene *scene = (Scene *)snode->id;
if (scene->use_nodes) {
/* recalc is set on 3d view changes for auto compo */
if (snode->runtime->recalc_auto_compositing) {
snode->runtime->recalc_auto_compositing = false;
snode->runtime->recalc_regular_compositing = false;
node_render_changed_exec((bContext *)C, nullptr);
}
else if (snode->runtime->recalc_regular_compositing) {
if (snode->runtime->recalc_regular_compositing) {
snode->runtime->recalc_regular_compositing = false;
/* Only start compositing if its result will be visible either in the backdrop or in a
* viewer image. */

@ -562,9 +562,6 @@ static void viewRedrawPost(bContext *C, TransInfo *t)
{
WM_event_add_notifier(C, NC_GEOM | ND_DATA, nullptr);
}
/* XXX(ton): temp, first hack to get auto-render in compositor work. */
WM_event_add_notifier(C, NC_SCENE | ND_TRANSFORM_DONE, CTX_data_scene(C));
}
}

@ -1646,7 +1646,7 @@ typedef enum eSpaceNode_Flag {
SNODE_SHOW_R = (1 << 7),
SNODE_SHOW_G = (1 << 8),
SNODE_SHOW_B = (1 << 9),
SNODE_AUTO_RENDER = (1 << 5),
SNODE_FLAG_UNUSED_5 = (1 << 5), /* cleared */
SNODE_FLAG_UNUSED_6 = (1 << 6), /* cleared */
SNODE_FLAG_UNUSED_10 = (1 << 10), /* cleared */
SNODE_FLAG_UNUSED_11 = (1 << 11), /* cleared */

@ -7774,12 +7774,6 @@ static void rna_def_space_node(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Show Annotation", "Show annotations for this view");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, nullptr);
prop = RNA_def_property(srna, "use_auto_render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SNODE_AUTO_RENDER);
RNA_def_property_ui_text(
prop, "Auto Render", "Re-render and composite changed layers on 3D edits");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, nullptr);
prop = RNA_def_property(srna, "backdrop_zoom", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, nullptr, "zoom");
RNA_def_property_float_default(prop, 1.0f);

@ -416,7 +416,6 @@ struct wmNotifier {
#define ND_TOOLSETTINGS (15 << 16)
#define ND_LAYER (16 << 16)
#define ND_FRAME_RANGE (17 << 16)
#define ND_TRANSFORM_DONE (18 << 16)
#define ND_WORLD (92 << 16)
#define ND_LAYER_CONTENT (101 << 16)