public override void OnEnable()
		{
			base.OnEnable();
			direction = (z_Direction) z_Pref.GetEnum(z_Pref.sculptDirection);
			// innerColor = z_Pref.GetColor(z_Pref.handleInnerColor);
			// outerColor = z_Pref.GetColor(z_Pref.handleOuterColor);
		}
示例#2
0
        public override void DrawGUI(z_BrushSettings settings)
        {
            base.DrawGUI(settings);

            EditorGUI.BeginChangeCheck();
            ignoreNonManifoldIndices = z_GUILayout.Toggle(gc_ignoreOpenEdges, ignoreNonManifoldIndices);
            if (EditorGUI.EndChangeCheck())
            {
                z_Pref.SetBool(ignoreNonManifoldIndicesPref, ignoreNonManifoldIndices);
            }

            if (direction == z_Direction.BrushNormal)
            {
                EditorGUI.BeginChangeCheck();
                brushNormalIsSticky = z_GUILayout.Toggle(gc_brushNormalIsSticky, brushNormalIsSticky);
                if (EditorGUI.EndChangeCheck())
                {
                    z_Pref.SetBool(brushNormalIsStickyPref, brushNormalIsSticky);
                }
            }

            EditorGUI.BeginChangeCheck();
            direction = (z_Direction)z_GUILayout.EnumPopup(gc_direction, direction);
            if (EditorGUI.EndChangeCheck())
            {
                z_Pref.SetInt(brushDirectionPref, (int)direction);
            }
        }
示例#3
0
 public override void OnEnable()
 {
     base.OnEnable();
     brushNormalIsSticky      = z_Pref.GetBool(brushNormalIsStickyPref);
     ignoreNonManifoldIndices = z_Pref.GetBool(ignoreNonManifoldIndicesPref);
     direction = (z_Direction)z_Pref.GetInt(brushDirectionPref);
 }
		public override void DrawGUI(z_BrushSettings settings)
		{
			base.DrawGUI(settings);

			GUILayout.Label(ModeSettingsHeader, z_GUI.headerTextStyle);

			ignoreNonManifoldIndices = EditorGUILayout.Toggle(gc_ignoreOpenEdges, ignoreNonManifoldIndices);

			EditorGUI.BeginChangeCheck();
			direction = (z_Direction) EditorGUILayout.EnumPopup(gc_direction, direction);
			if(EditorGUI.EndChangeCheck())
				EditorPrefs.SetInt(z_Pref.sculptDirection, (int) direction);
		}
示例#5
0
        /**
         *	Convert a direction to a vector.  If dir is Normal, 0 is returned.
         */
        public static Vector3 ToVector3(this z_Direction dir)
        {
            switch (dir)
            {
            case z_Direction.Up:
                return(Vector3.up);

            case z_Direction.Right:
                return(Vector3.right);

            case z_Direction.Forward:
                return(Vector3.forward);

            default:
                return(Vector3.zero);
            }
        }