Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_realize_instances.cc
| Show All 32 Lines | |||||
| { | { | ||||
| uiItemR(layout, ptr, "legacy_behavior", 0, nullptr, ICON_NONE); | uiItemR(layout, ptr, "legacy_behavior", 0, nullptr, ICON_NONE); | ||||
| } | } | ||||
| static void node_geo_exec(GeoNodeExecParams params) | static void node_geo_exec(GeoNodeExecParams params) | ||||
| { | { | ||||
| const bool legacy_behavior = params.node().custom1 & GEO_NODE_REALIZE_INSTANCES_LEGACY_BEHAVIOR; | const bool legacy_behavior = params.node().custom1 & GEO_NODE_REALIZE_INSTANCES_LEGACY_BEHAVIOR; | ||||
| if (legacy_behavior) { | |||||
| params.error_message_add(NodeWarningType::Info, | |||||
| "This node uses legacy behavior with regards to attributes on " | |||||
| "instances. The behavior can be changed in the node properties in " | |||||
| "the side bar. In most cases the new and old behavior is the same " | |||||
HooglyBoogly: I think the subject is plural ("new //and// old"), so "is" should be "are".
Though actually… | |||||
| "for files created in Blender 3.0"); | |||||
HooglyBooglyUnsubmitted Not Done Inline ActionsAdding TIP_ wouldn't hurt in case some translator wants to translate this before the release. HooglyBoogly: Adding `TIP_` wouldn't hurt in case some translator wants to translate this before the release. | |||||
| } | |||||
| GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry"); | GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry"); | ||||
| geometry::RealizeInstancesOptions options; | geometry::RealizeInstancesOptions options; | ||||
| options.keep_original_ids = legacy_behavior; | options.keep_original_ids = legacy_behavior; | ||||
| options.realize_instance_attributes = !legacy_behavior; | options.realize_instance_attributes = !legacy_behavior; | ||||
| geometry_set = geometry::realize_instances(geometry_set, options); | geometry_set = geometry::realize_instances(geometry_set, options); | ||||
| params.set_output("Geometry", std::move(geometry_set)); | params.set_output("Geometry", std::move(geometry_set)); | ||||
| } | } | ||||
| Show All 14 Lines | |||||
I think the subject is plural ("new and old"), so "is" should be "are".
Though actually, the sentence could be simplified slightly, since the comparison to the old behavior is implied:
"In most cases the new behavior is the same for files created in Blender 3.0"