- Move Blender Support layer registration to Annotations

experimental
Normen Hansen 10 years ago
parent 42f78727c8
commit 13e27bea1c
  1. 1
      sdk/jme3-blender/manifest.mf
  2. 23
      sdk/jme3-blender/src/com/jme3/gde/blender/BlenderDataObject.java
  3. 12
      sdk/jme3-blender/src/com/jme3/gde/blender/BlenderResolver.xml
  4. 6
      sdk/jme3-blender/src/com/jme3/gde/blender/Bundle.properties
  5. 23
      sdk/jme3-blender/src/com/jme3/gde/blender/layer.xml
  6. 8
      sdk/jme3-blender/src/com/jme3/gde/blender/package-info.java

@ -1,6 +1,5 @@
Manifest-Version: 1.0 Manifest-Version: 1.0
OpenIDE-Module: com.jme3.gde.blender OpenIDE-Module: com.jme3.gde.blender
OpenIDE-Module-Implementation-Version: 0 OpenIDE-Module-Implementation-Version: 0
OpenIDE-Module-Layer: com/jme3/gde/blender/layer.xml
OpenIDE-Module-Localizing-Bundle: com/jme3/gde/blender/Bundle.properties OpenIDE-Module-Localizing-Bundle: com/jme3/gde/blender/Bundle.properties

@ -12,12 +12,26 @@ import org.openide.awt.ActionID;
import org.openide.awt.ActionReference; import org.openide.awt.ActionReference;
import org.openide.awt.ActionReferences; import org.openide.awt.ActionReferences;
import org.openide.filesystems.FileObject; import org.openide.filesystems.FileObject;
import org.openide.loaders.DataObject.Registration; import org.openide.filesystems.MIMEResolver;
import org.openide.loaders.DataObject;
import org.openide.loaders.DataObjectExistsException; import org.openide.loaders.DataObjectExistsException;
import org.openide.loaders.MultiFileLoader; import org.openide.loaders.MultiFileLoader;
import org.openide.util.NbBundle.Messages;
//TODO: move this new way of registering to core @Messages({
@Registration(displayName = "CTL_OpenInBlender", iconBase = "com/jme3/gde/blender/blender.png", mimeType = "application/blender") "LBL_Blender_LOADER=Blender Files"
})
@MIMEResolver.ExtensionRegistration(
displayName="#LBL_Blender_LOADER",
mimeType="application/blender",
extension={ "blend" }
)
@DataObject.Registration(
mimeType = "application/blender",
iconBase = "com/jme3/gde/blender/blender.png",
displayName="#LBL_Blender_LOADER",
position=300
)
@ActionReferences(value = { @ActionReferences(value = {
@ActionReference(id = @ActionReference(id =
@ActionID(category = "jMonkeyPlatform", id = "com.jme3.gde.core.assets.actions.ConvertModel"), path = "Loaders/application/blender/Actions", position = 10), @ActionID(category = "jMonkeyPlatform", id = "com.jme3.gde.core.assets.actions.ConvertModel"), path = "Loaders/application/blender/Actions", position = 10),
@ -38,7 +52,8 @@ import org.openide.loaders.MultiFileLoader;
@ActionReference(id = @ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.ToolsAction"), path = "Loaders/application/blender/Actions", position = 1200), @ActionID(category = "System", id = "org.openide.actions.ToolsAction"), path = "Loaders/application/blender/Actions", position = 1200),
@ActionReference(id = @ActionReference(id =
@ActionID(category = "System", id = "org.openide.actions.PropertiesAction"), path = "Loaders/application/blender/Actions", position = 1300)}) @ActionID(category = "System", id = "org.openide.actions.PropertiesAction"), path = "Loaders/application/blender/Actions", position = 1300)
})
public class BlenderDataObject extends SpatialAssetDataObject { public class BlenderDataObject extends SpatialAssetDataObject {
public BlenderDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException { public BlenderDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException {

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE MIME-resolver PUBLIC "-//NetBeans//DTD MIME Resolver 1.0//EN" "http://www.netbeans.org/dtds/mime-resolver-1_0.dtd">
<MIME-resolver>
<file>
<ext name="blend"/>
<resolver mime="application/blender"/>
</file>
</MIME-resolver>

@ -1,9 +1,5 @@
LBL_Blender_loader_name=Blender Files
OpenIDE-Module-Display-Category=jMonkeyEngine OpenIDE-Module-Display-Category=jMonkeyEngine
OpenIDE-Module-Long-Description=\ OpenIDE-Module-Long-Description=\
This plugin adds support for Blender .blend files This plugin adds support for Blender .blend files
OpenIDE-Module-Name=Blender Support OpenIDE-Module-Name=Blender Support
OpenIDE-Module-Short-Description=Adds support for Blender .blend files OpenIDE-Module-Short-Description=Adds support for Blender .blend files
Services/MIMEResolver/BlenderResolver.xml=Blender Files
Templates/Other/tpl_box.blend=Box prepared for UV texturing
Templates/Other/tpl_anim.blend=Basic animation example

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
<filesystem>
<folder name="Services">
<folder name="MIMEResolver">
<file name="BlenderResolver.xml" url="BlenderResolver.xml">
<attr name="displayName" bundlevalue="com.jme3.gde.blender.Bundle#Services/MIMEResolver/BlenderResolver.xml"/>
</file>
</folder>
</folder>
<folder name="Templates">
<folder name="Blender">
<file name="tpl_box.blend" url="tpl_box.blend">
<attr name="displayName" bundlevalue="com.jme3.gde.blender.Bundle#Templates/Other/tpl_box.blend"/>
<attr name="template" boolvalue="true"/>
</file>
<file name="tpl_anim.blend" url="tpl_anim.blend">
<attr name="displayName" bundlevalue="com.jme3.gde.blender.Bundle#Templates/Other/tpl_anim.blend"/>
<attr name="template" boolvalue="true"/>
</file>
</folder>
</folder>
</filesystem>

@ -0,0 +1,8 @@
@TemplateRegistrations({
@TemplateRegistration(folder = "Blender", content = "tpl_box.blend", displayName = "Box prepared for UV texturing"),
@TemplateRegistration(folder = "Blender", content = "tpl_anim.blend", displayName = "Basic animation example")
})
package com.jme3.gde.blender;
import org.netbeans.api.templates.TemplateRegistration;
import org.netbeans.api.templates.TemplateRegistrations;
Loading…
Cancel
Save