Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Almost all uses of experimental flag are removed #620

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b5a27c5
No need for experimental watermark any more
andybak Jan 31, 2024
49434be
Brush replacement seems like an odd thing to tie to experimental mode…
andybak Jan 31, 2024
f43c654
Promote the alternate gif modes to regular features
andybak Jan 31, 2024
b25764b
remove dead "jogging mode" code
andybak Jan 31, 2024
7f09f4d
Dead code for USD intro scene that doesn't exist any more
andybak Jan 31, 2024
bd25df5
Make SkipIntro into a user setting
andybak Jan 31, 2024
55faeb5
No need to gatekeep USD import. Either it works or it doesn't
andybak Jan 31, 2024
eb35114
Pretty sure this makes sense. There's no way to create non-batched st…
andybak Jan 31, 2024
cc2e8e6
Probably not worth keeping - might relate to skipping intro? Easy to …
andybak Jan 31, 2024
36ad0a8
Move previous experimental mode shortcuts into a user config controll…
andybak Jan 31, 2024
92d2674
Moving the button to Labs so also move the related code
andybak Jan 31, 2024
0eb0ee2
Remove an experimental guard that doesn't make a difference as there'…
andybak Jan 31, 2024
c027a61
Allow all color picker modes that were previously experimental
andybak Jan 31, 2024
fdce3e5
Fixes a possible NRE
andybak Jan 31, 2024
97aed15
Probably safe to enable this now
andybak Jan 31, 2024
4f0450e
I've never noticed the presence or absence of this. Let's enable it a…
andybak Jan 31, 2024
840829f
Always show experimental buttons
andybak Jan 31, 2024
b39d2d0
Dead code
andybak Jan 31, 2024
6ce53a0
Keep this code for reference but never execute it
andybak Jan 31, 2024
751ddae
More dead code
andybak Jan 31, 2024
d08d1ec
Move experimental buttons to labs. Hide twitch, youtube and poly buttons
andybak Jan 31, 2024
baed680
Merge remote-tracking branch 'upstream/main' into feature/experimenta…
andybak Feb 28, 2024
f248b7b
Update text for the experimental mode button as it now only effects b…
andybak Feb 28, 2024
b6d1561
Merge remote-tracking branch 'upstream/main' into feature/experimenta…
andybak Mar 5, 2024
f866832
Code cleanup around brush catalog logic
andybak Mar 25, 2024
bf7d299
Missed out the english label change
andybak Mar 26, 2024
a66cbc9
Translation tweaks
andybak Apr 3, 2024
e683426
Merge remote-tracking branch 'upstream/main' into feature/experimenta…
andybak Apr 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
555 changes: 535 additions & 20 deletions Assets/Prefabs/Panels/LabsPanel.prefab

Large diffs are not rendered by default.

533 changes: 524 additions & 9 deletions Assets/Prefabs/Panels/LabsPanel_Mobile.prefab

Large diffs are not rendered by default.

