예제 #1
0
 public static bool BeginFoldout(bool show, string label)
 {
     LilyGUI.BeginIndent(10);
     show = EditorGUILayout.Foldout(show, label);
     LilyGUI.BeginIndent(10);
     return(show);
 }
예제 #2
0
    void StitchingPanel()
    {
        cont.overlap = LilyGUI.PercentageField(overlapLabel, cont.overlap);
        cont.stitchingOrientation = (Transform)EditorGUILayout.ObjectField(orientationLabel, cont.stitchingOrientation, typeof(Transform), true);
        cont.showStitchLines      = GUILayout.Toggle(cont.showStitchLines, showLinesLabel);

        showAdvanced = LilyGUI.BeginFoldout(showAdvanced, "Advanced");
        if (showAdvanced)
        {
            LilyGUI.OptionalIntField(faceSizeLabel, ref cont.enableCubeFaceSize, ref cont.cubeFaceSize);

            cont.doubleRender = GUILayout.Toggle(cont.doubleRender, doubleRenderLabel);
            EditorGUI.BeginDisabledGroup(cont.overlap == 0);
            cont.smoothStitching = GUILayout.Toggle(cont.smoothStitching, smoothStitchingLabel);
            EditorGUI.EndDisabledGroup();
        }
        LilyGUI.EndFoldout();
    }
예제 #3
0
    void OutputPanel()
    {
        cont.prefix  = LilyGUI.DirnameField(prefixLabel, cont.prefix);
        cont.format  = (LilyRender360.Format)EditorGUILayout.EnumPopup(formatLabel, cont.format);
        cont.nDigits = EditorGUILayout.IntSlider(nDigitsLabel, cont.nDigits, 1, 7);

        // Int field with presets for output width
        EditorGUILayout.BeginHorizontal();
        cont.width = EditorGUILayout.IntField(widthLabel, cont.width);
        GUILayout.Space(-5);
        int i = EditorGUILayout.Popup(-1, presetNames, GUILayout.MaxWidth(15));

        if (i > -1)
        {
            cont.width = presetValues[i];
        }
        EditorGUILayout.EndHorizontal();

        LilyGUI.OptionalIntField(heightLabel, ref cont.enableHeight, ref cont.height);

        cont.overwriteFile = GUILayout.Toggle(cont.overwriteFile, overwriteLabel);
    }
예제 #4
0
    public override void OnInspectorGUI()
    {
        cont = (LilyRender360)target;
        cont.ChechParameters();

        LilyGUI.BeginPanel("Output");
        OutputPanel();
        LilyGUI.EndPanel();

        LilyGUI.BeginPanel("Time");
        TimePanel();
        LilyGUI.EndPanel();

        LilyGUI.BeginPanel("Projection");
        ProjectionPanel();
        LilyGUI.EndPanel();

        LilyGUI.BeginPanel("Stitching");
        StitchingPanel();
        LilyGUI.EndPanel();

        InfoPanel();
    }
예제 #5
0
 public static void EndFoldout()
 {
     LilyGUI.EndIndent();
     LilyGUI.EndIndent();
 }
예제 #6
0
 void TimePanel()
 {
     cont.targetFramerate = EditorGUILayout.IntField(framerateLabel, cont.targetFramerate);
     cont.startFrame      = EditorGUILayout.IntField(startFrameLabel, cont.startFrame);
     LilyGUI.OptionalIntField(endFrameLabel, ref cont.enableEndFrame, ref cont.endFrame);
 }