From bf1b47fad22bce0e88c507030c192aa216b0addd Mon Sep 17 00:00:00 2001 From: Rick van Dam Date: Mon, 13 Jul 2020 19:43:08 +0200 Subject: [PATCH] update camview settings --- .../EditorModules/CamView/CamViewPlugin.cs | 6 ++++ .../EditorModules/CamView/DefaultSettings.xml | 36 +++++++++++++++++++ .../CamView/Properties/Resources.Designer.cs | 27 ++++++++++++++ .../CamView/Properties/Resources.resx | 3 ++ 4 files changed, 72 insertions(+) create mode 100644 Source/Plugins/EditorModules/CamView/DefaultSettings.xml diff --git a/Source/Plugins/EditorModules/CamView/CamViewPlugin.cs b/Source/Plugins/EditorModules/CamView/CamViewPlugin.cs index 4690bf529..8520e21b5 100644 --- a/Source/Plugins/EditorModules/CamView/CamViewPlugin.cs +++ b/Source/Plugins/EditorModules/CamView/CamViewPlugin.cs @@ -53,6 +53,12 @@ protected override void SaveUserData(XElement node) this.camViews[i].SaveUserData(camViewElem); } } + + protected override XElement GetDefaultUserData() + { + return XElement.Parse(Properties.Resources.DefaultSettings); + } + protected override void LoadUserData(XElement node) { this.isLoading = true; diff --git a/Source/Plugins/EditorModules/CamView/DefaultSettings.xml b/Source/Plugins/EditorModules/CamView/DefaultSettings.xml new file mode 100644 index 000000000..c3c4371a8 --- /dev/null +++ b/Source/Plugins/EditorModules/CamView/DefaultSettings.xml @@ -0,0 +1,36 @@ + + + Parallax + 500 + + 64 + 64 + 64 + 0 + + + 0 + 0 + 0 + + Duality.Editor.Plugins.CamView.CamViewStates.SceneEditorCamViewState + + + + Duality.Editor.Plugins.CamView.CamViewLayers.RigidBodyJointCamViewLayer + Duality.Editor.Plugins.CamView.CamViewLayers.RigidBodyShapeCamViewLayer + Duality.Editor.Plugins.CamView.CamViewLayers.GridCamViewLayer + Duality.Editor.Plugins.CamView.CamViewLayers.BackPlateCamViewLayer + + + Duality.Components.Physics.RigidBody + + + + + Duality.Editor.Plugins.CamView.CamViewLayers.GridCamViewLayer + + + + + \ No newline at end of file diff --git a/Source/Plugins/EditorModules/CamView/Properties/Resources.Designer.cs b/Source/Plugins/EditorModules/CamView/Properties/Resources.Designer.cs index 5f2fbab53..06ed70b0e 100644 --- a/Source/Plugins/EditorModules/CamView/Properties/Resources.Designer.cs +++ b/Source/Plugins/EditorModules/CamView/Properties/Resources.Designer.cs @@ -60,6 +60,33 @@ internal Resources() { } } + /// + /// Looks up a localized string similar to <CamView id="0"> + /// <Perspective>Parallax</Perspective> + /// <FocusDist>500</FocusDist> + /// <BackgroundColor> + /// <R>64</R> + /// <G>64</G> + /// <B>64</B> + /// <A>0</A> + /// </BackgroundColor> + /// <SnapToGridSize> + /// <X>0</X> + /// <Y>0</Y> + /// <Z>0</Z> + /// </SnapToGridSize> + /// <ActiveState>Duality.Editor.Plugins.CamView.CamViewStates.SceneEditorCamViewState</ActiveState> + /// <States> + /// <State type="Duality.Editor.Plugins.CamView.CamViewStates.RigidBodyEditorCamViewState"> + /// <ActiveLayers> + /// <Item>Duality.Editor.Plugins.CamView. [rest of string was truncated]";. + /// + internal static string DefaultSettings { + get { + return ResourceManager.GetString("DefaultSettings", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/Source/Plugins/EditorModules/CamView/Properties/Resources.resx b/Source/Plugins/EditorModules/CamView/Properties/Resources.resx index e1de43026..0b14e07b1 100644 --- a/Source/Plugins/EditorModules/CamView/Properties/Resources.resx +++ b/Source/Plugins/EditorModules/CamView/Properties/Resources.resx @@ -139,4 +139,7 @@ ..\EmbeddedResources\RenderSetup.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\DefaultSettings.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + \ No newline at end of file