public override void OnNodeGUI() { bool updatePreview = false; GUILayout.Space(EditorGUIUtility.singleLineHeight * 1.2f); EditorGUI.BeginChangeCheck(); Rect pos = EditorGUILayout.GetControlRect(false, 100); curve = EditorGUI.CurveField(pos, curve); if (EditorGUI.EndChangeCheck()) { updatePreview = true; notifyDataChanged = true; UpdateTerrain(); sCurve.SetAnimationCurve(curve); } if (inputTerrain != null) { if (inputTerrain.type == SamplerType.Sampler2D) { PWGUI.Sampler2DPreview(outputTerrain as Sampler2D, needUpdate || updatePreview); } else { } } }
public override void OnNodeEnable() { delayedChanges.BindCallback(notifyKey, (unused) => { NotifyReload(); CurveTerrain(); sCurve.SetAnimationCurve(curve); }); }