feat(plugin,node): bridge parametric params into the node/inspector path
- ValueType::Parametric; the node input carries the whole curve set as NodeValue::Text(JSON) so undo and project serialization come for free - translation pass builds the input with the default-curve JSON and the dimension/range/ui-colour properties - edits flow both ways: node input (UI) -> curves_from_json -> set_ofx(Parametric) on the instance; plugin-side Set/Add/Delete -> notify_instance_changed -> JSON written back to the input (undoable) - screenshot example: gate the macOS-only offscreen capture items so the workspace tests build on Linux/Windows
This commit is contained in:
@@ -399,12 +399,13 @@ pub fn set_input_undoable(
|
||||
}
|
||||
|
||||
/// 以 undoable 方式设置节点的标准输入值(字符串族输入:Text /
|
||||
/// StrCombo——POD 不携带字符串数据)。
|
||||
/// StrCombo / Parametric——POD 不携带字符串数据)。
|
||||
///
|
||||
/// 按输入的声明类型([`oaknode::value::ValueType`])选存储变体:
|
||||
/// `StrCombo` → [`oaknode::value::NodeValue::StrCombo`],其余
|
||||
/// 字符串族(Text)→ [`oaknode::value::NodeValue::Text`]。声明类型
|
||||
/// 不是字符串族 → [`NodeBridgeError::NotStringInput`]。命令语义与
|
||||
/// `StrCombo` → [`oaknode::value::NodeValue::StrCombo`],
|
||||
/// `Text` / `Parametric`(值 = 曲线 JSON 文本)→
|
||||
/// [`oaknode::value::NodeValue::Text`]。声明类型不是字符串族 →
|
||||
/// [`NodeBridgeError::NotStringInput`]。命令语义与
|
||||
/// [`set_input_undoable`] 相同。
|
||||
pub fn set_input_string_undoable(
|
||||
node: &NodeRef,
|
||||
@@ -425,7 +426,9 @@ pub fn set_input_string_undoable(
|
||||
};
|
||||
let nv = match declared {
|
||||
oaknode::value::ValueType::StrCombo => oaknode::value::NodeValue::StrCombo(value.to_string()),
|
||||
oaknode::value::ValueType::Text => oaknode::value::NodeValue::Text(value.to_string()),
|
||||
oaknode::value::ValueType::Text | oaknode::value::ValueType::Parametric => {
|
||||
oaknode::value::NodeValue::Text(value.to_string())
|
||||
}
|
||||
_ => return Err(NodeBridgeError::NotStringInput(input.to_string())),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user