16 changes: 5 additions & 11 deletions Assets/Scenes/Main.unity
Original file line number Diff line number Diff line change
Expand Up @@ -3652,7 +3652,7 @@ MonoBehaviour:
m_EnableGlbVersion2: 1
m_DebugUpload: 1
m_TbtSettings: {fileID: 11400000, guid: 86eb32a1d469be44a99294025e7795de, type: 2}
m_ReplaceBrushesOnLoad: 1
m_ReplaceBrushesOnLoad: 0
m_BrushReplacementMap: []
m_IntroSketchUsdFilename:
m_IntroSketchSpeed: 1
Expand Down Expand Up @@ -10703,35 +10703,30 @@ MonoBehaviour:
shader: {fileID: 4800000, guid: f9a08f3ab0b238144b0879d7e2f23a95, type: 3}
icon: {fileID: 2800000, guid: bc3c505962723cf44a605851212f406e, type: 3}
cylindrical: 1
experimental: 0
hdr: 0
- mode: 1
info:
shader: {fileID: 4800000, guid: 364d9b04fdb9b704bb3629008701d08e, type: 3}
icon: {fileID: 2800000, guid: 83ef8e3ba97ff0547b7be2042945a3b7, type: 3}
cylindrical: 0
experimental: 0
hdr: 0
- mode: 2
info:
shader: {fileID: 4800000, guid: 6261961f4821a79409739fd23c0c9afd, type: 3}
icon: {fileID: 2800000, guid: 49bb25c6aaecebd4db489bf5e3f45052, type: 3}
cylindrical: 0
experimental: 1
hdr: 0
- mode: 3
info:
shader: {fileID: 4800000, guid: 91c5170cd03857741b3200cd3c996595, type: 3}
icon: {fileID: 2800000, guid: 2950926868f0c9b4db5a871ce378909c, type: 3}
cylindrical: 1
experimental: 1
hdr: 0
- mode: 4
info:
shader: {fileID: 4800000, guid: 86a7aa4de119e334986bfae53f8889dd, type: 3}
icon: {fileID: 2800000, guid: f3301a86069400c44bb6d99e01af3ff6, type: 3}
cylindrical: 1
experimental: 1
hdr: 1
m_NumColors: 7
--- !u!114 &652605566
Expand Down Expand Up @@ -29738,7 +29733,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 778caecccd06f444ba3d7b451cfa06e9, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UxExplorationPrefab: {fileID: 0}
m_PanelMap:
- m_PanelPrefab: {fileID: 0}
m_ModeVr: 0
Expand Down Expand Up @@ -29808,13 +29802,13 @@ MonoBehaviour:
m_Advanced: 0
- m_PanelPrefab: {fileID: 176644, guid: 82e9561ccc4f9d646b8d328e8a736c62, type: 3}
m_ModeVr: 0
m_ModeVrExperimental: 1
m_ModeQuestExperimental: 1
m_ModeMono: 1
m_ModeVrExperimental: 0
m_ModeQuestExperimental: 0
m_ModeMono: 0
m_ModeQuest: 0
m_ModeGvr: 0
m_Basic: 0
m_Advanced: 1
m_Advanced: 0
- m_PanelPrefab: {fileID: 1543516286980528, guid: 8143a5d07ca44f3469740c23ad742c85,
type: 3}
m_ModeVr: 0
Expand Down
13 changes: 2 additions & 11 deletions Assets/Scripts/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public partial class App : MonoBehaviour
// want to have a different config file for your edition of the app.
public const string kConfigFileName = "Open Brush.cfg";
// The name of the App folder (In the user's Documents folder) - original Tilt Brush used "Tilt Brush"
// If you are forking Open Brush, you may want to leave this as "Open Brush" or not.
// If you are forking Open Brush, you may want to leave this as "Open Brush" or not.
public const string kAppFolderName = "Open Brush";
// The data folder used on Google Drive.
public const string kDriveFolderName = kAppDisplayName;
Expand Down Expand Up @@ -756,15 +756,6 @@ void Start()

SwitchState();

#if USD_SUPPORTED
if (Config.IsExperimental && !string.IsNullOrEmpty(Config.m_IntroSketchUsdFilename))
{
var gobject = ImportUsd.ImportWithAnim(Config.m_IntroSketchUsdFilename);

gobject.transform.SetParent(App.Scene.transform, false);
}
#endif

