import org.simantics.g3d.math.Ray;
import org.simantics.g3d.scenegraph.IG3DNode;
+import org.simantics.g3d.toolbar.ToolComposite;
import org.simantics.g3d.vtk.swt.InteractiveVtkComposite;
import org.simantics.g3d.vtk.utils.vtkUtil;
import org.simantics.plant3d.Activator;
private InlineComponent component;
- public TranslateFreeVariableLengthAction(InteractiveVtkComposite panel, P3DRootNode root) {
- super(panel, root, false);
+ public TranslateFreeVariableLengthAction(InteractiveVtkComposite panel, P3DRootNode root, ToolComposite toolComposite) {
+ super(panel, root, toolComposite, false);
setText("Translate");
setImageDescriptor(Activator.imageDescriptorFromPlugin("com.famfamfam.silk", "icons/arrow_refresh.png"));
}
lock = LockType.CUSTOM;
} else if (startComponent instanceof PipelineComponent){
if (startComponent instanceof InlineComponent) {
- direction = startComponent.getControlPoint().getPathLegDirection(reversed ? Direction.PREVIOUS : Direction.NEXT);
+ direction = startComponent.getControlPoint().getInlineDir();
+ if (reversed) direction.negate();
lock = LockType.CUSTOM;
if (((InlineComponent) startComponent).isVariableLength()) {
direction = null;