if (numParticles < 2)\r
numParticles = 2;\r
\r
- particle = ParticleFactory.buildParticles("Animation of " + s.getResource().getResourceId(s.getGraph().getSession()),numParticles, ParticleGeometry.PT_QUAD);//new ParticleMesh("Animation of " + r.getId(),40);\r
+ particle = ParticleFactory.buildParticles("Animation of " + s.getResource().getResourceId(),numParticles, ParticleGeometry.PT_QUAD);//new ParticleMesh("Animation of " + r.getId(),40);\r
particle.setEmissionDirection(VecmathJmeTools.get(dir).normalize());\r
particle.setLocalTranslation(VecmathJmeTools.get(p1));\r
particle.setEmitType(ParticleGeometry.ET_POINT);\r
}\r
\r
static boolean isControlPointChanged(PipeControlPoint node) {\r
- Session session = node.getGraph().getSession();\r
- long id = node.getResource().getResourceId(session);\r
+\r
+ long id = node.getResource().getResourceId();\r
\r
boolean changed = updatePosition(node);\r
//if (!changed) {\r
if (node.isInstanceOf(ProcessResource.plant3Dresource.PathLegEndControlPoint)) {\r
if (node.isInstanceOf(ProcessResource.plant3Dresource.TurnControlPoint)) {\r
- Pair<Long,Long> connected = (Pair<Long,Long>)getProperty(node.getResource().getResourceId(session));\r
+ Pair<Long,Long> connected = (Pair<Long,Long>)getProperty(node.getResource().getResourceId());\r
PipeControlPoint next = node.getNext();\r
PipeControlPoint prev = node.getPrevious();\r
if ((next != null && prev != null) && (\r
connected == null || \r
(connected.first == null && prev != null) ||\r
(connected.second == null && next != null) ||\r
- !connected.first.equals(prev.getResource().getResourceId(session)) ||\r
- !connected.second.equals(next.getResource().getResourceId(session)))) {\r
- storeProperty(id, new Pair<Long,Long>(prev.getResource().getResourceId(session),next.getResource().getResourceId(session)));\r
+ !connected.first.equals(prev.getResource().getResourceId()) ||\r
+ !connected.second.equals(next.getResource().getResourceId()))) {\r
+ storeProperty(id, new Pair<Long,Long>(prev.getResource().getResourceId(),next.getResource().getResourceId()));\r
changed = true; \r
}\r
if (node.isInstanceOf(ProcessResource.plant3Dresource.VariableAngleTurnControlPoint)) {\r
IEntity t = EntityFactory.create(g,type);\r
if (t.getRelatedObjects(ProcessResource.plant3Dresource.HasGraphics).size() > 0) {\r
String key = t.getName();\r
- if (key.equals("")) key = "ERROR (" + type.getResourceId(g.getSession()) + ")";\r
+ if (key.equals("")) key = "ERROR (" + type.getResourceId() + ")";\r
sorter.put(key, type);\r
}\r
}\r
Collection<Animation> animations = model.getAnimation();\r
for (Animation a : animations) {\r
String key = a.getName();\r
- if (key.equals("")) key = "ERROR (" + a.getResource().getResourceId(model.getGraph().getSession()) + ")";\r
+ if (key.equals("")) key = "ERROR (" + a.getResource().getResourceId() + ")";\r
sorter.put(key, a);\r
}\r
\r
for (Resource type : types) {\r
IEntity t = EntityFactory.create(g, type);\r
String key = t.getName();\r
- if (key.equals("")) key = "ERROR (" + type.getResourceId(g.getSession()) + ")";\r
+ if (key.equals("")) key = "ERROR (" + type.getResourceId() + ")";\r
sorter.put(key, type);\r
}\r
\r
for (IEntity model : models) {\r
\r
String key = model.getName();\r
- if (key.equals("")) key = "ERROR (" + model.getResource().getResourceId(resource.getGraph().getSession()) + ")";\r
+ if (key.equals("")) key = "ERROR (" + model.getResource().getResourceId() + ")";\r
sorter.put(key, new G3DModel(model));\r
}\r
\r