mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-01 16:38:13 +08:00
Hide node parameters connected to a NodeInput::Scope in the Properties panel (#4284)
Hide inputs connected to a scope in properties panel
This commit is contained in:
@@ -2281,6 +2281,14 @@ pub(crate) fn generate_node_properties(node_id: NodeId, context: &mut NodeProper
|
|||||||
} else {
|
} else {
|
||||||
let number_of_inputs = context.network_interface.number_of_inputs(&node_id, context.selection_network_path);
|
let number_of_inputs = context.network_interface.number_of_inputs(&node_id, context.selection_network_path);
|
||||||
for input_index in 1..number_of_inputs {
|
for input_index in 1..number_of_inputs {
|
||||||
|
// Hide inputs that are connected to a scope
|
||||||
|
if let Some(NodeInput::Scope(_)) = context
|
||||||
|
.network_interface
|
||||||
|
.input_from_connector(&InputConnector::node(node_id, input_index), context.selection_network_path)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
let row = context.call_widget_override(&node_id, input_index).unwrap_or_else(|| {
|
let row = context.call_widget_override(&node_id, input_index).unwrap_or_else(|| {
|
||||||
let Some(implementation) = context.network_interface.implementation(&node_id, context.selection_network_path) else {
|
let Some(implementation) = context.network_interface.implementation(&node_id, context.selection_network_path) else {
|
||||||
log::error!("Could not get implementation for node {node_id}");
|
log::error!("Could not get implementation for node {node_id}");
|
||||||
|
|||||||
Reference in New Issue
Block a user