.. | .. |
---|
528 | 528 | attachBumpItem.addActionListener(this); |
---|
529 | 529 | pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump")); |
---|
530 | 530 | pigmentBumpItem.addActionListener(this); |
---|
| 531 | + //embedTexturesItem |
---|
531 | 532 | detachPigmentItem = menu.add(new MenuItem("Detach Pigment")); |
---|
532 | 533 | detachPigmentItem.addActionListener(this); |
---|
533 | 534 | detachBumpItem = menu.add(new MenuItem("Detach Bump")); |
---|
534 | 535 | detachBumpItem.addActionListener(this); |
---|
| 536 | + embedTexturesItem = menu.add(new MenuItem("Embed Textures")); |
---|
| 537 | + embedTexturesItem.addActionListener(this); |
---|
| 538 | + deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures")); |
---|
| 539 | + deEmbedTexturesItem.addActionListener(this); |
---|
535 | 540 | menu.add("-"); |
---|
536 | 541 | sortbysizeItem = menu.add(new MenuItem("Sort by size")); |
---|
537 | 542 | sortbysizeItem.addActionListener(this); |
---|
.. | .. |
---|
683 | 688 | oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
684 | 689 | snapobjectButton.addActionListener(this); |
---|
685 | 690 | snapobjectButton.setToolTipText("Snap Object"); |
---|
| 691 | + |
---|
| 692 | + oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 693 | + fourButton.addActionListener(this); |
---|
| 694 | + fourButton.setToolTipText("Show control panel only"); |
---|
686 | 695 | } |
---|
687 | 696 | |
---|
688 | 697 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
689 | 698 | |
---|
690 | | - oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
691 | | - fourButton.addActionListener(this); |
---|
692 | | - fourButton.setToolTipText("Show left panel only"); |
---|
693 | | - |
---|
694 | | - oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
695 | | - twoButton.setToolTipText("Show right view only"); |
---|
| 699 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 700 | + twoButton.setToolTipText("Show 3D view only"); |
---|
696 | 701 | twoButton.addActionListener(this); |
---|
697 | 702 | this.fullscreenLayout = twoButton; |
---|
698 | 703 | |
---|
699 | | - oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
700 | | - sixButton.setToolTipText("Show left and right"); |
---|
| 704 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 705 | + threeButton.setToolTipText("Show controls and 3D view"); |
---|
| 706 | + threeButton.addActionListener(this); |
---|
| 707 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 708 | + sixButton.setToolTipText("Show 3D view and controls"); |
---|
701 | 709 | sixButton.addActionListener(this); |
---|
702 | | -// oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
703 | | -// threeButton.setToolTipText("2-column layout right"); |
---|
704 | | -// threeButton.addActionListener(this); |
---|
705 | 710 | // oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
706 | 711 | // sevenButton.setToolTipText("3-column layout"); |
---|
707 | 712 | // sevenButton.addActionListener(this); |
---|
.. | .. |
---|
3169 | 3174 | |
---|
3170 | 3175 | refreshContents(); |
---|
3171 | 3176 | } else |
---|
| 3177 | + if (source == embedTexturesItem) |
---|
| 3178 | + { |
---|
| 3179 | + Object3D obj; |
---|
| 3180 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3181 | + { |
---|
| 3182 | + obj = (Object3D)e.nextElement(); |
---|
| 3183 | + obj.EmbedTextures(true); |
---|
| 3184 | + } |
---|
| 3185 | + |
---|
| 3186 | + refreshContents(); |
---|
| 3187 | + } else |
---|
| 3188 | + if (source == deEmbedTexturesItem) |
---|
| 3189 | + { |
---|
| 3190 | + Object3D obj; |
---|
| 3191 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3192 | + { |
---|
| 3193 | + obj = (Object3D)e.nextElement(); |
---|
| 3194 | + obj.EmbedTextures(false); |
---|
| 3195 | + } |
---|
| 3196 | + |
---|
| 3197 | + CameraPane.texturepigment.clear(); |
---|
| 3198 | + CameraPane.texturebump.clear(); |
---|
| 3199 | + |
---|
| 3200 | + refreshContents(); |
---|
| 3201 | + } else |
---|
3172 | 3202 | if (source == flashSelectionButton) |
---|
3173 | 3203 | { |
---|
3174 | 3204 | CameraPane.flash = true; |
---|
.. | .. |
---|
3270 | 3300 | // centralPanel.setVisible(true); |
---|
3271 | 3301 | // XYZPanel.setVisible(true); |
---|
3272 | 3302 | bigThree.ClearUI(); |
---|
| 3303 | + bigThree.add(scenePanel); |
---|
3273 | 3304 | bigThree.add(centralPanel); |
---|
3274 | | - bigThree.add(XYZPanel); |
---|
3275 | 3305 | bigThree.FlushUI(); |
---|
3276 | 3306 | |
---|
3277 | 3307 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
3351 | 3381 | // centralPanel.setVisible(true); |
---|
3352 | 3382 | // XYZPanel.setVisible(false); |
---|
3353 | 3383 | bigThree.ClearUI(); |
---|
3354 | | - bigThree.add(scenePanel); |
---|
3355 | 3384 | bigThree.add(centralPanel); |
---|
| 3385 | + bigThree.add(scenePanel); |
---|
3356 | 3386 | bigThree.FlushUI(); |
---|
3357 | 3387 | |
---|
3358 | 3388 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
4163 | 4193 | |
---|
4164 | 4194 | try |
---|
4165 | 4195 | { |
---|
4166 | | - texturedata = Globals.theRenderer.GetTextureData(tex.pigmenttexture, pigment, false, node.texres); |
---|
| 4196 | + texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres); |
---|
4167 | 4197 | } |
---|
4168 | 4198 | catch (Exception e) |
---|
4169 | 4199 | { |
---|
.. | .. |
---|
5793 | 5823 | private MenuItem attachBumpItem; |
---|
5794 | 5824 | private MenuItem detachBumpItem; |
---|
5795 | 5825 | private MenuItem pigmentBumpItem; |
---|
| 5826 | + private MenuItem embedTexturesItem; |
---|
| 5827 | + private MenuItem deEmbedTexturesItem; |
---|
5796 | 5828 | |
---|
5797 | 5829 | private MenuItem particleItem; |
---|
5798 | 5830 | private MenuItem ragdollItem; |
---|