Skip to content

Commit

Permalink
Compositor: Remove quality setting from DNA and UI
Browse files Browse the repository at this point in the history
It was meant to be included into the previous commit in the area,
but was forgotten due to some technicalities.

Also remove the DisplaceSimpleOperation, which is now not used.

Pull Request: https://projects.blender.org/blender/blender/pulls/121580
  • Loading branch information
sergeyvfx authored and Sergey Sharybin committed May 8, 2024
1 parent fea091e commit 149e547
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 189 deletions.
2 changes: 0 additions & 2 deletions scripts/modules/rna_manual_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,6 @@
("bpy.types.clothsettings.vertex_group_intern*", "physics/cloth/settings/physical_properties.html#bpy-types-clothsettings-vertex-group-intern"),
("bpy.types.clothsettings.vertex_group_shrink*", "physics/cloth/settings/property_weights.html#bpy-types-clothsettings-vertex-group-shrink"),
("bpy.types.colormanagedviewsettings.exposure*", "render/color_management.html#bpy-types-colormanagedviewsettings-exposure"),
("bpy.types.compositornodetree.render_quality*", "compositing/sidebar.html#bpy-types-compositornodetree-render-quality"),
("bpy.types.cyclesobjectsettings.motion_steps*", "render/cycles/object_settings/object_data.html#bpy-types-cyclesobjectsettings-motion-steps"),
("bpy.types.cyclesrendersettings.filter_width*", "render/cycles/render_settings/film.html#bpy-types-cyclesrendersettings-filter-width"),
("bpy.types.fluiddomainsettings.cfl_condition*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-cfl-condition"),
Expand Down Expand Up @@ -982,7 +981,6 @@
("bpy.types.clothsettings.tension_stiffness*", "physics/cloth/settings/physical_properties.html#bpy-types-clothsettings-tension-stiffness"),
("bpy.types.clothsettings.vertex_group_mass*", "physics/cloth/settings/shape.html#bpy-types-clothsettings-vertex-group-mass"),
("bpy.types.compositornodeconvertcolorspace*", "compositing/types/color/convert_colorspace.html#bpy-types-compositornodeconvertcolorspace"),
("bpy.types.compositornodetree.edit_quality*", "compositing/sidebar.html#bpy-types-compositornodetree-edit-quality"),
("bpy.types.cyclescurverendersettings.shape*", "render/cycles/render_settings/hair.html#bpy-types-cyclescurverendersettings-shape"),
("bpy.types.cycleslightsettings.cast_shadow*", "render/cycles/light_settings.html#bpy-types-cycleslightsettings-cast-shadow"),
("bpy.types.cycleslightsettings.max_bounces*", "render/cycles/light_settings.html#bpy-types-cycleslightsettings-max-bounces"),
Expand Down
5 changes: 0 additions & 5 deletions scripts/startup/bl_ui/space_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,11 +830,6 @@ def draw(self, context):
use_realtime = tree.execution_mode == 'REALTIME'
col.prop(tree, "precision")

col = layout.column()
col.active = not use_realtime
col.prop(tree, "render_quality", text="Render")
col.prop(tree, "edit_quality", text="Edit")

col = layout.column()
col.active = not use_realtime
col.prop(tree, "use_viewer_border")
Expand Down
2 changes: 0 additions & 2 deletions source/blender/compositor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,6 @@ if(WITH_COMPOSITOR_CPU)
# Distort operation
operations/COM_DisplaceOperation.cc
operations/COM_DisplaceOperation.h
operations/COM_DisplaceSimpleOperation.cc
operations/COM_DisplaceSimpleOperation.h
operations/COM_FlipOperation.cc
operations/COM_FlipOperation.h
operations/COM_MapUVOperation.cc
Expand Down
2 changes: 0 additions & 2 deletions source/blender/compositor/COM_compositor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ struct Render;
* - another quality setting can be used bNodeTree.
* The quality is determined by the bNodeTree fields.
* quality can be modified by the user from within the node panels.
* \see bNodeTree.edit_quality
* \see bNodeTree.render_quality
*
* - output nodes can have different priorities in the WorkScheduler.
* This is implemented in the COM_execute function.
Expand Down
1 change: 0 additions & 1 deletion source/blender/compositor/intern/COM_CompositorContext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ CompositorContext::CompositorContext()
{
scene_ = nullptr;
rd_ = nullptr;
quality_ = eCompositorQuality::High;
bnodetree_ = nullptr;
}

