Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

678 lines
19 KiB

  1. //========= Copyright (c) 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. //
  9. // Half-Life Model Viewer (c) 1999 by Mete Ciragan
  10. //
  11. // file: ControlPanel.h
  12. // last modified: May 29 programs and associated files contained in this
  13. // distribution were developed by Mete Ciragan. The programs
  14. // are not in the public domain, but they are freely
  15. // distributable without licensing fees. These programs are
  16. // provided without guarantee or warrantee expressed or
  17. // implied.
  18. //
  19. // version: 1.2
  20. //
  21. // email: [email protected]
  22. // web: http://www.swissquake.ch/chumbalum-soft/
  23. //
  24. #ifndef INCLUDED_CONTROLPANEL
  25. #define INCLUDED_CONTROLPANEL
  26. #ifndef INCLUDED_MXWINDOW
  27. #include <mxtk/mxWindow.h>
  28. #endif
  29. #define IDC_TAB 1901
  30. #define IDC_RENDERMODE 2001
  31. #define IDC_GROUND 2003
  32. #define IDC_MOVEMENT 2004
  33. #define IDC_BACKGROUND 2005
  34. #define IDC_HITBOXES 2006
  35. #define IDC_BONES 2007
  36. #define IDC_ATTACHMENTS 2008
  37. #define IDC_PHYSICSMODEL 2009
  38. #define IDC_PHYSICSHIGHLIGHT 2010
  39. #define IDC_LODCHOICE 2011
  40. #define IDC_AUTOLOD 2012
  41. #define IDC_LODSWITCH 2013
  42. #define IDC_SOFTWARESKIN 2014
  43. #define IDC_OVERBRIGHT2 2015
  44. #define IDC_RENDER_FOV 2016
  45. #define IDC_SEQUENCEBOXES 2017
  46. #define IDC_RUNIK 2018
  47. #define IDC_HEADTURN 2019
  48. #define IDC_NORMALS 2020
  49. #define IDC_TANGENTFRAME 2021
  50. #define IDC_NORMALMAP 2022
  51. #define IDC_SPECULAR 2023
  52. #define IDC_SHADOW 2024
  53. #define IDC_ILLUMPOSITION 2025
  54. #define IDC_OVERLAY_WIREFRAME 2026
  55. #define IDC_PLAYSOUNDS 2027
  56. #define IDC_MESSAGES 2028
  57. #define IDC_SHADERS 2029
  58. #define IDC_SHOWORIGINAXIS 2030
  59. #define IDC_ORIGINAXISLENGTH 2031
  60. #define IDC_DISPLACEMENTMAP 2032
  61. #define IDC_EYELOOK 2033
  62. #define IDC_INCLUDEDMODELS 2034
  63. #define IDC_DRAWHITBOXSET 2035
  64. #define IDC_DRAWHITBOXNUMBER 2036
  65. #define IDC_MATERIALVARMATS 2037
  66. #define IDC_MATERIALVARPARAMS 2038
  67. #define IDC_ROLL_BODYGROUPS 2039
  68. #define IDC_EXPLORE_TO_VMT 2040
  69. #define IDC_BONEWEIGHTINDEX 2041
  70. #define IDC_MATVARSLIDERMATRIX 2050
  71. #define IDC_MATVAREDIT 2051
  72. #define IDC_MATVARCOLORPICKER 2052
  73. #define IDC_MATVARSLIDERFLOAT 2053
  74. #ifdef MATERIAL_SCRIPT_SAVE_FEATURE
  75. #define IDC_MATVARSAVE 2054
  76. #endif
  77. #define IDC_MATVARLOAD 2055
  78. #define IDC_MATVARCOPYTOCLIPBOARD 2056
  79. #define MAX_SEQUENCES 5
  80. #define IDC_SEQUENCE0 3000
  81. #define IDC_SEQUENCE1 3001
  82. #define IDC_SEQUENCE2 3002
  83. #define IDC_SEQUENCE3 3003
  84. #define IDC_SEQUENCE4 3004
  85. #define IDC_SEQUENCESCALE0 3005
  86. #define IDC_SEQUENCESCALE1 3006
  87. #define IDC_SEQUENCESCALE2 3007
  88. #define IDC_SEQUENCESCALE3 3008
  89. #define IDC_SEQUENCESCALE4 3009
  90. #define IDC_FRAMESELECTION0 3010
  91. #define IDC_FRAMESELECTION1 3011
  92. #define IDC_FRAMESELECTION2 3012
  93. #define IDC_FRAMESELECTION3 3013
  94. #define IDC_FRAMESELECTION4 3014
  95. #define IDC_SEQUENCEFILTER0 3020
  96. #define IDC_SEQUENCEFILTER1 3021
  97. #define IDC_SEQUENCEFILTER2 3022
  98. #define IDC_SEQUENCEFILTER3 3023
  99. #define IDC_SEQUENCEFILTER4 3024
  100. #define NUM_POSEPARAMETERS 8
  101. #define IDC_POSEPARAMETER_SCALE 3100
  102. #define IDC_POSEPARAMETER 3120
  103. #define IDC_POSEPARAMETER_VALUE 3140
  104. #define IDC_SPEEDSCALE 3201
  105. #define IDC_FORCEFRAME 3202
  106. #define IDC_BLENDSEQUENCECHANGES 3203
  107. #define IDC_BLENDNOW 3204
  108. #define IDC_BLENDTIME 3205
  109. #define IDC_ACTIVITY_MODIFIERS 3206
  110. #define IDC_ANIMATEWEAPONS 3207
  111. #define IDC_BODYPART 4001
  112. #define IDC_SUBMODEL 4002
  113. #define IDC_CONTROLLER 4003
  114. #define IDC_CONTROLLERVALUE 4004
  115. #define IDC_SKINS 4005
  116. #define IDC_MATERIALS 4006
  117. #define IDC_BODYGROUPPRESET 4007
  118. #define IDC_BONE_NAMES 4999
  119. #define IDC_BONE_BONELIST 5000
  120. #define IDC_BONE_GENERATEQC 5001
  121. #define IDC_BONE_HIGHLIGHT_BONE 5002
  122. #define IDC_BONE_HITBOXLIST 5003
  123. #define IDC_BONE_SURFACEPROP 5004
  124. #define IDC_BONE_HIGHLIGHT_HITBOX 5005
  125. #define IDC_BONE_ADD_HITBOX 5006
  126. #define IDC_BONE_DELETE_HITBOX 5007
  127. #define IDC_BONE_APPLY_TO_CHILDREN 5008
  128. #define IDC_BONE_SHOW_DEFAULT_POSE 5009
  129. #define IDC_BONE_HITBOX_ORIGINX 5010
  130. #define IDC_BONE_HITBOX_ORIGINY 5011
  131. #define IDC_BONE_HITBOX_ORIGINZ 5012
  132. #define IDC_BONE_HITBOX_SIZEX 5013
  133. #define IDC_BONE_HITBOX_SIZEY 5014
  134. #define IDC_BONE_HITBOX_SIZEZ 5015
  135. #define IDC_BONE_HITBOX_GROUP 5016
  136. #define IDC_BONE_UPDATE_HITBOX 5017
  137. #define IDC_BONE_USE_AUTOGENERATED_HITBOXES 5018
  138. #define IDC_BONE_HITBOXSET 5019
  139. #define IDC_BONE_HITBOXADDSET 5020
  140. #define IDC_BONE_HITBOXDELETESET 5021
  141. #define IDC_BONE_HITBOXSETNAME 5022
  142. #define IDC_BONE_HITBOXSETNAME_EDIT 5023
  143. #define IDC_BONE_HITBOX_EDITMODE 5024
  144. // This range is reserved for the attachment window.
  145. #define IDC_ATTACHMENT_WINDOW_FIRST 5024
  146. #define IDC_ATTACHMENT_WINDOW_LAST 5100
  147. #define IDC_BONE_HITBOX_NAME 5101
  148. #define IDC_BONE_SAVE_HITBOXES 5102
  149. #define IDC_BONE_LOAD_HITBOXES 5103
  150. #define IDC_FLEX 7001
  151. #define IDC_FLEXDEFAULTS 7002
  152. #define IDC_FLEXRANDOM 7003
  153. #define IDC_FLEXZERO 7004
  154. #define IDC_FLEXONE 7005
  155. #define IDC_FLEXSCALE 7101
  156. #define NUM_FLEX_SLIDERS 48
  157. #define IDC_PHYS_FIRST 7501
  158. #define IDC_PHYS_BONE 7501
  159. #define IDC_PHYS_CON_LINK_LIMITS 7502
  160. #define IDC_PHYS_MATERIAL 7503
  161. #define IDC_PHYS_CON_MIN 7504
  162. #define IDC_PHYS_CON_MAX 7505
  163. #define IDC_PHYS_CON_TEST 7506
  164. #define IDC_PHYS_P_MASSBIAS 7507
  165. #define IDC_PHYS_CON_FRICTION 7508
  166. //#define IDC_PHYS_P_ELASTICITY 7509
  167. #define IDC_PHYS_P_INERTIA 7510
  168. #define IDC_PHYS_P_DAMPING 7511
  169. #define IDC_PHYS_P_ROT_DAMPING 7512
  170. #define IDC_PHYS_MASS 7513
  171. #define IDC_PHYS_QCFILE 7514
  172. #define IDC_PHYS_CON_AXIS_X 7515
  173. #define IDC_PHYS_CON_AXIS_Y 7516
  174. #define IDC_PHYS_CON_AXIS_Z 7517
  175. #define IDC_PHYS_CON_TYPE_FREE 7518
  176. #define IDC_PHYS_CON_TYPE_FIXED 7519
  177. #define IDC_PHYS_CON_TYPE_LIMIT 7520
  178. #define IDC_PHYS_LAST 7599
  179. #define IDC_SOFT_FIRST 7600
  180. #define IDC_SOFT_MASS 7600
  181. #define IDC_SOFT_BONE 7601
  182. #define IDC_SOFT_CON_AXIS_X 7603
  183. #define IDC_SOFT_CON_AXIS_Y 7604
  184. #define IDC_SOFT_CON_AXIS_Z 7605
  185. #define IDC_SOFT_SIMULATE 7606
  186. #define IDC_SOFT_SHOW_POLYGONS 7610
  187. #define IDC_SOFT_SHOW_EDGES 7611
  188. #define IDC_SOFT_SHOW_BASES 7612
  189. #define IDC_SOFT_SHOW_WIND 7613
  190. #define IDC_SOFT_SHOW_INDICES 7614
  191. #define IDC_SOFT_ITERATIONS 7615
  192. #define IDC_SOFT_WIND_YAW 7616
  193. #define IDC_SOFT_WIND_STRENGTH 7617
  194. #define IDC_SOFT_SURFACE_STRETCH 7618
  195. #define IDC_SOFT_THREAD_STRETCH 7619
  196. #define IDC_SOFT_SIMD 7620
  197. #define IDC_SOFT_GRAVITY 7621
  198. #define IDC_SOFT_VELOCITY_DAMPING 7622
  199. #define IDC_SOFT_SHOW_COLLISION 7623
  200. #define IDC_SOFT_LAST 7699
  201. #define MAX_ANIMS 4
  202. #define IDC_ANIMX 8020 // through 8023 ( MAX_ANIMS )
  203. #define IDC_ANIMY 8030 // through 8033 ( MAX_ANIMS )
  204. #define IDC_IKRULE_CHAIN 9000
  205. #define IDC_IKRULE_CHOICE 9001
  206. #define IDC_IKRULE_TOUCH 9002
  207. #define IDC_IKRULE_ATTACHMENT 9003
  208. #define IDC_IKRULE_RANGE_TOGGLE 9004
  209. #define IDC_IKRULE_RANGE_START 9005
  210. #define IDC_IKRULE_RANGE_PEAK 9006
  211. #define IDC_IKRULE_RANGE_TAIL 9007
  212. #define IDC_IKRULE_RANGE_END 9008
  213. #define IDC_IKRULE_RANGE_START_NOW 9009
  214. #define IDC_IKRULE_RANGE_PEAK_NOW 9010
  215. #define IDC_IKRULE_RANGE_TAIL_NOW 9011
  216. #define IDC_IKRULE_RANGE_END_NOW 9012
  217. #define IDC_IKRULE_CONTACT_TOGGLE 9013
  218. #define IDC_IKRULE_CONTACT_FRAME_NOW 9014
  219. #define IDC_IKRULE_CONTACT_FRAME 9015
  220. #define IDC_IKRULE_USING 9016
  221. #define IDC_IKRULE_QC_STRING 9017
  222. #define IDC_SUBMODEL_LOADMERGEDMODEL 9018
  223. #define IDC_SUBMODEL_UNLOADMERGEDMODEL 9019
  224. #define IDC_SUBMODEL_UNLOADALLMERGEDMODELS 9020
  225. #define IDC_SUBMODEL_LOADMERGEDMODEL_STEAM 9021
  226. #define IDC_SUBMODEL_UPDATE_SELECTION 9022
  227. #define IDC_SUBMODEL_UPDATE_BONESELECTION 9023
  228. #define IDC_COMPILE_UPDATE_QCPATHSELECTION 9024
  229. #define IDC_COMPILE_REMOVEFROMLIST 9025
  230. #define IDC_COMPILE_CALLSTUDIOMDL 9026
  231. #define IDC_COMPILE_OPENLOGFILE 9027
  232. #define IDC_COMPILE_EXPLORETOQC 9028
  233. #define IDC_COMPILE_LOADMODELFILE 9029
  234. #define IDC_COMPILE_SELECTEDTOGGLE 9030
  235. #define IDC_EVENT_SOUND_FRAME_NOW 6000
  236. #define IDC_EVENT_SOUND_FRAME 6001
  237. #define IDC_EVENT_SOUND_NAME 6002
  238. #define IDC_EVENT_QC_STRING 6003
  239. class mxTab;
  240. class mxChoice;
  241. class mxCheckBox;
  242. class mxSlider;
  243. class mxLineEdit;
  244. class mxLineEdit2;
  245. class mxLabel;
  246. class mxListBox;
  247. class mxButton;
  248. class mxRadioButton;
  249. class MatSysWindow;
  250. class TextureWindow;
  251. class CBoneControlWindow;
  252. class CAttachmentsWindow;
  253. class CStudioHdr;
  254. // Return codes from loadModel.
  255. enum LoadModelResult_t
  256. {
  257. LoadModel_Success = 0,
  258. LoadModel_LoadFail,
  259. LoadModel_NoModel,
  260. LoadModel_PostLoadFail,
  261. };
  262. class ControlPanel : public mxWindow
  263. {
  264. mxWindow *wRender;
  265. mxTab *tab;
  266. mxChoice *cRenderMode;
  267. mxChoice *cHighlightBone;
  268. mxChoice *cDrawHitBoxSet;
  269. mxChoice *cDrawHitBoxNumber;
  270. mxCheckBox *cbGround;
  271. mxCheckBox *cbHitBoxes;
  272. mxCheckBox *cbSequenceBoxes;
  273. mxCheckBox *cbShadow;
  274. mxCheckBox *cbMovement;
  275. mxCheckBox *cbBackground;
  276. mxCheckBox *cbSoftwareSkin;
  277. mxCheckBox *cbOverbright2;
  278. mxCheckBox *cbAttachments;
  279. mxCheckBox *cbBones;
  280. mxCheckBox *cbNormals;
  281. mxCheckBox *cbNormalMap;
  282. mxCheckBox *cbDisplacementMap;
  283. // mxCheckBox *cbParallaxMap;
  284. mxCheckBox *cbTangentFrame;
  285. mxCheckBox *cbOverlayWireframe;
  286. mxCheckBox *cbSpecular;
  287. mxCheckBox *cbRunIK;
  288. mxCheckBox *cbEnableHead;
  289. mxCheckBox *cbIllumPosition;
  290. mxCheckBox *cbPlaySounds;
  291. mxCheckBox *cbShowOriginAxis;
  292. mxSlider *leOriginAxisLength;
  293. mxChoice *cIncludedModels;
  294. mxChoice *cbBoneWeightInspectIndex;
  295. mxLabel *lblBoneWeightInspectValues;
  296. mxChoice *cLODChoice;
  297. mxCheckBox *cbAutoLOD;
  298. mxLineEdit *leLODSwitch;
  299. mxLabel *lLODMetric;
  300. mxChoice *cSequence[MAX_SEQUENCES];
  301. mxLabel *laFilters;
  302. mxLineEdit *leSequenceFilter[MAX_SEQUENCES];
  303. mxSlider *slSequence[MAX_SEQUENCES];
  304. int m_iLastSequenceCount;
  305. int *iSelectionToSequence[MAX_SEQUENCES]; // selection to sequence
  306. int *iSequenceToSelection[MAX_SEQUENCES]; // sequence to selection
  307. mxLabel *laGroundSpeed;
  308. mxSlider *slSpeedScale;
  309. mxLabel *laFPS;
  310. mxLabel *laBlendAmount;
  311. mxChoice *cPoseParameter[NUM_POSEPARAMETERS];
  312. mxSlider *slPoseParameter[NUM_POSEPARAMETERS];
  313. mxLineEdit *lePoseParameter[NUM_POSEPARAMETERS];
  314. mxLineEdit *leFOV;
  315. mxSlider *slBlendTime;
  316. mxLabel *laBlendTime;
  317. mxChoice *cActivityModifiers;
  318. mxSlider *slForceFrame;
  319. mxLabel *lForcedFrame;
  320. mxRadioButton *rbFrameSelection[MAX_SEQUENCES];
  321. mxChoice *cBodypart, *cController, *cSubmodel, *cBodyGroupPreset;
  322. mxSlider *slController;
  323. mxChoice *cSkin;
  324. mxChoice *cMaterials;
  325. mxLabel *lModelInfo1, *lModelInfo2, *lModelInfo3, *lModelInfo4;
  326. //mxChoice *cTextures;
  327. //mxCheckBox *cbChrome;
  328. //mxLabel *lTexSize;
  329. //mxLineEdit *leWidth, *leHeight;
  330. mxLineEdit *leMeshScale, *leBoneScale;
  331. MatSysWindow *d_MatSysWindow;
  332. TextureWindow *d_textureWindow;
  333. mxChoice *cFlex[NUM_FLEX_SLIDERS];
  334. mxSlider *slFlexScale[NUM_FLEX_SLIDERS];
  335. mxChoice *cPhysicsBone;
  336. mxChoice *cSoftbodyCtrl;
  337. mxCheckBox *cbSoftbodyPolygons;
  338. mxCheckBox *cbSoftbodyWind;
  339. mxCheckBox *cbSoftbodyIndices;
  340. mxCheckBox *cbSoftbodyCollision;
  341. mxCheckBox *cbSoftbodyEdges;
  342. mxCheckBox *cbSoftbodyBases;
  343. mxCheckBox *cbSoftbodyEnableSimd;
  344. mxCheckBox *cbSoftbodySimulate;
  345. mxRadioButton *rbConstraintAxis[ 3 ];
  346. mxRadioButton *rbSoftbodyAxis[ 3 ];
  347. mxSlider *slPhysicsFriction;
  348. mxLabel *lPhysicsFriction;
  349. mxLabel *leSoftbodyIterations;
  350. mxSlider *slSoftbodyIterations;
  351. mxSlider *slSoftbodyWindYaw;
  352. mxSlider *slSoftbodyWindStrength;
  353. mxSlider *slSoftbodyGravity;
  354. mxSlider *slSoftbodyVelocityDamping;
  355. mxSlider *slSoftbodySurfaceStretch;
  356. mxSlider *slSoftbodyThreadStretch;
  357. mxSlider *slPhysicsConMin;
  358. mxLabel *lPhysicsConMin;
  359. mxCheckBox *cbLinked; // links min/max sliders
  360. mxSlider *slPhysicsConMax;
  361. mxLabel *lPhysicsConMax;
  362. mxSlider *slPhysicsConTest;
  363. mxLineEdit *leMass;
  364. mxSlider *slPhysicsParamMassBias;
  365. mxLabel *lPhysicsParamMassBias;
  366. mxSlider *slPhysicsParamFriction;
  367. mxLabel *lPhysicsParamFriction;
  368. mxSlider *slPhysicsParamElasticity;
  369. mxLabel *lPhysicsParamElasticity;
  370. mxSlider *slPhysicsParamInertia;
  371. mxLabel *lPhysicsParamInertia;
  372. mxSlider *slPhysicsParamDamping;
  373. mxLabel *lPhysicsParamDamping;
  374. mxSlider *slPhysicsParamRotDamping;
  375. mxLabel *lPhysicsParamRotDamping;
  376. mxLabel *lPhysicsMaterial;
  377. mxChoice *cIKChain;
  378. mxChoice *cIKType;
  379. mxLabel *lIKTouch;
  380. mxChoice *cIKTouch;
  381. mxLabel *lIKAttachment;
  382. mxLineEdit *leIKAttachment;
  383. mxCheckBox *cbIKRangeToggle;
  384. mxLineEdit2 *leIKRangeStart;
  385. mxLineEdit2 *leIKRangePeak;
  386. mxLineEdit2 *leIKRangeTail;
  387. mxLineEdit2 *leIKRangeEnd;
  388. mxCheckBox *cbIKContactToggle;
  389. mxLineEdit2 *leIKContactFrame;
  390. mxChoice *cIKUsing;
  391. mxLineEdit2 *leIKQCString;
  392. mxLineEdit2 *leEventSoundFrame;
  393. mxListBox *lbEventSoundName;
  394. mxLineEdit2 *leEventQCString;
  395. mxListBox *lbEventHistory;
  396. mxLabel *lEventSequence;
  397. float m_lastEventCycle;
  398. CBoneControlWindow* m_pBoneWindow;
  399. CAttachmentsWindow* m_pAttachmentsWindow;
  400. mxListBox *cMessageList;
  401. mxListBox *cShaderUsed;
  402. mxButton *m_bRandomizeWeaponModuleSlots;
  403. mxButton *m_bExploreToMaterial;
  404. int m_iSavedSequences[MAX_SEQUENCES];
  405. float m_flSavedWeights[MAX_SEQUENCES];
  406. mxListBox *cMaterialList;
  407. mxListBox *cMaterialParamList;
  408. mxLineEdit2 *leMaterialParamText;
  409. mxButton *bMaterialParamColor;
  410. mxCheckBox *cbMaterialParamMultiEdit;
  411. #ifdef MATERIAL_SCRIPT_SAVE_FEATURE
  412. mxButton *bMaterialParamSave;
  413. mxLineEdit2 *leMaterialParamSavePath;
  414. mxCheckBox *cbMaterialParamSaveRun;
  415. mxLineEdit2 *leMaterialParamSaveRun;
  416. #endif
  417. mxButton *bMaterialParamLoad;
  418. mxButton *bMaterialParamCopyToClipboard;
  419. mxSlider *slMaterialParamMatrixSliderScaleX;
  420. mxSlider *slMaterialParamMatrixSliderScaleY;
  421. mxSlider *slMaterialParamMatrixSliderRotation;
  422. mxSlider *slMaterialParamMatrixSliderTranslateX;
  423. mxSlider *slMaterialParamMatrixSliderTranslateY;
  424. mxSlider *slMaterialParamFloat;
  425. mxLabel *lblMatrixScaleX;
  426. mxLabel *lblMatrixScaleY;
  427. mxLabel *lblMatrixRotation;
  428. mxLabel *lblMatrixTranslateX;
  429. mxLabel *lblMatrixTranslateY;
  430. mxListBox *cSubmodelList;
  431. mxButton *bSubmodelAdd;
  432. mxButton *bSubmodelAddSteam;
  433. mxButton *bSubmodelRemoveAll;
  434. mxButton *bSubmodelRemoveSelected;
  435. mxChoice *cSubmodelAttachTo;
  436. mxChoice *cSubmodelLocalAttachOrigin;
  437. mxListBox *cCompileRecentQCpaths;
  438. mxLabel *lblFullQCPath;
  439. mxButton *bCompileQCRemoveFromList;
  440. mxButton *bCompileQCCompile;
  441. mxButton *bCompileQCLoadModel;
  442. mxButton *bCompileQCShowCompileOutput;
  443. mxButton *bCompileQCBrowseToQC;
  444. mxButton *bCompileQCWhenSelected;
  445. bool bCompileSelectedToggle;
  446. mxLabel *lblCompileWarningOrError;
  447. mxListBox *cCompileQCOutput;
  448. int nCompileLastUpdateTick;
  449. public:
  450. // CREATORS
  451. ControlPanel( mxWindow *parent );
  452. virtual ~ControlPanel ();
  453. virtual void OnDelete();
  454. // MANIPULATORS
  455. int handleEvent( mxEvent *event );
  456. int handlePhysicsEvent( mxEvent *event );
  457. int handleSoftbodyEvent( mxEvent *event );
  458. void UpdateConstraintSliders( int clamp );
  459. void setupPhysics( void );
  460. void setupPhysicsBone( int boneIndex );
  461. void setupPhysicsAxis( int boneIndex, int axis );
  462. int getPhysicsAxis( void );
  463. void setPhysicsAxis( int axisIndex );
  464. int getSoftbodyAxis( void );
  465. void setSoftbodyAxis( int axisIndex );
  466. void writePhysicsData( void );
  467. void handlePhysicsKey( mxEvent *event );
  468. // void readPhysicsMaterials( mxChoice *pList );
  469. void dumpModelInfo ();
  470. LoadModelResult_t loadModel( const char *filename );
  471. LoadModelResult_t loadModel( const char *filename, int slot );
  472. void OnLoadModel( void );
  473. void resetControlPanel( void );
  474. void setRenderMode( int mode );
  475. void setShowGround( bool b );
  476. void setShowMovement( bool b );
  477. void setShowBackground( bool b );
  478. void setShowNormals( bool b );
  479. void setShowTangentFrame( bool b );
  480. void setOverlayWireframe( bool b );
  481. void setDisplacementMapping( bool b );
  482. void setShowShadow( bool b );
  483. void setShowHitBoxes( bool b );
  484. void setShowBones( bool b );
  485. void setShowAttachments( bool b );
  486. void setHighlightBone( int index );
  487. void setLOD( int index, bool setLODchoice, bool force );
  488. void setAutoLOD( bool b );
  489. void setSoftwareSkin( bool b );
  490. void setOverbright( bool b );
  491. void setLODMetric( float metric );
  492. void setPolycount( int polycount );
  493. void setTransparent( bool isTransparent );
  494. void updatePoseParameters( void );
  495. void setFOV( float fov );
  496. void setPlaySounds( bool b );
  497. void setShowOriginAxis( bool b );
  498. void setOriginAxisLength( float originAxisLength );
  499. void updateSequenceSizes( int tabWidth );
  500. void initSequenceChoices( int iOnlyInitSlot = -1 );
  501. void setSequence( int nSequence );
  502. void showActivityModifiers( int sequence );
  503. void GetSequenceFilter( int sequenceSlot, char *pszFilterBuf, int iBufSize );
  504. void updateGroundSpeed( void );
  505. void setOverlaySequence( int num, int nSequence, float weight );
  506. void updateTransitionAmount();
  507. void startBlending( void );
  508. void setSpeedScale ( float scale );
  509. void updateSpeedScale( void );
  510. void setBlend( int index, float value );
  511. int getFrameSelection( void );
  512. void setFrame( float frame );
  513. void updateFrameSelection( void );
  514. void updateFrameSlider( void );
  515. void UpdateEventHistory( void );
  516. void initBodypartChoices();
  517. void setBodypart( int index );
  518. void setSubmodel( int index );
  519. void initBoneControllers();
  520. void setBoneController( int index );
  521. void setBoneControllerValue (int index, float value);
  522. void initSkinChoices();
  523. void initMaterialChoices();
  524. void setModelInfo();
  525. void initPhysicsBones();
  526. void initIncludedModels();
  527. void initLODs();
  528. void centerView();
  529. void UpdateMaterialList ();
  530. void centerVerts();
  531. void viewmodelView();
  532. void cs_gunsidemodelView();
  533. void dotaView();
  534. void fullscreen();
  535. void setMatSysWindow( MatSysWindow *window ) { d_MatSysWindow = window; }
  536. void ConvertFlexData();
  537. void MapExtraFlexes( int nSlot );
  538. void initFlexes();
  539. int GetCurrentHitboxSet( void );
  540. void BuildIKRuleQCString();
  541. void UpdateIKRuleWindow();
  542. void BuildEventQCString();
  543. void CreateSortedSequenceList( CStudioHdr* hdr, int *pSequence );
  544. void SetFrameSlider( float flFrame );
  545. int GetSequenceForSelection( int sequenceSlot, int selection );
  546. int SetSequenceForSelection( int sequenceSlot, int selection, int sequence );
  547. int GetSelectionForSequence( int sequenceSlot, int sequence );
  548. int SetSelectionForSequence( int sequenceSlot, int sequence, int selection );
  549. void SaveSelectedSequences( void );
  550. void RestoreSelectedSequences( void );
  551. void UpdateMaterialVars( void );
  552. void setCameraOrigin( float flX, float flY, float flZ );
  553. void setCameraAngles( float flX, float flY, float flZ );
  554. void setLightAngles( float flX, float flY, float flZ );
  555. void setMaterialVar( const char *p_szMatParameterName, const char *p_szMatParameterValue );
  556. void UpdateSubmodelWindow( void );
  557. void UpdateSubmodelSelection( void );
  558. void redrawMatSysWin( void );
  559. public:
  560. // Sets up the main tabs
  561. void SetupRenderWindow( mxTab* pTab );
  562. void SetupSequenceWindow( mxTab* pTab );
  563. void SetupBoneControlWindow( mxTab* pTab );
  564. void SetupBodyWindow( mxTab* pTab );
  565. void SetupFlexWindow( mxTab* pTab );
  566. void SetupPhysicsWindow( mxTab* pTab );
  567. void SetupSoftbodyWindow( mxTab* pTab );
  568. void SetupAttachmentsWindow( mxTab *pTab );
  569. void SetupIKRuleWindow( mxTab *pTab );
  570. void SetupEventWindow( mxTab *pTab );
  571. void SetupMatVarWindow( mxTab *pTab );
  572. void SetupSubmodelWindow( mxTab *pTab );
  573. void SetupCompileWindow( mxTab *pTab );
  574. bool m_bVMTInfoLoaded;
  575. void AddQCRecordPath( const char* szPath, bool bCompileWhenLoaded = false );
  576. void UpdateQCPathPanel( bool bUpdateList = true, int nForceSelection = -1 );
  577. void CompileTimerUpdate( void );
  578. void CompileSelectedIndex( void );
  579. void UpdateBoneWeightInspect( void );
  580. };
  581. extern ControlPanel *g_ControlPanel;
  582. #endif // INCLUDED_CONTROLPANEL