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>2021-09-22 01:17:40 +0300
committerHans Goudey <h.goudey@me.com>2021-09-22 01:17:40 +0300
commit41e3bf8a8e79c8c42f72d49dea64b634aa243ff7 (patch)
tree970f85e06a569e80673e0c46f3a8d3765eb88d44 /source/blender/editors/space_node/node_draw.cc
parent8324ac84577cd96fe578dd905cc1eced823e2fef (diff)
Geometry Nodes: Add legacy warning and "View Legacy" operator
This commit adds warning messages to "legacy" nodes that will be removed in the future. The warning is shown in the node header, but it is not printed in the terminal or displayed in the modifier. It is also not propogated to node groups, but that is a more general task. If the modifier's node tree has executed a deprecated node, it will display a warning and a "Search" button that will select the nodes and pan to them in the node editor. This doesn't open child node trees and select nodes in there, because I want to keep this operator simple and avoid wasting a lot of time perfecting this behavior. Differential Revision: https://developer.blender.org/D12454
Diffstat (limited to 'source/blender/editors/space_node/node_draw.cc')
-rw-r--r--source/blender/editors/space_node/node_draw.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index aa241071425..10a3285be8b 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -1446,6 +1446,8 @@ static int node_error_type_to_icon(const geo_log::NodeWarningType type)
return ICON_ERROR;
case geo_log::NodeWarningType::Info:
return ICON_INFO;
+ case geo_log::NodeWarningType::Legacy:
+ return ICON_ERROR;
}
BLI_assert(false);
@@ -1456,6 +1458,8 @@ static uint8_t node_error_type_priority(const geo_log::NodeWarningType type)
{
switch (type) {
case geo_log::NodeWarningType::Error:
+ return 4;
+ case geo_log::NodeWarningType::Legacy:
return 3;
case geo_log::NodeWarningType::Warning:
return 2;