Expand Down
23 changes: 0 additions & 23 deletions source/blender/compositor/intern/COM_CompositorContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ class CompositorContext {
*/
bool rendering_;

/**
* \brief The quality of the composite.
* This field is initialized in ExecutionSystem and must only be read from that point on.
* \see ExecutionSystem
*/
eCompositorQuality quality_;

Scene *scene_;

/**
Expand Down Expand Up @@ -149,22 +142,6 @@ class CompositorContext {
return previews_;
}

/**
* \brief set the quality
*/
void set_quality(eCompositorQuality quality)
{
quality_ = quality;
}

/**
* \brief get the quality
*/
eCompositorQuality get_quality() const
{
return quality_;
}

/**
* \brief get the current frame-number of the scene in this context
*/
Expand Down
7 changes: 0 additions & 7 deletions source/blender/compositor/intern/COM_ExecutionSystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ ExecutionSystem::ExecutionSystem(RenderData *rd,
context_.set_scene(scene);
context_.set_bnodetree(editingtree);
context_.set_preview_hash(editingtree->previews);
/* initialize the CompositorContext */
if (rendering) {
context_.set_quality((eCompositorQuality)editingtree->render_quality);
}
else {
context_.set_quality((eCompositorQuality)editingtree->edit_quality);
}
context_.set_rendering(rendering);

context_.set_render_data(rd);
Expand Down
11 changes: 2 additions & 9 deletions source/blender/compositor/nodes/COM_DisplaceNode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "COM_DisplaceNode.h"
#include "COM_DisplaceOperation.h"
#include "COM_DisplaceSimpleOperation.h"

namespace blender::compositor {

Expand All @@ -14,15 +13,9 @@ DisplaceNode::DisplaceNode(bNode *editor_node) : Node(editor_node)
}

void DisplaceNode::convert_to_operations(NodeConverter &converter,
const CompositorContext &context) const
const CompositorContext & /*context*/) const
{
NodeOperation *operation;
if (context.get_quality() == eCompositorQuality::Low) {
operation = new DisplaceSimpleOperation();
}
else {
operation = new DisplaceOperation();
}
NodeOperation *operation = new DisplaceOperation();
converter.add_operation(operation);

converter.map_input_socket(get_input_socket(0), operation->get_input_socket(0));
Expand Down

This file was deleted.

27 changes: 0 additions & 27 deletions source/blender/compositor/operations/COM_DisplaceSimpleOperation.h

This file was deleted.

3 changes: 0 additions & 3 deletions source/blender/editors/space_node/node_edit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -625,9 +625,6 @@ void ED_node_composit_default(const bContext *C, Scene *sce)
sce->nodetree = blender::bke::ntreeAddTreeEmbedded(
nullptr, &sce->id, "Compositing Nodetree", ntreeType_Composite->idname);

sce->nodetree->edit_quality = NTREE_QUALITY_HIGH;
sce->nodetree->render_quality = NTREE_QUALITY_HIGH;

bNode *out = nodeAddStaticNode(C, sce->nodetree, CMP_NODE_COMPOSITE);
out->locx = 200.0f;
out->locy = 200.0f;
Expand Down
13 changes: 0 additions & 13 deletions source/blender/makesdna/DNA_node_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -617,13 +617,6 @@ enum {
NODE_LINK_MUTED = 1 << 4,
};

/** #bNodeTree::edit_quality & #bNodeTree::render_quality */
enum {
NTREE_QUALITY_HIGH = 0,
NTREE_QUALITY_MEDIUM = 1,
NTREE_QUALITY_LOW = 2,
};

typedef struct bNestedNodePath {
/** ID of the node that is or contains the nested node. */
int32_t node_id;
Expand Down Expand Up @@ -682,19 +675,13 @@ typedef struct bNodeTree {
int cur_index;
int flag;

/** Quality setting when editing. */
short edit_quality;
/** Quality setting when rendering. */
short render_quality;
/** Tile size for compositor engine. */
int chunksize DNA_DEPRECATED;
/** Execution mode to use for compositor engine. */
int execution_mode;
/** Execution mode to use for compositor engine. */
int precision;

char _pad[4];

rctf viewer_border;

/**
Expand Down
19 changes: 0 additions & 19 deletions source/blender/makesrna/intern/rna_nodetree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,6 @@ const EnumPropertyItem rna_enum_node_socket_data_type_items[] = {
{0, nullptr, 0, nullptr, nullptr},
};

#ifndef RNA_RUNTIME
static const EnumPropertyItem node_quality_items[] = {
{NTREE_QUALITY_HIGH, "HIGH", 0, "High", "High quality"},
{NTREE_QUALITY_MEDIUM, "MEDIUM", 0, "Medium", "Medium quality"},
{NTREE_QUALITY_LOW, "LOW", 0, "Low", "Low quality"},
{0, nullptr, 0, nullptr, nullptr},
};
#endif

static const EnumPropertyItem rna_enum_execution_mode_items[] = {
{NTREE_EXECUTION_MODE_CPU, "CPU", 0, "CPU", ""},
{NTREE_EXECUTION_MODE_GPU, "GPU", 0, "GPU", ""},
Expand Down Expand Up @@ -10517,16 +10508,6 @@ static void rna_def_composite_nodetree(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Execution Mode", "Set how compositing is executed");
RNA_def_property_update(prop, NC_NODE | ND_DISPLAY, "rna_NodeTree_update");

prop = RNA_def_property(srna, "render_quality", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, nullptr, "render_quality");
RNA_def_property_enum_items(prop, node_quality_items);
RNA_def_property_ui_text(prop, "Render Quality", "Quality when rendering");

prop = RNA_def_property(srna, "edit_quality", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, nullptr, "edit_quality");
RNA_def_property_enum_items(prop, node_quality_items);
RNA_def_property_ui_text(prop, "Edit Quality", "Quality when editing");

prop = RNA_def_property(srna, "use_viewer_border", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "flag", NTREE_VIEWER_BORDER);
RNA_def_property_ui_text(
Expand Down

0 comments on commit 149e547

Please sign in to comment.