if (Config.m_AutoProfile || m_UserConfig.Profiling.AutoProfile)
{
StateChanged += AutoProfileOnStartAndQuit;
Expand Down Expand Up @@ -928,7 +919,7 @@ void Update()
{
OnIntroComplete();
}
else if (Config.IsExperimental)
else if (UserConfig.Flags.SkipIntro)
{
OnIntroComplete();
PanelManager.m_Instance.ReviveFloatingPanelsForStartup();
Expand Down
4 changes: 3 additions & 1 deletion Assets/Scripts/GUI/BaseButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ override protected void Awake()
// since some buttons are in prefabs rather than in the scene.
bool selfDestruct = m_AddOverlay;

if (m_AddOverlay && Config.IsExperimental)
// TODO Trace which buttons have this set and decide what to do
// If they are the labs panel then fine.
if (m_AddOverlay)
{
GameObject overlay = Instantiate(App.Config.m_LabsButtonOverlayPrefab);
overlay.transform.SetParent(transform, false);
Expand Down
30 changes: 0 additions & 30 deletions Assets/Scripts/GUI/PanelManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ public class PanelManager : MonoBehaviour

public const string kPlayerPrefAdvancedMode = "AdvancedMode";

[SerializeField] protected GameObject m_UxExplorationPrefab;

[SerializeField] protected PanelMapKey[] m_PanelMap;

[SerializeField] float m_WandPanelsRotationFeedbackInterval = 20.0f;
Expand Down Expand Up @@ -471,15 +469,6 @@ public void Init()
m_PanelsCustomized = false;
m_AdvancedModeRevealActive = false;

if (Config.IsExperimental)
{
// If we've got a UX exploration prefab, instantiate it here.
if (m_UxExplorationPrefab != null)
{
m_UxExploration = Instantiate(m_UxExplorationPrefab);
}
}

TintWandPaneVisuals(true);

// Set the MipMap bias for mobile builds (as there is more compression on the textures)
Expand Down Expand Up @@ -1101,15 +1090,6 @@ void UpdateWandPanelsOriginAngle(float fDiff, float fOffset = 0)

public void UpdatePanels()
{
if (Config.IsExperimental)
{
if (m_UxExploration != null)
{
LockUxExplorationToController();
return;
}
}

UnityEngine.Profiling.Profiler.BeginSample("PanelManager.UpdatePanels");
// Lock panels to the controller if we've got 6dof controls.
if (SketchControlsScript.m_Instance.ActiveControlsType ==
Expand Down Expand Up @@ -1668,16 +1648,6 @@ public void ResetPaneVisuals()
}
}

public void LockUxExplorationToController()
{
if (Config.IsExperimental)
{
Transform baseTransform = InputManager.Wand.Geometry.MainAxisAttachPoint;
m_UxExploration.transform.position = baseTransform.position;
m_UxExploration.transform.rotation = baseTransform.rotation;
}
}

public void LockPanelsToController()
{
Transform rBaseTransform = InputManager.Wand.Geometry.MainAxisAttachPoint;
Expand Down
4 changes: 0 additions & 4 deletions Assets/Scripts/GUI/TiltBrushWatermark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ void Refresh()
if (CameraConfig.Watermark && !App.Config.IsMobileHardware)
{
m_WatermarkStyle = WatermarkStyle.Standard;
if (Config.IsExperimental)
{
m_WatermarkStyle = WatermarkStyle.Labs;
}
}
}

Expand Down
16 changes: 5 additions & 11 deletions Assets/Scripts/Input/ControllerConsoleScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ void Awake()

InputManager.OnSwapControllers += AttachToBrush;

if (Config.IsExperimental)
{
m_AutosaveIcon.gameObject.SetActive(true);
}
m_AutosaveIcon.gameObject.SetActive(true);
}

void OnDestroy()
Expand Down Expand Up @@ -396,13 +393,10 @@ void UpdateBackgroundWidth()
vClockAnchorPos.x = -fBGWidth;
m_Clock.localPosition = vClockAnchorPos;

if (Config.IsExperimental)
{
//position autosave dot on the right hand side.
Vector3 vAutosavePos = m_AutosaveIcon.localPosition;
vAutosavePos.x = fBGWidth;
m_AutosaveIcon.localPosition = vAutosavePos;
}
//position autosave dot on the right hand side.
Vector3 vAutosavePos = m_AutosaveIcon.localPosition;
vAutosavePos.x = fBGWidth;
m_AutosaveIcon.localPosition = vAutosavePos;
}

private void AttachToBrush()
Expand Down
73 changes: 36 additions & 37 deletions Assets/Scripts/InputManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public enum SketchCommands
LockToController,
Scale,
Sensitivity,
Reset,
Reset, // Advanced Keyboard Shortcut mode only
Undo,
Redo,
Delete,
Expand Down Expand Up @@ -107,22 +107,21 @@ public enum KeyboardShortcut
Delete,
Abort,

SaveNew,
ExportAll,
SwitchCamera,
SaveNew, // Advanced Keyboard Shortcut mode only
SwitchCamera, // Advanced Keyboard Shortcut mode only
_Unused_1,
_Unused_4,
ViewOnly,
ToggleScreenMirroring,
PreviousTool,
NextTool,
ViewOnly, // Advanced Keyboard Shortcut mode only
ToggleScreenMirroring, // Advanced Keyboard Shortcut mode only
PreviousTool, // Advanced Keyboard Shortcut mode only
NextTool, // Advanced Keyboard Shortcut mode only
_Unused_2,
_Unused_3,
CycleSymmetryMode,
Export,
StoreHeadTransform,
RecallHeadTransform,
ToggleLightType,
CycleSymmetryMode, // Advanced Keyboard Shortcut mode only
Export, // Advanced Keyboard Shortcut mode only
StoreHeadTransform, // Advanced Keyboard Shortcut mode only
RecallHeadTransform, // Advanced Keyboard Shortcut mode only
ToggleLightType, // Advanced Keyboard Shortcut mode only

CheckStrokes,

Expand All @@ -137,11 +136,11 @@ public enum KeyboardShortcut

PositionMonoCamera,

ToggleHeadStationaryOrWobble,
ToggleHeadStationaryOrFollow,
ToggleHeadStationaryOrWobble, // Advanced Keyboard Shortcut mode only
ToggleHeadStationaryOrFollow, // Advanced Keyboard Shortcut mode only

DecreaseSlowFollowSmoothing,
IncreaseSlowFollowSmoothing,
DecreaseSlowFollowSmoothing, // Advanced Keyboard Shortcut mode only
IncreaseSlowFollowSmoothing, // Advanced Keyboard Shortcut mode only

ToggleGVRAudio,

Expand All @@ -150,14 +149,14 @@ public enum KeyboardShortcut
ExtendDemoTimer,
InstantUpload,

TossWidget,
TossWidget, // Advanced Keyboard Shortcut mode only

ToggleProfile,
ToggleProfile, // Advanced Keyboard Shortcut mode only
CameraMoveLeft,
CameraMoveRight,
CameraMoveUp,
CameraMoveDown,
FlyMode,
FlyMode, // Advanced Keyboard Shortcut mode only
InvertLook,
SprintMode
}
Expand All @@ -176,23 +175,23 @@ public enum KeyboardShortcut
{ (int)KeyboardShortcut.AdvanceTimeline, new[] { Key.Equals } },
{ (int)KeyboardShortcut.TimelineHome, new[] { Key.Home } },
{ (int)KeyboardShortcut.TimelineEnd, new[] { Key.End } },
{ (int)KeyboardShortcut.Reset, new[] { Key.Space } },
{ (int)KeyboardShortcut.Reset, new[] { Key.Space } }, // Advanced Keyboard Shortcut mode only
{ (int)KeyboardShortcut.Undo, new[] { Key.Z } },
{ (int)KeyboardShortcut.Redo, new[] { Key.X } },
{ (int)KeyboardShortcut.Delete, new[] { Key.Delete } },
{ (int)KeyboardShortcut.Abort, new[] { Key.Escape } },

