Esempio n. 1
0
    void OnEnable()
    {
        mTexAlignWizard  = Resources.Load("curvyalignwiz") as Texture2D;
        mTexExportWizard = Resources.Load("curvyexportwiz") as Texture2D;
        mTexCenterPivot  = Resources.Load("curvycenterpivot") as Texture2D;
        mTexClonePath    = Resources.Load("curvyclonepath") as Texture2D;
        mTexMeshPath     = Resources.Load("curvymeshpath") as Texture2D;
        mTexHelp         = Resources.Load("curvyhelp") as Texture2D;
        mTexPrefs        = Resources.Load("curvyprefs") as Texture2D;
        CurvyPreferences.Get();

        tInterpolation          = serializedObject.FindProperty("Interpolation");
        tClosed                 = serializedObject.FindProperty("Closed");
        tAutoEndTangents        = serializedObject.FindProperty("AutoEndTangents");
        tInitialUp              = serializedObject.FindProperty("InitialUpVector");
        tOrientation            = serializedObject.FindProperty("Orientation");
        tSwirl                  = serializedObject.FindProperty("Swirl");
        tSwirlTurns             = serializedObject.FindProperty("SwirlTurns");
        tGranularity            = serializedObject.FindProperty("Granularity");
        tShowApprox             = serializedObject.FindProperty("ShowApproximation");
        tShowOrientation        = serializedObject.FindProperty("ShowOrientation");
        tShowTangents           = serializedObject.FindProperty("ShowTangents");
        tAutoRefresh            = serializedObject.FindProperty("AutoRefresh");
        tAutoRefreshLength      = serializedObject.FindProperty("AutoRefreshLength");
        tAutoRefreshOrientation = serializedObject.FindProperty("AutoRefreshOrientation");
        tT              = serializedObject.FindProperty("Tension");
        tC              = serializedObject.FindProperty("Continuity");
        tB              = serializedObject.FindProperty("Bias");
        tShowGizmos     = serializedObject.FindProperty("ShowGizmos");
        tUserValueSize  = serializedObject.FindProperty("UserValueSize");
        tShowUserValues = serializedObject.FindProperty("ShowUserValues");

        Target.Refresh(true, true, false);
        SceneView.RepaintAll();
    }
    void OnEnable()
    {
        CurvyPreferences.Get();
        EditorApplication.hierarchyWindowItemOnGUI += OnHierarchyWindowItemOnGUI;
        tSmoothTangent = serializedObject.FindProperty("SmoothEdgeTangent");
        tSyncStartEnd  = serializedObject.FindProperty("SynchronizeTCB");
        tT0            = serializedObject.FindProperty("StartTension");
        tC0            = serializedObject.FindProperty("StartContinuity");
        tB0            = serializedObject.FindProperty("StartBias");
        tT1            = serializedObject.FindProperty("EndTension");
        tC1            = serializedObject.FindProperty("EndContinuity");
        tB1            = serializedObject.FindProperty("EndBias");
        tOT            = serializedObject.FindProperty("OverrideGlobalTension");
        tOC            = serializedObject.FindProperty("OverrideGlobalContinuity");
        tOB            = serializedObject.FindProperty("OverrideGlobalBias");
        tHandleIn      = serializedObject.FindProperty("HandleIn");
        tHandleOut     = serializedObject.FindProperty("HandleOut");
        tFreeHandles   = serializedObject.FindProperty("FreeHandles");
        tHandleScale   = serializedObject.FindProperty("HandleScale");

        mTexSetFirstCP  = Resources.Load("curvysetfirstcp") as Texture2D;
        mTexConstraints = Resources.Load("curvyconstraints") as Texture2D;
        mTexSplit       = Resources.Load("curvysplit") as Texture2D;
        mTexJoin        = Resources.Load("curvyjoin") as Texture2D;
        mTexConnection  = Resources.Load("curvyconnection") as Texture2D;
        mTexDelete      = Resources.Load("curvydelete") as Texture2D;
        mTexSelect      = Resources.Load("curvyselect") as Texture2D;
    }
Esempio n. 3
0
    void OnEnable()
    {
        CurvyPreferences.Get();
        constraints = Target.Position;

        tSmoothTangent = serializedObject.FindProperty("SmoothEdgeTangent");
        tSyncStartEnd  = serializedObject.FindProperty("SynchronizeTCB");
        tT0            = serializedObject.FindProperty("StartTension");
        tC0            = serializedObject.FindProperty("StartContinuity");
        tB0            = serializedObject.FindProperty("StartBias");
        tT1            = serializedObject.FindProperty("EndTension");
        tC1            = serializedObject.FindProperty("EndContinuity");
        tB1            = serializedObject.FindProperty("EndBias");
        tOT            = serializedObject.FindProperty("OverrideGlobalTension");
        tOC            = serializedObject.FindProperty("OverrideGlobalContinuity");
        tOB            = serializedObject.FindProperty("OverrideGlobalBias");

        mTexSetFirstCP  = Resources.Load("curvysetfirstcp") as Texture2D;
        mTexConstraints = Resources.Load("curvyconstraints") as Texture2D;
    }