diff --git a/sdk/jme3-blender/manifest.mf b/sdk/jme3-blender/manifest.mf index bb1cbea8b..3e10413d0 100644 --- a/sdk/jme3-blender/manifest.mf +++ b/sdk/jme3-blender/manifest.mf @@ -1,6 +1,5 @@ Manifest-Version: 1.0 OpenIDE-Module: com.jme3.gde.blender OpenIDE-Module-Implementation-Version: 0 -OpenIDE-Module-Layer: com/jme3/gde/blender/layer.xml OpenIDE-Module-Localizing-Bundle: com/jme3/gde/blender/Bundle.properties diff --git a/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderDataObject.java b/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderDataObject.java index e3786c568..3dd1a9c77 100644 --- a/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderDataObject.java +++ b/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderDataObject.java @@ -12,12 +12,26 @@ import org.openide.awt.ActionID; import org.openide.awt.ActionReference; import org.openide.awt.ActionReferences; 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.MultiFileLoader; +import org.openide.util.NbBundle.Messages; -//TODO: move this new way of registering to core -@Registration(displayName = "CTL_OpenInBlender", iconBase = "com/jme3/gde/blender/blender.png", mimeType = "application/blender") +@Messages({ + "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 = { @ActionReference(id = @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 = @ActionID(category = "System", id = "org.openide.actions.ToolsAction"), path = "Loaders/application/blender/Actions", position = 1200), @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 BlenderDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException { diff --git a/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderResolver.xml b/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderResolver.xml deleted file mode 100644 index 4144653ca..000000000 --- a/sdk/jme3-blender/src/com/jme3/gde/blender/BlenderResolver.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - diff --git a/sdk/jme3-blender/src/com/jme3/gde/blender/Bundle.properties b/sdk/jme3-blender/src/com/jme3/gde/blender/Bundle.properties index 7acb6cb4a..308f74884 100644 --- a/sdk/jme3-blender/src/com/jme3/gde/blender/Bundle.properties +++ b/sdk/jme3-blender/src/com/jme3/gde/blender/Bundle.properties @@ -1,9 +1,5 @@ -LBL_Blender_loader_name=Blender Files OpenIDE-Module-Display-Category=jMonkeyEngine OpenIDE-Module-Long-Description=\ This plugin adds support for Blender .blend files OpenIDE-Module-Name=Blender Support -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 +OpenIDE-Module-Short-Description=Adds support for Blender .blend files \ No newline at end of file diff --git a/sdk/jme3-blender/src/com/jme3/gde/blender/layer.xml b/sdk/jme3-blender/src/com/jme3/gde/blender/layer.xml deleted file mode 100644 index 6378089fc..000000000 --- a/sdk/jme3-blender/src/com/jme3/gde/blender/layer.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sdk/jme3-blender/src/com/jme3/gde/blender/package-info.java b/sdk/jme3-blender/src/com/jme3/gde/blender/package-info.java new file mode 100644 index 000000000..2fcb4954e --- /dev/null +++ b/sdk/jme3-blender/src/com/jme3/gde/blender/package-info.java @@ -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;