{ (int)KeyboardShortcut.SaveNew, new[] { Key.S } },
{ (int)KeyboardShortcut.ToggleProfile, new[] { Key.K } },
{ (int)KeyboardShortcut.SaveNew, new[] { Key.S } }, // Advanced Keyboard Shortcut mode only
{ (int)KeyboardShortcut.ToggleProfile, new[] { Key.K } }, // Advanced Keyboard Shortcut mode only
// Context-dependent
{ (int)KeyboardShortcut.SwitchCamera, new[] { Key.C } },
{ (int)KeyboardShortcut.ViewOnly, new[] { Key.H } },
{ (int)KeyboardShortcut.ToggleScreenMirroring, new[] { Key.M } },
{ (int)KeyboardShortcut.PreviousTool, new[] { Key.LeftArrow } },
{ (int)KeyboardShortcut.NextTool, new[] { Key.RightArrow } },
{ (int)KeyboardShortcut.CycleSymmetryMode, new[] { Key.F2 } },
{ (int)KeyboardShortcut.Export, new[] { Key.E } },
{ (int)KeyboardShortcut.StoreHeadTransform, new[] { Key.O } }, // Also checks for shift
{ (int)KeyboardShortcut.SwitchCamera, new[] { Key.C } }, // Advanced Keyboard Shortcut mode only
{ (int)KeyboardShortcut.ViewOnly, new[] { Key.H } }, // Advanced Keyboard Shortcut mode only
{ (int)KeyboardShortcut.ToggleScreenMirroring, new[] { Key.M } }, // Advanced Keyboard Shortcut mode only
{ (int)KeyboardShortcut.PreviousTool, new[] { Key.LeftArrow } }, // Advanced Keyboard Shortcut mode only
{ (int)KeyboardShortcut.NextTool, new[] { Key.RightArrow } }, // Advanced Keyboard Shortcut mode only
{ (int)KeyboardShortcut.CycleSymmetryMode, new[] { Key.F2 } }, // Advanced Keyboard Shortcut mode only
{ (int)KeyboardShortcut.Export, new[] { Key.E } }, // Advanced Keyboard Shortcut mode only
{ (int)KeyboardShortcut.StoreHeadTransform, new[] { Key.O } }, // Also checks for shift. Advanced Keyboard Shortcut mode only
{ (int)KeyboardShortcut.RecallHeadTransform, new[] { Key.O } },
{ (int)KeyboardShortcut.ToggleLightType, new[] { Key.P } },

