Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-03-16 16:51:11 +0300
committerHans Goudey <h.goudey@me.com>2022-03-16 16:51:11 +0300
commit943b919fe807b53558631bcbc688c2d712d6b0cc (patch)
treec1c141866f50eb1f28e1875195395c8582898cc2 /source/blender/modifiers
parentcb267cec5552c17092a99999e4e352bf266b578f (diff)
Geometry Nodes: Remove legacy node code
This commit removes the implementations of legacy nodes, their type definitions, and related code that becomes unused. Now that we have two releases that included the legacy nodes, there is not much reason to include them still. Removing the code means refactoring will be easier, and old code doesn't have to be tested and maintained. After this commit, the legacy nodes will be undefined in the UI, so 3.0 or 3.1 should be used to convert files to the fields system. The net change is 12184 lines removed! The tooltip for legacy nodes mentioned that we would remove them before 4.0, which was purposefully a bit vague to allow us this flexibility. In a poll in a devtalk post showed that the majority of people were okay with removing the nodes. https://devtalk.blender.org/t/geometry-nodes-backward-compatibility-poll/20199 Differential Revision: https://developer.blender.org/D14353
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_nodes.cc14
-rw-r--r--source/blender/modifiers/intern/MOD_nodes_evaluator.cc14
2 files changed, 2 insertions, 26 deletions
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index 7cf425c6e27..0b3d9a6a8ad 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -1607,29 +1607,17 @@ static void panel_draw(const bContext *C, Panel *panel)
}
/* Draw node warnings. */
- bool has_legacy_node = false;
if (nmd->runtime_eval_log != nullptr) {
const geo_log::ModifierLog &log = *static_cast<geo_log::ModifierLog *>(nmd->runtime_eval_log);
log.foreach_node_log([&](const geo_log::NodeLog &node_log) {
for (const geo_log::NodeWarning &warning : node_log.warnings()) {
- if (warning.type == geo_log::NodeWarningType::Legacy) {
- has_legacy_node = true;
- }
- else if (warning.type != geo_log::NodeWarningType::Info) {
+ if (warning.type != geo_log::NodeWarningType::Info) {
uiItemL(layout, warning.message.c_str(), ICON_ERROR);
}
}
});
}
- if (has_legacy_node) {
- uiLayout *row = uiLayoutRow(layout, false);
- uiItemL(row, TIP_("Node tree has legacy node"), ICON_ERROR);
- uiLayout *sub = uiLayoutRow(row, false);
- uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT);
- uiItemO(sub, "", ICON_VIEWZOOM, "NODE_OT_geometry_node_view_legacy");
- }
-
modifier_panel_end(layout, ptr);
}
diff --git a/source/blender/modifiers/intern/MOD_nodes_evaluator.cc b/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
index c4aa023faa6..3733b3f69ad 100644
--- a/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
+++ b/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
@@ -980,15 +980,11 @@ class GeometryNodesEvaluator {
void execute_geometry_node(const DNode node, NodeState &node_state, NodeTaskRunState *run_state)
{
+ using Clock = std::chrono::steady_clock;
const bNode &bnode = *node->bnode();
NodeParamsProvider params_provider{*this, node, node_state, run_state};
GeoNodeExecParams params{params_provider};
- if (node->idname().find("Legacy") != StringRef::not_found) {
- params.error_message_add(geo_log::NodeWarningType::Legacy,
- TIP_("Legacy node will be removed before Blender 4.0"));
- }
- using Clock = std::chrono::steady_clock;
Clock::time_point begin = Clock::now();
bnode.typeinfo->geometry_node_execute(params);
Clock::time_point end = Clock::now();
@@ -1004,14 +1000,6 @@ class GeometryNodesEvaluator {
NodeState &node_state,
NodeTaskRunState *run_state)
{
- if (node->idname().find("Legacy") != StringRef::not_found) {
- /* Create geometry nodes params just for creating an error message. */
- NodeParamsProvider params_provider{*this, node, node_state, run_state};
- GeoNodeExecParams params{params_provider};
- params.error_message_add(geo_log::NodeWarningType::Legacy,
- TIP_("Legacy node will be removed before Blender 4.0"));
- }
-
LinearAllocator<> &allocator = local_allocators_.local();
bool any_input_is_field = false;