- update bundled blender export script for Blender 2.59+

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8241 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 9df9ad8564
commit ed00bdae05
  1. 5
      sdk/jme3-ogretools/src/com/jme3/gde/ogretools/blender/Bundle.properties
  2. 19
      sdk/jme3-ogretools/src/com/jme3/gde/ogretools/blender/InstallBlenderExporterPanel.form
  3. 145
      sdk/jme3-ogretools/src/com/jme3/gde/ogretools/blender/InstallBlenderExporterPanel.java
  4. BIN
      sdk/jme3-ogretools/src/com/jme3/gde/ogretools/blender/scripts.zip

@ -4,6 +4,5 @@ InstallBlenderExporterPanel.jTextField1.text=jTextField1
InstallBlenderExporterPanel.jButton1.text=change InstallBlenderExporterPanel.jButton1.text=change
InstallBlenderExporterPanel.jButton2.text=Install Exporter Script InstallBlenderExporterPanel.jButton2.text=Install Exporter Script
InstallBlenderExporterPanel.jButton3.text=Cancel InstallBlenderExporterPanel.jButton3.text=Cancel
InstallBlenderExporterPanel.jLabel2.text=Note that you will need Phython 2.6 InstallBlenderExporterPanel.jLabel2.text=Note that this exporter only works
InstallBlenderExporterPanel.jLabel3.text=installed on your computer to use this plugin! InstallBlenderExporterPanel.jLabel3.text=with Blender 2.59+!
InstallBlenderExporterPanel.jLabel4.text=http://www.python.org/download/releases/2.6/

@ -38,7 +38,6 @@
<Component id="jButton2" min="-2" max="-2" attributes="0"/> <Component id="jButton2" min="-2" max="-2" attributes="0"/>
</Group> </Group>
<Component id="jLabel3" alignment="1" pref="341" max="32767" attributes="0"/> <Component id="jLabel3" alignment="1" pref="341" max="32767" attributes="0"/>
<Component id="jLabel4" alignment="0" pref="341" max="32767" attributes="0"/>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
</Group> </Group>
@ -58,9 +57,7 @@
<Component id="jLabel2" min="-2" max="-2" attributes="0"/> <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="jLabel3" min="-2" max="-2" attributes="0"/> <Component id="jLabel3" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/> <EmptySpace pref="45" max="32767" attributes="0"/>
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="15" max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0"> <Group type="103" groupAlignment="3" attributes="0">
<Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jButton3" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="jButton3" alignment="3" min="-2" max="-2" attributes="0"/>
@ -134,19 +131,5 @@
</Property> </Property>
</Properties> </Properties>
</Component> </Component>
<Component class="javax.swing.JLabel" name="jLabel4">
<Properties>
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="ff" green="33" red="0" type="rgb"/>
</Property>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="com/jme3/gde/ogretools/blender/Bundle.properties" key="InstallBlenderExporterPanel.jLabel4.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
</Properties>
<Events>
<EventHandler event="mouseReleased" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="openBrowser"/>
</Events>
</Component>
</SubComponents> </SubComponents>
</Form> </Form>