Expand All @@ -209,15 +208,15 @@ public enum KeyboardShortcut

{ (int)KeyboardShortcut.PositionMonoCamera, new[] { Key.LeftAlt, Key.RightAlt } },

{ (int)KeyboardShortcut.ToggleHeadStationaryOrWobble, new[] { Key.Q } },
{ (int)KeyboardShortcut.ToggleHeadStationaryOrFollow, new[] { Key.W } },
{ (int)KeyboardShortcut.ToggleHeadStationaryOrWobble, new[] { Key.Q } }, // Advanced Keyboard Shortcut mode only
{ (int)KeyboardShortcut.ToggleHeadStationaryOrFollow, new[] { Key.W } }, // Advanced Keyboard Shortcut mode only

{ (int)KeyboardShortcut.DecreaseSlowFollowSmoothing, new[] { Key.E } },
{ (int)KeyboardShortcut.IncreaseSlowFollowSmoothing, new[] { Key.R } },
{ (int)KeyboardShortcut.DecreaseSlowFollowSmoothing, new[] { Key.E } }, // Advanced Keyboard Shortcut mode only
{ (int)KeyboardShortcut.IncreaseSlowFollowSmoothing, new[] { Key.R } }, // Advanced Keyboard Shortcut mode only

{ (int)KeyboardShortcut.ToggleGVRAudio, new[] { Key.Backquote } },

{ (int)KeyboardShortcut.TossWidget, new[] { Key.Y } },
{ (int)KeyboardShortcut.TossWidget, new[] { Key.Y } }, // Advanced Keyboard Shortcut mode only
};

// Separate keymap for when we launch but no VR headset is detected.
Expand All @@ -229,7 +228,7 @@ public enum KeyboardShortcut
{ (int)KeyboardShortcut.CameraMoveRight, new[] { Key.D } },
{ (int)KeyboardShortcut.CameraMoveUp, new[] { Key.Q } },
{ (int)KeyboardShortcut.CameraMoveDown, new[] { Key.E } },
{ (int)KeyboardShortcut.FlyMode, new[] { Key.F } },
{ (int)KeyboardShortcut.FlyMode, new[] { Key.F } }, // Advanced Keyboard Shortcut mode only
{ (int)KeyboardShortcut.InvertLook, new[] { Key.I } },
{ (int)KeyboardShortcut.SprintMode, new[] { Key.LeftShift } },
};
Expand Down
7 changes: 2 additions & 5 deletions Assets/Scripts/Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,7 @@ out ImportMaterialCollector
GameObject LoadUsd(List<string> warnings)
{
#if USD_SUPPORTED
if (Config.IsExperimental)
{
return ImportUsd.Import(m_Location.AbsolutePath, out warnings);
}
return ImportUsd.Import(m_Location.AbsolutePath, out warnings);
#endif
m_LoadError = new LoadError("usd not supported");
return null;
Expand Down Expand Up @@ -546,7 +543,7 @@ public void LoadModelAsync(bool useThreadedImageLoad)

bool allowUsd = false;
#if USD_SUPPORTED
allowUsd = Config.IsExperimental;
allowUsd = true;
#endif

// Experimental usd loading.
Expand Down
9 changes: 3 additions & 6 deletions Assets/Scripts/ModelCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,9 @@ void ProcessDirectory(string sPath, Dictionary<string, Model> oldModels)
// Models we download from Poly are called ".gltf2", but ".gltf" is more standard
string[] extensions = { ".obj", ".fbx", ".gltf2", ".gltf", ".glb", ".ply" };

if (Config.IsExperimental)
{
var l = new List<string>(extensions);
l.AddRange(new string[] { ".usda", ".usdc", ".usd" });
extensions = l.ToArray();
}
var l = new List<string>(extensions);
l.AddRange(new string[] { ".usda", ".usdc", ".usd" });
extensions = l.ToArray();

for (int i = 0; i < aFiles.Length; ++i)
{
Expand Down
Loading
Loading