aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/primbackup.h
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-09-14 17:52:41 -0700
committerMcCabe Maxsted2009-09-14 17:52:41 -0700
commit7f090f7bec5264ca9e203c27dfb6b2992bb2bcbd (patch)
tree0243666021de3ae6ac61a6c6f4e57d42771fe964 /linden/indra/newview/primbackup.h
parentApplied BlockClickSit debug setting from Emerald to block sit click action (diff)
downloadmeta-impy-7f090f7bec5264ca9e203c27dfb6b2992bb2bcbd.zip
meta-impy-7f090f7bec5264ca9e203c27dfb6b2992bb2bcbd.tar.gz
meta-impy-7f090f7bec5264ca9e203c27dfb6b2992bb2bcbd.tar.bz2
meta-impy-7f090f7bec5264ca9e203c27dfb6b2992bb2bcbd.tar.xz
Merged in jacek/next
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/primbackup.h132
1 files changed, 132 insertions, 0 deletions
diff --git a/linden/indra/newview/primbackup.h b/linden/indra/newview/primbackup.h
new file mode 100644
index 0000000..fddc35f
--- /dev/null
+++ b/linden/indra/newview/primbackup.h
@@ -0,0 +1,132 @@
1
2#include "llviewerinventory.h"
3
4#define LL_GRID_PERMISSIONS 1
5
6enum export_states {EXPORT_INIT,EXPORT_STRUCTURE,EXPORT_TEXTURES,EXPORT_LLSD,EXPORT_DONE};
7
8class primbackup : public LLFloater
9
10{
11 public:
12 //Export state machine
13 enum export_states export_state;
14
15 //Export idle callback
16 static void exportworker(void *userdata);
17
18 //Static accessor
19 static primbackup* getInstance();
20
21 virtual ~primbackup();
22
23 //Floater stuff
24 virtual void show();
25 virtual void draw();
26 virtual void onClose( bool app_quitting );
27
28 //Import entry point
29 void import_object(bool upload=FALSE);
30
31 //Export entry point
32 void pre_export_object();
33
34 //Update map from texture worker
35 void update_map(LLUUID uploaded_asset);
36
37 //Move to next texture upload
38 void upload_next_asset();
39
40 // is ready for next texture?
41 bool m_nexttextureready;
42
43 //Folder public geter
44 std::string getfolder() {return folder;};
45
46 //Prim updated callback
47 void prim_update(LLViewerObject* object);
48
49 //New prim call back
50 bool newprim(LLViewerObject * pobject);
51
52private:
53
54 //Static singleton stuff
55 primbackup();
56 static primbackup* sInstance;
57
58 // are we active flag
59 bool running;
60
61 //file and folder name control
62 std::string file_name;
63 std::string folder;
64
65 // True if we need to rebase the assets
66 bool m_retexture;
67
68 //Counts of import and export objects and textures and prims
69 int m_objects,m_curobject;
70 int m_prims,m_curprim;
71 int m_textures,m_curtexture;
72
73 // No prims rezed
74 int rezcount;
75
76 // Update the floater with status numbers
77 void updateimportnumbers();
78 void updateexportnumbers();
79
80 //Convert a selection list of objects to LLSD
81 LLSD prims_to_llsd(LLViewerObject::child_list_t child_list);
82
83 // Start the import process
84 void import_object1a();
85
86 //Export the next texture in list
87 void export_next_texture();
88
89 //apply LLSD to object
90 void xmltoprim(LLSD prim_llsd,LLViewerObject * pobject);
91
92
93 //rez a prim at a given position (note not agent offset X/Y screen for raycast)
94 void rez_agent_offset(LLVector3 offset);
95
96 //Move to the next import group
97 void import_next_object();
98
99 //Get an offset from the agent based on rotation and current pos
100 LLVector3 offset_agent(LLVector3 offset);
101
102 // Rebase map
103 std::map<LLUUID,LLUUID> assetmap;
104
105 //Export texture list
106 std::list<LLUUID> textures;
107
108 //Import object tracking
109 std::vector<LLViewerObject *> toselect;
110 std::vector<LLViewerObject *>::iterator process_iter;
111
112 //Working LLSD holders
113 LLUUID current_asset;
114 LLSD llsd;
115 LLSD this_group;
116 LLUUID expecting_update;
117
118 //working llsd itterators for objects and linksets
119 LLSD::map_const_iterator prim_import_iter;
120 LLSD::array_const_iterator group_prim_import_iter;
121
122 // Root pos and central root pos for link set
123 LLVector3 root_pos;
124 LLVector3 root_root_pos;
125 LLVector3 group_offset;
126
127 //Agent inital pos and rot when starting import
128 LLQuaternion root_rot;
129 LLQuaternion agent_rot;
130
131};
132