Пример #1
0
    public override void onParmChange()
    {
        base.onParmChange();

        if (prGeoType == HAPI_GeoType.HAPI_GEOTYPE_CURVE && prIsEditable)
        {
            prParms.setChangedParametersIntoHost();

            if (prAsset)
            {
                prAsset.build(
                    false,                                      // reload_asset
                    false,                                      // unload_asset_first
                    false,                                      // serializatin_recovery_only
                    false,                                      // force_reconnect
                    false,                                      // is_duplication
                    prAsset.prCookingTriggersDownCooks,
                    true                                        // use_delay_for_progress_bar
                    );
            }

            createAndInitCurve(prNodeId, prObjectId, prGeoId, prIsEditable);

#if UNITY_EDITOR
            // To keep things consistent with Unity workflow, we should not save parameter changes
            // while in Play mode.
            if (!EditorApplication.isPlaying && !EditorApplication.isPlayingOrWillChangePlaymode)
            {
                prAsset.prPresetsMap.set(getFullControlNameAndPath(), HoudiniHost.getPreset(prNodeId));
            }
#endif // UNITY_EDITOR
        }
    }