private void SetupForCam(AssetCAM asset)
        {
            AddRow();

            Button buttonGetPos = new Button()
            {
                Dock = DockStyle.Fill, Text = "Get View Position", AutoSize = true
            };

            buttonGetPos.Click += (object sender, EventArgs e) =>
            {
                asset.SetPosition(Program.MainForm.renderer.Camera.Position);

                propertyGridAsset.Refresh();
                archive.UnsavedChanges = true;
            };
            tableLayoutPanel1.Controls.Add(buttonGetPos);

            Button buttonGetDir = new Button()
            {
                Dock = DockStyle.Fill, Text = "Get View Direction", AutoSize = true
            };

            buttonGetDir.Click += (object sender, EventArgs e) =>
            {
                asset.SetNormalizedForward(Program.MainForm.renderer.Camera.Forward);
                asset.SetNormalizedUp(Program.MainForm.renderer.Camera.Up);
                asset.SetNormalizedLeft(Program.MainForm.renderer.Camera.Right);

                propertyGridAsset.Refresh();
                archive.UnsavedChanges = true;
            };
            tableLayoutPanel1.Controls.Add(buttonGetDir);
        }
Exemple #2
0
        public InternalCamEditor(AssetCAM asset, ArchiveEditorFunctions archive)
        {
            InitializeComponent();
            TopMost = true;

            this.asset   = asset;
            this.archive = archive;

            propertyGridAsset.SelectedObject = asset;
            labelAssetName.Text = $"[{asset.AHDR.assetType.ToString()}] {asset.ToString()}";
            propertyGridCamSpecific.SelectedObject = asset.CamSpecific;
        }
 public CamSpecific_Generic(AssetCAM asset) : base(asset, 0x60)
 {
 }
 public CamSpecific_Follow(AssetCAM asset) : base(asset)
 {
 }