Normand Briere
2019-07-20 0a52bd4800459cd9935f360d7ca9555b6bea2146
CSG + paint mode.
6 files modified
331 ■■■■■ changed files
CSGEditor.java 175 ●●●● patch | view | raw | blame | history
CameraPane.java 77 ●●●● patch | view | raw | blame | history
GroupEditor.java 16 ●●●●● patch | view | raw | blame | history
ObjEditor.java 13 ●●●● patch | view | raw | blame | history
Object3D.java 48 ●●●●● patch | view | raw | blame | history
cMesh.java 2 ●●●●● patch | view | raw | blame | history
CSGEditor.java
....@@ -10,6 +10,8 @@
1010
1111 import java.util.Vector;
1212
13
+import grafeme.ui.*;
14
+
1315 class CSGEditor extends ObjEditor implements ChangeListener, ActionListener, ObjectUI
1416 {
1517
....@@ -44,19 +46,18 @@
4446 super.SetupUI2(oe); // Shows composite UI !!
4547 //super.SetupName(oe);
4648
47
- oe.aConstraints.weighty = 0;
49
+ oe.ctrlPanel.add(refreshButton = new JButton("Refresh")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
50
+ oe.ctrlPanel.Return();
4851
49
- oe.aConstraints.fill = 0;
50
- oe.aConstraints.gridwidth = 1;
51
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
52
- oe.ctrlPanel.add(refreshButton = new JButton("Refresh"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
53
- oe.aConstraints.gridwidth = 1;
54
- oe.aConstraints.gridx /* = 0;
55
- oe.aConstraints.gridy */ += 1;
56
-
57
- oe.aConstraints.fill = 0;
58
- oe.aConstraints.gridwidth = 1;
59
- //this.csg = (CSG) copy;
52
+ menuPane = new cGridBag();
53
+ oe.ctrlPanel.add(menuPane);
54
+ oe.ctrlPanel.Return();
55
+
56
+ menuPane2 = new cGridBag();
57
+ oe.ctrlPanel.add(menuPane2);
58
+ oe.ctrlPanel.Return();
59
+
60
+ //this.csg = (CSG) copy;
6061 /*
6162 oe.ctrlPanel.add(typeLabel = new JLabel("Type"), oe.aConstraints);
6263 oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
....@@ -67,33 +68,26 @@
6768 list.add("Merge");
6869 list.add("Intersection");
6970 list.add("Difference");
70
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
71
- oe.ctrlPanel.add(typeMenu = new JComboBox(new ObjEditor.cListModel(list, csg.csgType - 1)), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
71
+ menuPane.add(typeMenu = new JComboBox(new ObjEditor.cListModel(list, csg.csgType - 1))); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
7272 //typeMenu.select(csg.csgType - 1);
7373
74
- oe.aConstraints.gridx += 1;
75
- //oe.aConstraints.gridy += 1;
76
- //oe.aConstraints.gridx = 0;
77
-
74
+ oe.ctrlPanel.Return();
75
+
7876 list = new Vector();
7977 list.add("Surface");
8078 list.add("Volume");
8179 list.add("Inner");
8280 list.add("Outer");
8381 list.add("Boundary");
82
+
8483 /*
8584 oe.aConstraints.fill = 0;
8685 oe.ctrlPanel.add(genLabel = new JLabel("Generation"), oe.aConstraints);
8786 oe.aConstraints.gridx += 1;
8887 */
89
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
90
- oe.ctrlPanel.add(genMenu = new JComboBox(new ObjEditor.cListModel(list, 0)), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
88
+ menuPane.add(genMenu = new JComboBox(new ObjEditor.cListModel(list, 0))); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
9189 //typeMenu.select(csg.csgType - 1);
92
- //oe.aConstraints.gridy += 1;
93
- oe.aConstraints.gridx += 1;
9490
95
- oe.ctrlPanel.Return();
96
-
9791 list = new Vector();
9892 list.add("Smooth");
9993 list.add("Flat");
....@@ -102,11 +96,8 @@
10296 oe.ctrlPanel.add(normalsLabel = new JLabel("Shading"), oe.aConstraints);
10397 oe.aConstraints.gridx += 1;
10498 */
105
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
106
- oe.ctrlPanel.add(normalsMenu = new JComboBox(new ObjEditor.cListModel(list, 0)), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
99
+ menuPane2.add(normalsMenu = new JComboBox(new ObjEditor.cListModel(list, 0))); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
107100 //typeMenu.select(csg.csgType - 1);
108
- oe.aConstraints.gridx += 1;
109
- oe.aConstraints.gridwidth = 1;
110101
111102 list = new Vector();
112103 list.add("Strip");
....@@ -117,55 +108,39 @@
117108 oe.ctrlPanel.add(normalsLabel = new JLabel("Shading"), oe.aConstraints);
118109 oe.aConstraints.gridx += 1;
119110 */
120
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
121
- oe.ctrlPanel.add(stripifyMenu = new JComboBox(new ObjEditor.cListModel(list, 0)), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
111
+ menuPane2.add(stripifyMenu = new JComboBox(new ObjEditor.cListModel(list, 0))); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
122112 //typeMenu.select(csg.csgType - 1);
123
- oe.aConstraints.gridy += 1;
124
- oe.aConstraints.gridx = 0;
125
- oe.aConstraints.gridwidth = 1;
126113
127
- //oe.aConstraints.fill = 0;
128
- oe.ctrlPanel.add(sizeLabel = new JLabel("Depth"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
129
- oe.aConstraints.gridx += 1;
130
- oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
131
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
132
- oe.ctrlPanel.add(sizeField = new NumberSlider(0,10), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
133
- oe.aConstraints.gridy += 1;
134
- oe.aConstraints.gridx = 0;
114
+// oe.ctrlPanel.add(sizeLabel = new JLabel("Depth")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
115
+// oe.ctrlPanel.add(sizeSlider = new NumberSlider(0,10)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
116
+ sizeSliderPane = AddSlider(oe.ctrlPanel, "Depth", 0, 10, 0);
117
+ sizeSlider = (cNumberSlider)sizeSliderPane.getComponent(1);
118
+ oe.ctrlPanel.Return();
135119
136
- oe.aConstraints.fill = 0;
137
- oe.aConstraints.gridwidth = 1;
138
- oe.ctrlPanel.add(size2Label = new JLabel("Depth2"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
139
- oe.aConstraints.gridx += 1;
140
- oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
141
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
142
- oe.ctrlPanel.add(size2Field = new NumberSlider(0,10), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
143
- oe.aConstraints.gridy += 1;
144
- oe.aConstraints.gridx = 0;
120
+// oe.ctrlPanel.add(size2Label = new JLabel("Depth2")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
121
+// oe.ctrlPanel.add(size2Slider = new NumberSlider(0,10)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
122
+ size2SliderPane = AddSlider(oe.ctrlPanel, "Depth2", 0, 10, 0);
123
+ size2Slider = (cNumberSlider)size2SliderPane.getComponent(1);
124
+ oe.ctrlPanel.Return();
145125
146
- oe.aConstraints.gridwidth = 1;
147
- oe.aConstraints.fill = 0;
148
- oe.ctrlPanel.add(tolLabel = new JLabel("Tolerance"), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
149
- oe.aConstraints.gridx += 1;
150
- oe.aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
151
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
152
- oe.ctrlPanel.add(tolField = new NumberSlider(0,10,1), oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
153
- oe.aConstraints.gridy += 1;
154
- oe.aConstraints.gridx = 0;
155
- oe.aConstraints.gridwidth = 1;
126
+// oe.ctrlPanel.add(tolLabel = new JLabel("Tolerance")); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
127
+// oe.ctrlPanel.add(toleranceSlider = new NumberSlider(0,10,1)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount()-2);
128
+ toleranceSliderPane = AddSlider(oe.ctrlPanel, "Tolerance", 0, 10, 1, 1);
129
+ toleranceSlider = (cNumberSlider)toleranceSliderPane.getComponent(1);
130
+ oe.ctrlPanel.Return();
156131
157
- sizeField.setInteger(csg.cellSize);
158
- size2Field.setInteger(csg.cellSize2);
132
+ sizeSlider.setInteger(csg.cellSize);
133
+ size2Slider.setInteger(csg.cellSize2);
159134 System.out.println("csg.tolerance = " + csg.tolerance);
160
- tolField.setFloat(csg.tolerance);
135
+ toleranceSlider.setFloat(csg.tolerance);
161136 normalsMenu.setSelectedIndex(csg.normals?0:1);
162137 typeMenu.setSelectedIndex(csg.csgType - 1);
163138 genMenu.setSelectedIndex(csg.genType);
164139 stripifyMenu.setSelectedIndex(csg.userType); // ==0?0:1);
165140
166
- sizeField.addChangeListener(this);
167
- size2Field.addChangeListener(this);
168
- tolField.addChangeListener(this);
141
+ sizeSlider.addChangeListener(this);
142
+ size2Slider.addChangeListener(this);
143
+ toleranceSlider.addChangeListener(this);
169144
170145 typeMenu.addActionListener(this);
171146 genMenu.addActionListener(this);
....@@ -199,24 +174,29 @@
199174 normalsMenu.removeActionListener(this);
200175 refreshButton.removeActionListener(this);
201176
202
- sizeField.removeChangeListener(this);
203
- size2Field.removeChangeListener(this);
204
- tolField.removeChangeListener(this);
205
- oe.ctrlPanel.remove(sizeField);
206
- oe.ctrlPanel.remove(size2Field);
207
- oe.ctrlPanel.remove(tolField);
208
- oe.ctrlPanel.remove(sizeLabel);
209
- oe.ctrlPanel.remove(size2Label);
210
- oe.ctrlPanel.remove(tolLabel);
211
- oe.ctrlPanel.remove(typeMenu);
212
- //oe.ctrlPanel.remove(typeLabel);
213
- oe.ctrlPanel.remove(genMenu);
214
- //oe.ctrlPanel.remove(genLabel);
215
- oe.ctrlPanel.remove(normalsMenu);
216
- oe.ctrlPanel.remove(stripifyMenu);
217
- //oe.ctrlPanel.remove(normalsLabel);
218
- oe.ctrlPanel.remove(refreshButton);
219
- //oe.ctrlPanel.repaint();
177
+ sizeSlider.removeChangeListener(this);
178
+ size2Slider.removeChangeListener(this);
179
+ toleranceSlider.removeChangeListener(this);
180
+
181
+ oe.ctrlPanel.remove(this.refreshButton);
182
+ oe.ctrlPanel.remove(menuPane);
183
+ oe.ctrlPanel.remove(menuPane2);
184
+ oe.ctrlPanel.remove(sizeSliderPane);
185
+ oe.ctrlPanel.remove(size2SliderPane);
186
+ oe.ctrlPanel.remove(toleranceSliderPane);
187
+
188
+// oe.ctrlPanel.remove(sizeLabel);
189
+// oe.ctrlPanel.remove(size2Label);
190
+// oe.ctrlPanel.remove(tolLabel);
191
+// oe.ctrlPanel.remove(typeMenu);
192
+// //oe.ctrlPanel.remove(typeLabel);
193
+// oe.ctrlPanel.remove(genMenu);
194
+// //oe.ctrlPanel.remove(genLabel);
195
+// oe.ctrlPanel.remove(normalsMenu);
196
+// oe.ctrlPanel.remove(stripifyMenu);
197
+// //oe.ctrlPanel.remove(normalsLabel);
198
+// oe.ctrlPanel.remove(refreshButton);
199
+// //oe.ctrlPanel.repaint();
220200
221201 super.closeUI();
222202 }
....@@ -226,7 +206,7 @@
226206 {
227207 super.doLayout();
228208 labelAndField(typeLabel, typeMenu);
229
- labelAndField(sizeLabel, sizeField);
209
+ labelAndField(sizeLabel, sizeSlider);
230210 widgetPos += 5;
231211 }
232212 */
....@@ -252,9 +232,9 @@
252232
253233 public void stateChanged(ChangeEvent e)
254234 {
255
- if (e.getSource() == sizeField ||
256
- e.getSource() == size2Field ||
257
- e.getSource() == tolField)
235
+ if (e.getSource() == sizeSlider ||
236
+ e.getSource() == size2Slider ||
237
+ e.getSource() == toleranceSlider)
258238 {
259239 // Can't choose...
260240 //applySelf();
....@@ -272,15 +252,16 @@
272252 csg.genType = genMenu.getSelectedIndex();
273253 csg.normals = normalsMenu.getSelectedIndex() == 0;
274254 csg.userType = stripifyMenu.getSelectedIndex();
275
- csg.cellSize = sizeField.getInteger();
276
- csg.cellSize2 = size2Field.getInteger();
277
- csg.tolerance = tolField.getFloat();
255
+ csg.cellSize = sizeSlider.getInteger();
256
+ csg.cellSize2 = size2Slider.getInteger();
257
+ csg.tolerance = toleranceSlider.getFloat();
278258
279259 if (csg.link2master)
280260 csg.retile();
281261 }
282262
283263 CSG csg;
264
+
284265 JLabel typeLabel;
285266 JLabel genLabel;
286267 JLabel normalsLabel;
....@@ -291,10 +272,16 @@
291272 JComboBox genMenu;
292273 JComboBox normalsMenu;
293274 JComboBox stripifyMenu;
294
- NumberSlider sizeField;
295
- NumberSlider size2Field;
296
- NumberSlider tolField;
275
+ cNumberSlider sizeSlider;
276
+ cNumberSlider size2Slider;
277
+ cNumberSlider toleranceSlider;
297278
279
+ cGridBag menuPane;
280
+ cGridBag menuPane2;
281
+ cGridBag sizeSliderPane;
282
+ cGridBag size2SliderPane;
283
+ cGridBag toleranceSliderPane;
284
+
298285 JButton refreshButton;
299286
300287 //GroupEditor objEditor;
CameraPane.java
....@@ -2298,10 +2298,17 @@
22982298 HANDLES ^= true;
22992299 }
23002300
2301
+ Object3D paintFolder;
2302
+
23012303 void TogglePaint()
23022304 {
23032305 PAINTMODE ^= true;
23042306 paintcount = 0;
2307
+
2308
+ if (PAINTMODE)
2309
+ {
2310
+ paintFolder = GetFolder();
2311
+ }
23052312 }
23062313
23072314 void SwapCamera(int a, int b)
....@@ -8503,7 +8510,7 @@
85038510 return texture!=null?texture.texturedata:null;
85048511 }
85058512
8506
- boolean BindTexture(String tex, boolean bump, int resolution) throws Exception
8513
+ com.sun.opengl.util.texture.Texture BindTexture(String tex, boolean bump, int resolution) throws Exception
85078514 {
85088515 if (/*tex == null ||*/ ambientOcclusion ) // || !textureon)
85098516 {
....@@ -8515,7 +8522,7 @@
85158522 com.sun.opengl.util.texture.Texture texture = GetTexture(tex, bump, resolution);
85168523
85178524 if (texture == null)
8518
- return false;
8525
+ return texture;
85198526 /**/
85208527
85218528 if (textureon || tex.equals("DEFAULT_TEXTURE") || tex.equals("DEFAULT_TEXTURE_BUMP") || tex.equals("WHITE_NOISE")) // || tex.equals("IMMORTAL"))
....@@ -16553,6 +16560,14 @@
1655316560 }
1655416561 }
1655516562
16563
+ private Object3D GetFolder()
16564
+ {
16565
+ Object3D folder = object.GetWindow().copy;
16566
+ if (object.GetWindow().copy.selection.Size() > 0)
16567
+ folder = object.GetWindow().copy.selection.elementAt(0);
16568
+ return folder;
16569
+ }
16570
+
1655616571 class SelectBuffer implements GLEventListener
1655716572 {
1655816573
....@@ -16632,6 +16647,17 @@
1663216647
1663316648 //gl.glDisable(GL.GL_POLYGON_OFFSET_FILL);
1663416649
16650
+ if (PAINTMODE)
16651
+ {
16652
+ if (object.GetWindow().copy.selection.Size() > 0)
16653
+ {
16654
+ Object3D paintobj = object.GetWindow().copy.selection.elementAt(0);
16655
+
16656
+ // Make what you paint not selectable.
16657
+ paintobj.ResetSelectable();
16658
+ }
16659
+ }
16660
+
1663516661 //int tmp = selection_view;
1663616662 //selection_view = -1;
1663716663 int temp = DrawMode();
....@@ -16643,6 +16669,17 @@
1664316669 // temp = DEFAULT; // patch for selection debug
1664416670 Globals.drawMode = temp; // WARNING
1664516671
16672
+ if (PAINTMODE)
16673
+ {
16674
+ if (object.GetWindow().copy.selection.Size() > 0)
16675
+ {
16676
+ Object3D paintobj = object.GetWindow().copy.selection.elementAt(0);
16677
+
16678
+ // Revert.
16679
+ paintobj.RestoreSelectable();
16680
+ }
16681
+ }
16682
+
1664616683 //gl.glBindTexture(GL.GL_TEXTURE_2D, selection_view);
1664716684
1664816685 // trying different ways of getting the depth info over
....@@ -16748,27 +16785,29 @@
1674816785 if (!movingcamera && !PAINTMODE)
1674916786 object.GetWindow().ScreenFitPoint(); // fev 2014
1675016787
16751
- if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0)
16788
+ if (PAINTMODE) // && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0)
1675216789 {
16753
- Object3D paintobj = Grafreed.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0);
16754
-
16755
- Object3D group = new Object3D("inst" + paintcount++);
16756
-
16757
- group.CreateMaterial(); // use a void leaf to select instances
16758
-
16759
- group.add(paintobj); // link
16760
-
16761
- object.GetWindow().SnapObject(group);
16762
-
16763
- Object3D folder = object.GetWindow().copy;
16790
+ //Object3D paintobj; // = Grafreed.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0);
1676416791
1676516792 if (object.GetWindow().copy.selection.Size() > 0)
16766
- folder = object.GetWindow().copy.selection.elementAt(0);
16793
+ {
16794
+ Object3D paintobj = object.GetWindow().copy.selection.elementAt(0);
1676716795
16768
- folder.add(group);
16769
-
16770
- object.GetWindow().ResetModel();
16771
- object.GetWindow().refreshContents();
16796
+ Object3D inst = new Object3D("inst" + paintcount++);
16797
+
16798
+ inst.CreateMaterial(); // use a void leaf to select instances
16799
+
16800
+ inst.add(paintobj); // link
16801
+
16802
+ object.GetWindow().SnapObject(inst);
16803
+
16804
+ Object3D folder = paintFolder; // GetFolder();
16805
+
16806
+ folder.add(inst);
16807
+
16808
+ object.GetWindow().ResetModel();
16809
+ object.GetWindow().refreshContents();
16810
+ }
1677216811 }
1677316812 else
1677416813 paintcount = 0;
GroupEditor.java
....@@ -80,18 +80,20 @@
8080 this.copy = this.group = copy;
8181 //selectees = this.group.selectees;
8282
83
- if (copy.versions == null)
84
- {
85
- copy.versions = new byte[100][];
86
- copy.versionindex = -1;
87
- }
88
-
8983 SetupMenu2(this); //objEditor);
9084 SetupUI2(objEditor);
9185 objEditor.SetupUI(true);
9286 SetupViews(objEditor);
9387
9488 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
89
+
90
+ if (copy.versions == null)
91
+ {
92
+ copy.versions = new byte[100][];
93
+ copy.versionindex = -1;
94
+
95
+ Save(true);
96
+ }
9597 }
9698
9799 void CloneSelection(boolean supports)
....@@ -4798,7 +4800,7 @@
47984800
47994801 void refreshContents(boolean cp)
48004802 {
4801
- if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info"))
4803
+ if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
48024804 if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
48034805 {
48044806 objEditor.ClearInfo(); // .GetMaterial());
ObjEditor.java
....@@ -327,8 +327,8 @@
327327
328328 if (copy.versions == null)
329329 {
330
- copy.versions = new byte[100][];
331
- copy.versionindex = -1;
330
+// copy.versions = new byte[100][];
331
+// copy.versionindex = -1;
332332 }
333333
334334 SetupMenu();
....@@ -974,7 +974,7 @@
974974 // NumberSlider vDivsField;
975975 // JCheckBox endcaps;
976976 JCheckBox liveCB;
977
- JCheckBox selectCB;
977
+ JCheckBox selectableCB;
978978 JCheckBox hideCB;
979979 JCheckBox link2masterCB;
980980 JCheckBox markCB;
....@@ -1186,9 +1186,10 @@
11861186
11871187 liveCB = AddCheckBox(setupPanel, "Live", copy.live);
11881188 liveCB.setToolTipText("Animate object");
1189
- selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect);
1190
- selectCB.setToolTipText("Make object selectable");
1189
+ selectableCB = AddCheckBox(setupPanel, "Select", !copy.dontselect);
1190
+ selectableCB.setToolTipText("Make object selectable");
11911191 // Return();
1192
+
11921193 hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
11931194 hideCB.setToolTipText("Hide object");
11941195 markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
....@@ -3250,7 +3251,7 @@
32503251 {
32513252 copy.live ^= true;
32523253 return;
3253
- } else if (event.getSource() == selectCB)
3254
+ } else if (event.getSource() == selectableCB)
32543255 {
32553256 copy.dontselect ^= true;
32563257 return;
Object3D.java
....@@ -29,7 +29,7 @@
2929 Object3D saveskeleton;
3030 //
3131
32
- byte[] versions[] = new byte[100][];
32
+ byte[] versions[];
3333 int versionindex = -1;
3434
3535 ScriptNode scriptnode;
....@@ -426,6 +426,7 @@
426426 }
427427
428428 boolean live = false;
429
+ transient boolean keepdontselect;
429430 boolean dontselect = false;
430431 boolean hide = false;
431432 boolean link2master = false; // performs reset support/master at each frame
....@@ -5420,6 +5421,51 @@
54205421 blockloop = false;
54215422 }
54225423
5424
+ void ResetSelectable()
5425
+ {
5426
+ if (blockloop)
5427
+ return;
5428
+
5429
+ blockloop = true;
5430
+
5431
+ keepdontselect = dontselect;
5432
+ dontselect = true;
5433
+
5434
+ Object3D child;
5435
+ int nb = Size();
5436
+ for (int i = 0; i < nb; i++)
5437
+ {
5438
+ child = (Object3D) get(i);
5439
+ if (child == null)
5440
+ continue;
5441
+ child.ResetSelectable();
5442
+ }
5443
+
5444
+ blockloop = false;
5445
+ }
5446
+
5447
+ void RestoreSelectable()
5448
+ {
5449
+ if (blockloop)
5450
+ return;
5451
+
5452
+ blockloop = true;
5453
+
5454
+ dontselect = keepdontselect;
5455
+
5456
+ Object3D child;
5457
+ int nb = Size();
5458
+ for (int i = 0; i < nb; i++)
5459
+ {
5460
+ child = (Object3D) get(i);
5461
+ if (child == null)
5462
+ continue;
5463
+ child.RestoreSelectable();
5464
+ }
5465
+
5466
+ blockloop = false;
5467
+ }
5468
+
54235469 boolean IsSelected()
54245470 {
54255471 if (parent == null)
cMesh.java
....@@ -560,6 +560,8 @@
560560 maxima = new cVector();
561561 }
562562
563
+ CameraPane.CreateSelectedPoint();
564
+
563565 // ref.getBounds(minima, maxima, true);
564566 // Phys.reference.set((maxima.x+minima.x)/2,(maxima.y+minima.y)/2,(maxima.z+minima.z)/2);
565567 //ref.