X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.proconf.g3d%2Fsrc%2Forg%2Fsimantics%2Fproconf%2Fg3d%2Fscenegraph%2FModelNode.java;h=ab9a0e9e3c579b939704cd464135799bb3ae7932;hb=1a25726897311e0277de2476c40bf2ae7c93ed86;hp=40e845a10b8d7a0ec901931d253d846053bb69fa;hpb=477a3eae417fe71addfcf8f87dab41f87151a384;p=simantics%2F3d.git diff --git a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ModelNode.java b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ModelNode.java index 40e845a1..ab9a0e9e 100644 --- a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ModelNode.java +++ b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ModelNode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 VTT Technical Research Centre of Finland and others. + * Copyright (c) 2007- VTT Technical Research Centre of Finland. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -22,7 +22,7 @@ import org.simantics.proconf.g3d.animation.Animatable; import org.simantics.proconf.g3d.base.ThreeDimensionalEditorBase; import org.simantics.proconf.g3d.stubs.G3DModel; import org.simantics.proconf.g3d.stubs.G3DNode; -import org.simantics.utils.ErrorLogger; +import org.simantics.utils.ui.ErrorLogger; public class ModelNode extends AbstractGraphicsNode implements Animatable, IGeometryNode{ protected List shapes = new ArrayList(); @@ -43,7 +43,7 @@ public class ModelNode extends AbstractGraphicsNode implements Animatable, IGeom G3DModel model = getG3DModel(graph); Collection nodes = model.getChild(); if (nodes.size() == 0) { - ErrorLogger.defaultLogError("ModelNode " + model.getResource() + " has no shapes", null); + ErrorLogger.defaultLogError("ModelNode " + model.getResource().getResourceId() + " has no shapes", null); return; } for (G3DNode node: nodes) { @@ -175,14 +175,14 @@ public class ModelNode extends AbstractGraphicsNode implements Animatable, IGeom return false; } G3DModel model = getG3DModel(graph); - Collection animations = model.getAnimation(); + Collection animations = model.getAnimation(); int num = animations.size(); if (num == 0) { ErrorLogger.getDefault().logWarning("Cannot set animation for " + shapeResource + " since it has no animations", null); return false; } int random = (int)Math.round(Math.random() * (num-1)); - Iterator i = animations.iterator(); + Iterator i = animations.iterator(); while(random > 0) { i.next(); random--;