Panda3D
Loading...
Searching...
No Matches
maxOptionsDialog.h
1/*
2 maxEggExpOptions.h
3 Created by Phillip Saltzman, 2/15/05
4 Carnegie Mellon University, Entetainment Technology Center
5
6 This file contains a class that allows users to specify
7 export options, and then execute the export
8*/
9
10#ifndef __maxEggExpOptions__H
11#define __maxEggExpOptions__H
12
13#include "pathReplace.h"
14
15#pragma conform(forScope, off)
16
17/* Externed Globals */
18extern HINSTANCE hInstance;
19
20// Saveload chunk definitions
21#define CHUNK_OVERWRITE_FLAG 0x1000
22#define CHUNK_PVIEW_FLAG 0x1001
23#define CHUNK_LOG_OUTPUT 0x1002
24#define CHUNK_EGG_EXP_OPTIONS 0x1100
25#define CHUNK_ANIM_TYPE 0x1101
26#define CHUNK_EGG_CHECKED 0x1102
27#define CHUNK_DBL_SIDED 0x1103
28#define CHUNK_SF 0x1104
29#define CHUNK_EF 0x1105
30#define CHUNK_FILENAME 0x1106
31#define CHUNK_SHORTNAME 0x1107
32#define CHUNK_EXPORT_FULL 0x1108
33#define CHUNK_ALL_FRAMES 0x1109
34#define CHUNK_NODE_LIST 0x1200
35#define CHUNK_NODE_HANDLE 0x1201
36// #define CHUNK_ADD_COLLISION 0x1202 #define CHUNK_CS_TYPE 0x1203
37// #define CHUNK_CF_TYPE 0x1204
38
39// Global functions
40void ChunkSave(ISave *isave, int chunkid, int value);
41void ChunkSave(ISave *isave, int chunkid, bool value);
42void ChunkSave(ISave *isave, int chunkid, char *value);
43TCHAR *ChunkLoadString(ILoad *iload, TCHAR *buffer, int maxLength);
44int ChunkLoadInt(ILoad *iload);
45bool ChunkLoadBool(ILoad *iload);
46void SetICustEdit(HWND wnd, int nIDDlgItem, TCHAR *text);
47INT_PTR CALLBACK MaxOptionsDialogProc(HWND hWnd, UINT message,
48 WPARAM wParam, LPARAM lParam );
49
51{
53
54 enum Anim_Type {
55 AT_none,
56 AT_model,
57 AT_chan,
58 AT_pose,
59 AT_strobe,
60 AT_both
61 };
62
63
64 IObjParam *_max_interface;
65 Anim_Type _anim_type;
66 int _start_frame;
67 int _end_frame;
68 bool _double_sided;
69 bool _successful;
70 bool _export_whole_scene;
71 bool _export_all_frames;
72 TCHAR _file_name[2048];
73 TCHAR _short_name[256];
74 PT(PathReplace) _path_replace;
75 std::vector<ULONG> _node_list;
76};
77
79{
80 friend class MaxEggPlugin;
81
82 public:
83 int _min_frame, _max_frame;
84 bool _checked;
85 bool _choosing_nodes;
86 MaxEggOptions::Anim_Type _prev_type;
87
90
91 // All these List functions should probably take what list they need to
92 // operate on rather than just operating on a global list
93 void SetMaxInterface(IObjParam *iface) { _max_interface = iface; }
94 void UpdateUI(HWND hWnd);
95 bool UpdateFromUI(HWND hWnd);
96 void RefreshNodeList(HWND hWnd);
97 void SetAnimRange();
98
99 bool FindNode(ULONG INodeHandle); //returns true if the node is already in the list
100 void AddNode(ULONG INodeHandle);
101 void RemoveNode(int i);
102 void RemoveNodeByHandle(ULONG INodeHandle);
103 void ClearNodeList(HWND hWnd);
104 void CullBadNodes();
105
106 ULONG GetNode(int i) { return (i >= 0 && i < _node_list.size()) ? _node_list[i] : ULONG_MAX; }
107
108 IOResult Load(ILoad *iload);
109 IOResult Save(ISave *isave);
110};
111
112#endif // __MaxEggExpOptions__H
This encapsulates the user's command-line request to replace existing, incorrect pathnames to models ...
Definition pathReplace.h:36
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.