@ -47,68 +47,68 @@ public class InstallBlenderExporterPanel extends javax.swing.JDialog {
} }
private String findBlenderFolder() { private String findBlenderFolder() {
if (Utilities.isMac()) { // if (Utilities.isMac()) {
File scriptsDir = new File(System.getProperty("user.home") + "/.blender/scripts/"); // File scriptsDir = new File(System.getProperty("user.home") + "/.blender/scripts/");
if (!scriptsDir.exists()) { // if (!scriptsDir.exists()) {
scriptsDir = new File("/Applications/blender.app/Contents/Resources/MacOS/.blender/scripts/"); // scriptsDir = new File("/Applications/blender.app/Contents/Resources/MacOS/.blender/scripts/");
if (!scriptsDir.exists()) { // if (!scriptsDir.exists()) {
scriptsDir = new File(System.getProperty("user.home") + "/Applications/blender.app/Contents/Resources/MacOS/.blender/scripts/"); // scriptsDir = new File(System.getProperty("user.home") + "/Applications/blender.app/Contents/Resources/MacOS/.blender/scripts/");
if (!scriptsDir.exists()) { // if (!scriptsDir.exists()) {
scriptsDir = new File("/Applications/blender/blender.app/Contents/Resources/MacOS/.blender/scripts/"); // scriptsDir = new File("/Applications/blender/blender.app/Contents/Resources/MacOS/.blender/scripts/");
} // }
} // }
} // }
if (!scriptsDir.exists()) { // if (!scriptsDir.exists()) {
FileChooserBuilder builder = new FileChooserBuilder("/Applications/"); // FileChooserBuilder builder = new FileChooserBuilder("/Applications/");
builder.setDirectoriesOnly(true); // builder.setDirectoriesOnly(true);
builder.setTitle("Select Blender.app Application"); // builder.setTitle("Select Blender.app Application");
File file = builder.showOpenDialog(); // File file = builder.showOpenDialog();
if (file != null) { // if (file != null) {
scriptsDir = new File(file.getPath() + "/Contents/Resources/MacOS/.blender/scripts/"); // scriptsDir = new File(file.getPath() + "/Contents/Resources/MacOS/.blender/scripts/");
} // }
return scriptsDir.getPath(); // return scriptsDir.getPath();
} else { // } else {
return scriptsDir.getPath(); // return scriptsDir.getPath();
} // }
} else if (Utilities.isUnix()) { // } else if (Utilities.isUnix()) {
File scriptsDir = new File("/usr/share/blender/"); // File scriptsDir = new File("/usr/share/blender/");
if (!scriptsDir.exists()) { // if (!scriptsDir.exists()) {
scriptsDir = new File("/usr/lib/blender/"); // scriptsDir = new File("/usr/lib/blender/");
} // }
if (!scriptsDir.exists()) { // if (!scriptsDir.exists()) {
FileChooserBuilder builder = new FileChooserBuilder(""); // FileChooserBuilder builder = new FileChooserBuilder("");
builder.setDirectoriesOnly(true); // builder.setDirectoriesOnly(true);
builder.setTitle("Select Blender Scripts Directory"); // builder.setTitle("Select Blender Scripts Directory");
File file = builder.showOpenDialog(); // File file = builder.showOpenDialog();
if (file != null) { // if (file != null) {
scriptsDir = file; // scriptsDir = file;
} // }
return scriptsDir.getPath(); // return scriptsDir.getPath();
} else { // } else {
return scriptsDir.getPath(); // return scriptsDir.getPath();
} // }
} else if (Utilities.isWindows()) { // } else if (Utilities.isWindows()) {
File scriptsDir = new File(System.getProperty("user.home") + "\\AppData\\Roaming\\Blender Foundation\\Blender\\scripts\\"); // File scriptsDir = new File(System.getProperty("user.home") + "\\AppData\\Roaming\\Blender Foundation\\Blender\\scripts\\");
if (!scriptsDir.exists()) { // if (!scriptsDir.exists()) {
scriptsDir = new File(System.getProperty("user.home") + "\\Application Data\\Roaming\\Blender Foundation\\Blender\\scripts\\"); // scriptsDir = new File(System.getProperty("user.home") + "\\Application Data\\Roaming\\Blender Foundation\\Blender\\scripts\\");
if (!scriptsDir.exists()) { // if (!scriptsDir.exists()) {
scriptsDir = new File(System.getProperty("user.home") + "C:\\Program Files\\Blender\\.blender\\scripts\\"); // scriptsDir = new File(System.getProperty("user.home") + "C:\\Program Files\\Blender\\.blender\\scripts\\");
} // }
} // }
if (!scriptsDir.exists()) { // if (!scriptsDir.exists()) {
FileChooserBuilder builder = new FileChooserBuilder(""); // FileChooserBuilder builder = new FileChooserBuilder("");
builder.setDirectoriesOnly(true); // builder.setDirectoriesOnly(true);
builder.setTitle("Select Blender Scripts Directory"); // builder.setTitle("Select Blender Scripts Directory");
File file = builder.showOpenDialog(); // File file = builder.showOpenDialog();
if (file != null) { // if (file != null) {
scriptsDir = file; // scriptsDir = file;
} // }
return scriptsDir.getPath(); // return scriptsDir.getPath();
} else { // } else {
return scriptsDir.getPath(); // return scriptsDir.getPath();
} // }
} // }
return "could not find path"; return "please set blender scripts folder";
} }
static final int BUFFER = 2048; static final int BUFFER = 2048;
@ -297,7 +297,6 @@ public class InstallBlenderExporterPanel extends javax.swing.JDialog {
jButton3 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
@ -333,15 +332,6 @@ public class InstallBlenderExporterPanel extends javax.swing.JDialog {
jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel3.setText(org.openide.util.NbBundle.getMessage(InstallBlenderExporterPanel.class, "InstallBlenderExporterPanel.jLabel3.text")); // NOI18N jLabel3.setText(org.openide.util.NbBundle.getMessage(InstallBlenderExporterPanel.class, "InstallBlenderExporterPanel.jLabel3.text")); // NOI18N
jLabel4.setForeground(new java.awt.Color(0, 51, 255));
jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel4.setText(org.openide.util.NbBundle.getMessage(InstallBlenderExporterPanel.class, "InstallBlenderExporterPanel.jLabel4.text")); // NOI18N
jLabel4.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
openBrowser(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout); getContentPane().setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
@ -359,8 +349,7 @@ public class InstallBlenderExporterPanel extends javax.swing.JDialog {
.addComponent(jButton3) .addComponent(jButton3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton2)) .addComponent(jButton2))
.addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 341, Short.MAX_VALUE) .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 341, Short.MAX_VALUE))
.addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 341, Short.MAX_VALUE))
.addContainerGap()) .addContainerGap())
); );
layout.setVerticalGroup( layout.setVerticalGroup(
@ -376,9 +365,7 @@ public class InstallBlenderExporterPanel extends javax.swing.JDialog {
.addComponent(jLabel2) .addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel3) .addComponent(jLabel3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE)
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton2) .addComponent(jButton2)
.addComponent(jButton3)) .addComponent(jButton3))
@ -406,9 +393,6 @@ public class InstallBlenderExporterPanel extends javax.swing.JDialog {
dispose(); dispose();
}//GEN-LAST:event_jButton3ActionPerformed }//GEN-LAST:event_jButton3ActionPerformed
private void openBrowser(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_openBrowser
openURL("http://www.python.org/download/releases/2.6/");
}//GEN-LAST:event_openBrowser
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1; private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2; private javax.swing.JButton jButton2;
@ -416,7 +400,6 @@ public class InstallBlenderExporterPanel extends javax.swing.JDialog {
private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JTextField jTextField1; private javax.swing.JTextField jTextField1;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
} }

Loading…
Cancel
Save