コード例 #1
0
 public void AppendTarget(MDL0Node model)
 {
     if (!_targetModels.Contains(model))
         _targetModels.Add(model);
     if (!models.Items.Contains(model))
         models.Items.Add(model);
     ModelPanel.AddTarget(model);
     model.ApplyCHR(null, 0);
     model.ApplySRT(null, 0);
     model._renderBones = true;
 }
コード例 #2
0
        public void LoadModel(MDL0Node model)
        {
            model.Populate();
            model._renderAttribs._renderBones = false;
            model._renderAttribs._renderPolygons = true;
            model._renderAttribs._renderWireframe = false;
            model._renderAttribs._renderVertices = false;
            model.ApplyCHR(null, 0);
            model.ApplySRT(null, 0);

            if (UseExceptions) foreach (string texname in TexturesToDisable) {
                MDL0TextureNode tex = model.TextureGroup.FindChild(texname, false) as MDL0TextureNode;
                if (tex != null) {
                    tex.Enabled = false;
                }
            }

            modelPanel1.ClearAll();
            modelPanel1.AddTarget((IRenderedObject)model);

            if (UseExceptions && PolygonsToDisable.ContainsKey(_charString)) {
                foreach (int polygonNum in PolygonsToDisable[_charString]) {
                    MDL0ObjectNode poly = model.PolygonGroup.FindChild("polygon" + polygonNum, false) as MDL0ObjectNode;
                    if (poly != null) poly.IsRendering = false;
                }
            }

            Box box = model.GetBox();
            Vector3 min = box.Min, max = box.Max;
            if (ZoomOut) {
                min._x += 20;
                max._x -= 20;
            }
            modelPanel1.SetCamWithBox(min, max);
        }
コード例 #3
0
 private void UpdateModel(MDL0Node model)
 {
     int frame = CurrentFrame;
     if (_chr0 != null && !(TargetAnimType != AnimType.CHR && !playCHR0ToolStripMenuItem.Checked))
         model.ApplyCHR(_chr0, frame);
     else
         model.ApplyCHR(null, 0);
     if (_srt0 != null && !(TargetAnimType != AnimType.SRT && !playSRT0ToolStripMenuItem.Checked))
         model.ApplySRT(_srt0, frame);
     else
         model.ApplySRT(null, 0);
     if (_shp0 != null && !(TargetAnimType != AnimType.SHP && !playSHP0ToolStripMenuItem.Checked))
         model.ApplySHP(_shp0, frame);
     else
         model.ApplySHP(null, 0);
     if (_pat0 != null && !(TargetAnimType != AnimType.PAT && !playPAT0ToolStripMenuItem.Checked))
         model.ApplyPAT(_pat0, frame);
     else
         model.ApplyPAT(null, 0);
     if (_vis0 != null && !(TargetAnimType != AnimType.VIS && !playVIS0ToolStripMenuItem.Checked))
         if (model == TargetModel)
             ReadVIS0();
         else
             model.ApplyVIS(_vis0, frame);
     if (_clr0 != null && !(TargetAnimType != AnimType.CLR && !playCLR0ToolStripMenuItem.Checked))
         model.ApplyCLR(_clr0, frame);
     else
         model.ApplyCLR(null, 0);
 }
コード例 #4
0
 private void UpdateModel(MDL0Node model)
 {
     if (_chr0 != null && playCHR0ToolStripMenuItem.Checked)
         model.ApplyCHR(_chr0, _animFrame);
     else
         model.ApplyCHR(null, 0);
     if (_srt0 != null && playSRT0ToolStripMenuItem.Checked)
         model.ApplySRT(_srt0, _animFrame);
     else
         model.ApplySRT(null, 0);
     if (_shp0 != null && playSHP0ToolStripMenuItem.Checked)
         model.ApplySHP(_shp0, _animFrame);
     else
         model.ApplySHP(null, 0);
     if (_pat0 != null && playPAT0ToolStripMenuItem.Checked)
         model.ApplyPAT(_pat0, _animFrame);
     else
         model.ApplyPAT(null, 0);
     if (_vis0 != null && playVIS0ToolStripMenuItem.Checked)
         if (model == TargetModel)
             ReadVIS0();
         else
             model.ApplyVIS(_vis0, _animFrame);
     if (_scn0 != null)// && playSCN0ToolStripMenuItem.Checked)
         model.SetSCN0Frame(_animFrame);
     else
         model.SetSCN0Frame(0);
     if (_clr0 != null && playCLR0ToolStripMenuItem.Checked)
         model.ApplyCLR(_clr0, _animFrame);
     else
         model.ApplyCLR(null, 0);
 }