- fix some warnings and deprecations
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7744 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
09ef641d09
commit
fc04902c30
@ -171,19 +171,19 @@ public class AssetPackLoader {
|
||||
String path = fileElem.getAttribute("path");
|
||||
if ("material".equals(type) && (materialName == null || materialName.equals(path))) {
|
||||
if (hasExtension(path, "j3m")) {
|
||||
mat = pm.getManager().loadMaterial(path);
|
||||
mat = pm.loadMaterial(path);
|
||||
} else if (hasExtension(path, "material")) {
|
||||
if (matList == null) {
|
||||
Logger.getLogger(AssetPackLoader.class.getName()).log(Level.INFO, "Load Ogre Material");
|
||||
OgreMaterialKey matKey = new OgreMaterialKey(path);
|
||||
matKey.setMaterialExtensionSet(matExts);
|
||||
matList = pm.getManager().loadAsset(matKey);
|
||||
matList = pm.loadAsset(matKey);
|
||||
key = new OgreMeshKey(name, matList);
|
||||
} else {
|
||||
Logger.getLogger(AssetPackLoader.class.getName()).log(Level.INFO, "Add Ogre Material");
|
||||
OgreMaterialKey matKey = new OgreMaterialKey(path);
|
||||
matKey.setMaterialExtensionSet(matExts);
|
||||
MaterialList newMatList = pm.getManager().loadAsset(matKey);
|
||||
MaterialList newMatList = pm.loadAsset(matKey);
|
||||
matList.putAll(newMatList);
|
||||
}
|
||||
}
|
||||
@ -196,7 +196,7 @@ public class AssetPackLoader {
|
||||
String path = fileElem.getAttribute("path");
|
||||
if ("material".equals(type) && (materialName == null || materialName.equals(path))) {
|
||||
if (hasExtension(path, "j3m")) {
|
||||
mat = pm.getManager().loadMaterial(path);
|
||||
mat = pm.loadMaterial(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -207,9 +207,9 @@ public class AssetPackLoader {
|
||||
Logger.getLogger(AddAssetAction.class.getName()).log(Level.WARNING, "j3m and ogre material defined for asset {0}.", name);
|
||||
}
|
||||
if (key != null) {
|
||||
model = pm.getManager().loadAsset(key);
|
||||
model = pm.loadAsset(key);
|
||||
} else {
|
||||
model = pm.getManager().loadModel(name);
|
||||
model = pm.loadModel(name);
|
||||
}
|
||||
if (model == null) {
|
||||
Logger.getLogger(AddAssetAction.class.getName()).log(Level.SEVERE, "Could not load model {0}!", name);
|
||||
|
@ -26,6 +26,7 @@ import org.openide.WizardDescriptor;
|
||||
import org.openide.filesystems.FileObject;
|
||||
import org.openide.filesystems.FileUtil;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public final class ConvertOgreBinaryMeshesAction implements Action {
|
||||
|
||||
private final Project context;
|
||||
|
@ -24,6 +24,7 @@ import org.openide.WizardDescriptor;
|
||||
import org.openide.filesystems.FileUtil;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public final class ImportAssetAction implements Action {
|
||||
|
||||
private final AssetPackProject context;
|
||||
|
@ -33,6 +33,7 @@ import org.openide.filesystems.FileObject;
|
||||
import org.openide.filesystems.FileUtil;
|
||||
import org.openide.util.NbPreferences;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public final class PublishAssetPackAction implements Action {
|
||||
|
||||
private final Project context;
|
||||
|
@ -30,7 +30,7 @@ public final class LinkSceneComposer implements ActionListener {
|
||||
FileObject file = spatialAssetDataObject.getPrimaryFile();
|
||||
String assetName = manager.getRelativeAssetPath(file.getPath());
|
||||
SceneComposerTopComponent composer = SceneComposerTopComponent.findInstance();
|
||||
composer.linkModel(manager.getManager(), assetName);
|
||||
composer.linkModel(manager, assetName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public final class OpenSceneComposer implements ActionListener {
|
||||
java.awt.EventQueue.invokeLater(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
((DesktopAssetManager) manager.getManager()).clearCache();
|
||||
manager.clearCache();
|
||||
SceneComposerTopComponent composer = SceneComposerTopComponent.findInstance();
|
||||
composer.openScene(asset, context, manager);
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ import org.openide.util.Utilities;
|
||||
*/
|
||||
@ConvertAsProperties(dtd = "-//com.jme3.gde.scenecomposer//SceneComposer//EN",
|
||||
autostore = false)
|
||||
@SuppressWarnings("unchecked")
|
||||
public final class SceneComposerTopComponent extends TopComponent implements SceneListener, LookupListener {
|
||||
|
||||
private static SceneComposerTopComponent instance;
|
||||
@ -810,7 +811,7 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce
|
||||
if (toolController != null) {
|
||||
toolController.cleanup();
|
||||
}
|
||||
toolController = new SceneToolController(currentRequest.getToolNode(), currentRequest.getManager().getManager());
|
||||
toolController = new SceneToolController(currentRequest.getToolNode(), currentRequest.getManager());
|
||||
camController = new ComposerCameraController(SceneApplication.getApplication().getCamera(), request.getJmeNode());
|
||||
camController.setMaster(this);
|
||||
camController.enable();
|
||||
|
@ -698,7 +698,7 @@ public class SceneEditorController implements PropertyChangeListener, NodeListen
|
||||
final Node selected = selectedSpat.getLookup().lookup(Node.class);
|
||||
ProjectAssetManager manager = file.getLookup().lookup(ProjectAssetManager.class);
|
||||
if (manager != null) {
|
||||
((DesktopAssetManager) manager.getManager()).clearCache();
|
||||
manager.clearCache();
|
||||
}
|
||||
if (selected != null) {
|
||||
setNeedsSave(true);
|
||||
@ -716,7 +716,7 @@ public class SceneEditorController implements PropertyChangeListener, NodeListen
|
||||
ProgressHandle progressHandle = ProgressHandleFactory.createHandle("Adding Model..");
|
||||
progressHandle.start();
|
||||
try {
|
||||
Spatial linkNode = (Spatial) file.loadAsset();
|
||||
Spatial linkNode = file.loadAsset();
|
||||
if (linkNode != null) {
|
||||
selected.attachChild(linkNode);
|
||||
if (location != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user