Revision: 20164 http://sourceforge.net/p/jmol/code/20164 Author: hansonr Date: 2014-12-18 00:45:21 +0000 (Thu, 18 Dec 2014) Log Message: ----------- Jmol.___JmolVersion="14.3.11_2014.12.17"
bug fix: rotate selected <4x4 matrix> should not rotate about center of atoms bug fix: use of a subset command will change value of a variable bitset if "select x" is used -- example: x = {*} subset {atomno < 10} print x // just the first 9 select x // just the first 9 subset all print x // but now x itself is truncated; this is not supposed to be the case new feature: SYNC nnnn x -- x is a math expression, possibly just a string, but also possibly an associative array. new feature: SYNC nnnn {type:"command", "command" : command, "var": vname, "data":vdata} -- script command request, with optional definition of a Jmol user variable prior to execution) -- for example: x = {"type":"command","command":"background green; print y", "var": "y", "data":['an array',2]} sync 3000 x -- allows simple transfer of data via JSON strings between applications Modified Paths: -------------- trunk/Jmol/src/javajs/util/Measure.java trunk/Jmol/src/org/jmol/modelset/ModelSet.java trunk/Jmol/src/org/jmol/script/ScriptEval.java trunk/Jmol/src/org/jmol/script/ScriptExpr.java trunk/Jmol/src/org/jmol/script/ScriptManager.java trunk/Jmol/src/org/jmol/scriptext/CmdExt.java trunk/Jmol/src/org/jmol/scriptext/MathExt.java trunk/Jmol/src/org/jmol/symmetry/SymmetryDesc.java trunk/Jmol/src/org/jmol/thread/SpinThread.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties trunk/Jmol/src/org/jmol/viewer/SelectionManager.java trunk/Jmol/src/org/jmol/viewer/TransformManager.java trunk/Jmol/src/org/jmol/viewer/Viewer.java trunk/Jmol/src/org/openscience/jmol/app/jsonkiosk/JsonNioService.java Modified: trunk/Jmol/src/javajs/util/Measure.java =================================================================== --- trunk/Jmol/src/javajs/util/Measure.java 2014-12-16 03:52:45 UTC (rev 20163) +++ trunk/Jmol/src/javajs/util/Measure.java 2014-12-18 00:45:21 UTC (rev 20164) @@ -416,7 +416,7 @@ for (int i = 0; i < vPts.size(); i++) { P3 pt = P3.newP(vPts.get(i)); pt.sub(center); - m4.rotTrans2(pt, pt); + m4.rotTrans(pt); pt.add(center); v.addLast(pt); } Modified: trunk/Jmol/src/org/jmol/modelset/ModelSet.java =================================================================== --- trunk/Jmol/src/org/jmol/modelset/ModelSet.java 2014-12-16 03:52:45 UTC (rev 20163) +++ trunk/Jmol/src/org/jmol/modelset/ModelSet.java 2014-12-18 00:45:21 UTC (rev 20164) @@ -4059,20 +4059,27 @@ */ } - - public void moveAtoms(M3 mNew, M3 rotation, V3 translation, BS bs, + public void moveAtoms(M4 m4, M3 mNew, M3 rotation, V3 translation, BS bs, P3 center, boolean isInternal, boolean translationOnly) { - if (!translationOnly) { + if (m4 != null) { + for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) + m4.rotTrans(at[i]); + mat4.setM4(m4); + translation = null; + } else if (!translationOnly) { if (mNew == null) { matTemp.setM3(rotation); } else { + // screen frame? + // must do inv(currentRot) * mNew * currentRot + ptTemp.set(0, 0, 0); matInv.setM3(rotation); matInv.invert(); - ptTemp.set(0, 0, 0); matTemp.mul2(mNew, rotation); matTemp.mul2(matInv, matTemp); } if (isInternal) { + // adjust rotation to be around center of this set of atoms vTemp.setT(center); mat4.setIdentity(); mat4.setTranslation(vTemp); @@ -4206,7 +4213,7 @@ pt = Measure.getCenterAndPoints(vNot)[0]; V3 v = V3.newVsub(thisAtom, pt); Quat q = Quat.newVA(v, 180); - moveAtoms(null, q.getMatrix(), null, bsAtoms, thisAtom, true, false); + moveAtoms(null, null, q.getMatrix(), null, bsAtoms, thisAtom, true, false); } } Modified: trunk/Jmol/src/org/jmol/script/ScriptEval.java =================================================================== --- trunk/Jmol/src/org/jmol/script/ScriptEval.java 2014-12-16 03:52:45 UTC (rev 20163) +++ trunk/Jmol/src/org/jmol/script/ScriptEval.java 2014-12-18 00:45:21 UTC (rev 20164) @@ -5711,6 +5711,7 @@ V3 translation = null; M4 m4 = null; M3 m3 = null; + boolean is4x4 = false; int direction = 1; int tok; Quat q = null; @@ -5896,37 +5897,39 @@ isSelected = true; continue; case T.compare: + bsCompare = atomExpressionAt(++i); + ptsA = vwr.ms.getAtomPointVector(bsCompare); + if (ptsA == null) { + iToken = i; + invArg(); + } + i = iToken; + ptsB = getPointVector(getToken(++i), i); + if (ptsB == null || ptsA.size() != ptsB.size()) { + iToken = i; + invArg(); + } + m4 = new M4(); + points[0] = new P3(); + nPoints = 1; + Interface.getInterface("javajs.util.Eigen", vwr, "script"); + float stddev = (chk ? 0 : Measure.getTransformMatrix4(ptsA, ptsB, m4, + points[0])); + // if the standard deviation is very small, we leave ptsB + // because it will be used to set the absolute final positions + if (stddev > 0.001) + ptsB = null; + //$FALL-THROUGH$ case T.matrix4f: case T.matrix3f: haveRotation = true; - if (tok == T.compare) { - bsCompare = atomExpressionAt(++i); - ptsA = vwr.ms.getAtomPointVector(bsCompare); - if (ptsA == null) { - iToken = i; - invArg(); - } - i = iToken; - ptsB = getPointVector(getToken(++i), i); - if (ptsB == null || ptsA.size() != ptsB.size()) { - iToken = i; - invArg(); - } - m4 = new M4(); - points[0] = new P3(); - nPoints = 1; - Interface.getInterface("javajs.util.Eigen", vwr, "script"); - float stddev = (chk ? 0 : Measure.getTransformMatrix4(ptsA, ptsB, m4, - points[0])); - // if the standard deviation is very small, we leave ptsB - // because it will be used to set the absolute final positions - if (stddev > 0.001) - ptsB = null; - } else if (tok == T.matrix4f) { + m3 = new M3(); + if (tok == T.matrix4f) { + is4x4 = true; m4 = (M4) theToken.value; } - m3 = new M3(); if (m4 != null) { + // translation and rotation are calculated translation = new V3(); m4.getTranslation(translation); m4.getRotationScale(m3); @@ -5977,9 +5980,9 @@ } if (q != null) { - // only when there is a translation (4x4 matrix or TRANSLATE) + // only when there is a translation but not a 4x4 matrix) // do we set the rotation to be the center of the selected atoms or model - if (nPoints == 0 && translation != null) + if (nPoints == 0 && translation != null && !is4x4) points[0] = vwr.ms.getAtomSetCenter(bsAtoms != null ? bsAtoms : isSelected ? vwr.bsA() : vwr.getAllAtoms()); if (helicalPath && translation != null) { @@ -6080,6 +6083,7 @@ } if (bsAtoms != null && isSpin && ptsB == null && m4 != null) { ptsA = vwr.ms.getAtomPointVector(bsAtoms); + // note that this m4 is NOT through ptsB = Measure.transformPoints(ptsA, m4, points[0]); } if (bsAtoms != null && !isSpin && ptsB != null) { @@ -6088,7 +6092,7 @@ if (requiresThread && !useThreads()) return; if (vwr.rotateAboutPointsInternal(this, points[0], points[1], rate, - endDegrees, isSpin, bsAtoms, translation, ptsB, dihedralList) + endDegrees, isSpin, bsAtoms, translation, ptsB, dihedralList, is4x4 ? m4 : null) && isJS && isSpin) throw new ScriptInterruption(this, "rotate", 1); @@ -7544,11 +7548,11 @@ private void cmdSync() throws ScriptException { // new 11.3.9 - checkLength(-3); String text = ""; String applet = ""; int port = PT.parseInt(optParameterAsString(1)); if (port == Integer.MIN_VALUE) { + checkLength(-3); port = 0; switch (slen) { case 1: @@ -7578,7 +7582,10 @@ break; } } else { - text = (slen == 2 ? null : paramAsStr(2)); + SV v = null; + if (slen > 2 && (v = setVariable(2, -1, "", false)) == null) + return; + text = (slen == 2 ? null : v.tok == T.hash ? v.toJSON() : v.asString()); applet = null; } if (chk) Modified: trunk/Jmol/src/org/jmol/script/ScriptExpr.java =================================================================== --- trunk/Jmol/src/org/jmol/script/ScriptExpr.java 2014-12-16 03:52:45 UTC (rev 20163) +++ trunk/Jmol/src/org/jmol/script/ScriptExpr.java 2014-12-18 00:45:21 UTC (rev 20164) @@ -973,7 +973,7 @@ BS bs = (expressionResult instanceof BS ? (BS) expressionResult : new BS()); isBondSet = (expressionResult instanceof BondSet); if (!isBondSet - && vwr.excludeAtoms(bs, ignoreSubset).length() > vwr.ms.ac) + && (bs = vwr.slm.excludeAtoms(bs, ignoreSubset)).length() > vwr.ms.ac) bs.clearAll(); if (tempStatement != null) { st = tempStatement; Modified: trunk/Jmol/src/org/jmol/script/ScriptManager.java =================================================================== --- trunk/Jmol/src/org/jmol/script/ScriptManager.java 2014-12-16 03:52:45 UTC (rev 20163) +++ trunk/Jmol/src/org/jmol/script/ScriptManager.java 2014-12-18 00:45:21 UTC (rev 20164) @@ -497,7 +497,7 @@ if (eval == null) eval = evalTemp = newScriptEvaluator(); } - return vwr.excludeAtoms(eval.getAtomBitSet(atomExpression), false); + return vwr.slm.excludeAtoms(eval.getAtomBitSet(atomExpression), false); } @Override Modified: trunk/Jmol/src/org/jmol/scriptext/CmdExt.java =================================================================== --- trunk/Jmol/src/org/jmol/scriptext/CmdExt.java 2014-12-16 03:52:45 UTC (rev 20163) +++ trunk/Jmol/src/org/jmol/scriptext/CmdExt.java 2014-12-18 00:45:21 UTC (rev 20164) @@ -918,7 +918,7 @@ if (!eval.useThreads()) doAnimate = false; if (vwr.rotateAboutPointsInternal(eval, center, pt1, endDegrees / nSeconds, - endDegrees, doAnimate, bsFrom, translation, ptsB, null) + endDegrees, doAnimate, bsFrom, translation, ptsB, null, null) && doAnimate && eval.isJS) throw new ScriptInterruption(eval, "compare", 1); Modified: trunk/Jmol/src/org/jmol/scriptext/MathExt.java =================================================================== --- trunk/Jmol/src/org/jmol/scriptext/MathExt.java 2014-12-16 03:52:45 UTC (rev 20163) +++ trunk/Jmol/src/org/jmol/scriptext/MathExt.java 2014-12-18 00:45:21 UTC (rev 20164) @@ -182,14 +182,14 @@ return evaluateRandom(mp, args); case T.in: return evaluateIn(mp, args); + case T.modulation: + return evaluateModulation(mp, args); case T.replace: return evaluateReplace(mp, args); case T.search: case T.smiles: case T.substructure: return evaluateSubstructure(mp, args, tok); - case T.modulation: - return evaluateModulation(mp, args); case T.sort: case T.count: return evaluateSort(mp, args, tok); Modified: trunk/Jmol/src/org/jmol/symmetry/SymmetryDesc.java =================================================================== --- trunk/Jmol/src/org/jmol/symmetry/SymmetryDesc.java 2014-12-16 03:52:45 UTC (rev 20163) +++ trunk/Jmol/src/org/jmol/symmetry/SymmetryDesc.java 2014-12-18 00:45:21 UTC (rev 20164) @@ -797,7 +797,7 @@ P3 pt00, V3 vtrans) { P3 p0 = P3.newP(pt00); uc.toFractional(p0, false); - op.rotTrans2(p0, p0); + op.rotTrans(p0); p0.add(vtrans); uc.toCartesian(p0, false); return p0; Modified: trunk/Jmol/src/org/jmol/thread/SpinThread.java =================================================================== --- trunk/Jmol/src/org/jmol/thread/SpinThread.java 2014-12-16 03:52:45 UTC (rev 20163) +++ trunk/Jmol/src/org/jmol/thread/SpinThread.java 2014-12-18 00:45:21 UTC (rev 20164) @@ -29,6 +29,8 @@ import org.jmol.java.BS; import org.jmol.script.T; import javajs.util.Lst; +import javajs.util.M4; + import org.jmol.util.Logger; import javajs.util.P3; import org.jmol.viewer.JC; @@ -54,6 +56,7 @@ //private boolean navigatingSurface; private BS[] bsBranches; private boolean isDone = false; + private M4 m4; /** * @j2sIgnore @@ -223,7 +226,7 @@ : transformManager.fixedRotationAxis).angle / myFps; if (transformManager.isSpinInternal) { - transformManager.rotateAxisAngleRadiansInternal(angle, bsAtoms); + transformManager.rotateAxisAngleRadiansInternal(angle, bsAtoms, m4); } else { transformManager.rotateAxisAngleRadiansFixed(angle, bsAtoms); } Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2014-12-16 03:52:45 UTC (rev 20163) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2014-12-18 00:45:21 UTC (rev 20164) @@ -15,8 +15,33 @@ TODO: design and implement sidechain mutation -- MUTATE command ? TODO: remove HTML5 dependency on synchronous file loading (check SCRIPT command for problems) -Jmol.___JmolVersion="14.3.11_2014.12.15" +Jmol.___JmolVersion="14.3.11_2014.12.17" + +bug fix: rotate selected <4x4 matrix> should not rotate about center of atoms +bug fix: use of a subset command will change value of a variable bitset if "select x" is used + -- example: + x = {*} + subset {atomno < 10} + print x // just the first 9 + select x // just the first 9 + subset all + print x // but now x itself is truncated; this is not supposed to be the case + + +new feature: SYNC nnnn x + -- x is a math expression, possibly just a string, but also possibly an associative array. + +new feature: SYNC nnnn {type:"command", "command" : command, "var": vname, "data":vdata} + -- script command request, with optional definition of a Jmol user variable prior to execution) + -- for example: + x = {"type":"command","command":"background green; print y", "var": "y", "data":['an array',2]} + sync 3000 x + -- allows simple transfer of data via JSON strings between applications + + +JmolVersion="14.3.11_2014.12.15" + FEATURE CHANGE: JmolViewer interface streamlined -- many esoteric methods removed -- can be reinstated upon request Modified: trunk/Jmol/src/org/jmol/viewer/SelectionManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/SelectionManager.java 2014-12-16 03:52:45 UTC (rev 20163) +++ trunk/Jmol/src/org/jmol/viewer/SelectionManager.java 2014-12-18 00:45:21 UTC (rev 20164) @@ -322,11 +322,12 @@ return BSUtil.copy(bsSelection); } - void excludeAtoms(BS bs, boolean ignoreSubset) { + public BS excludeAtoms(BS bs, boolean ignoreSubset) { if (bsDeleted != null) bs.andNot(bsDeleted); if (!ignoreSubset && bsSubset != null) - bs.and(bsSubset); + (bs = BSUtil.copy(bs)).and(bsSubset); + return bs; } void setMotionFixedAtoms(BS bs) { Modified: trunk/Jmol/src/org/jmol/viewer/TransformManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/TransformManager.java 2014-12-16 03:52:45 UTC (rev 20163) +++ trunk/Jmol/src/org/jmol/viewer/TransformManager.java 2014-12-18 00:45:21 UTC (rev 20164) @@ -260,7 +260,7 @@ unTransformPoint(pt2, pt2); vwr.setInMotion(false); rotateAboutPointsInternal(null, pt2, pt1, 10 * speed, Float.NaN, false, - true, null, true, null, null, null); + true, null, true, null, null, null, null); } // final V3 arcBall0 = new V3(); @@ -311,12 +311,12 @@ } private void applyRotation(M3 mNew, boolean isInternal, BS bsAtoms, - V3 translation, boolean translationOnly) { + V3 translation, boolean translationOnly, M4 m4) { if (bsAtoms == null) { matrixRotate.mul2(mNew, matrixRotate); return; } - vwr.moveAtoms(mNew, matrixRotate, translation, internalRotationCenter, + vwr.moveAtoms(m4, mNew, matrixRotate, translation, internalRotationCenter, isInternal, bsAtoms, translationOnly); if (translation != null) { internalRotationCenter.add(translation); @@ -335,22 +335,22 @@ // the signs of both screen Y and screen Z in the end. if (matrixTemp3.setAsBallRotation(JC.radiansPerDegree, -yDeg, -xDeg)) - applyRotation(matrixTemp3, false, bsAtoms, null, false); + applyRotation(matrixTemp3, false, bsAtoms, null, false, null); } public synchronized void rotateXRadians(float angleRadians, BS bsAtoms) { applyRotation(matrixTemp3.setAsXRotation(angleRadians), false, bsAtoms, - null, false); + null, false, null); } public synchronized void rotateYRadians(float angleRadians, BS bsAtoms) { applyRotation(matrixTemp3.setAsYRotation(angleRadians), false, bsAtoms, - null, false); + null, false, null); } public synchronized void rotateZRadians(float angleRadians) { applyRotation(matrixTemp3.setAsZRotation(angleRadians), false, null, null, - false); + false, null); } public void rotateAxisAngle(V3 rotAxis, float radians) { @@ -359,7 +359,7 @@ } private synchronized void rotateAxisAngle2(A4 axisAngle, BS bsAtoms) { - applyRotation(matrixTemp3.setAA(axisAngle), false, bsAtoms, null, false); + applyRotation(matrixTemp3.setAA(axisAngle), false, bsAtoms, null, false, null); } /* @@ -436,6 +436,7 @@ * @param translation * @param finalPoints * @param dihedralList + * @param m4 * @return true if synchronous so that JavaScript can restart properly */ boolean rotateAboutPointsInternal(JmolScriptEvaluator eval, T3 point1, @@ -443,7 +444,7 @@ float endDegrees, boolean isClockwise, boolean isSpin, BS bsAtoms, boolean isGesture, V3 translation, - Lst<P3> finalPoints, float[] dihedralList) { + Lst<P3> finalPoints, float[] dihedralList, M4 m4) { // *THE* Viewer INTERNAL frame rotation entry point @@ -463,11 +464,7 @@ axis.scale(-1f); internalRotationCenter.setT(point1); rotationAxis.setT(axis); - if (translation == null) { - internalTranslation = null; - } else { - internalTranslation = V3.newV(translation); - } + internalTranslation = (translation == null ? null : V3.newV(translation)); } boolean isSelected = (bsAtoms != null); if (isSpin) { @@ -498,12 +495,12 @@ } float radians = endDegrees * JC.radiansPerDegree; internalRotationAxis.setVA(axis, radians); - rotateAxisAngleRadiansInternal(radians, bsAtoms); + rotateAxisAngleRadiansInternal(radians, bsAtoms, m4); return false; } public synchronized void rotateAxisAngleRadiansInternal(float radians, - BS bsAtoms) { + BS bsAtoms, M4 m4) { // final matrix rotation when spinning or just rotating @@ -518,7 +515,7 @@ // NOW apply that rotation applyRotation(matrixTemp3.setAA(axisangleT), true, bsAtoms, - internalTranslation, radians > 1e6f); + internalTranslation, radians > 1e6f, m4); if (bsAtoms == null) getNewFixedRotationCenter(); } Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Viewer.java 2014-12-16 03:52:45 UTC (rev 20163) +++ trunk/Jmol/src/org/jmol/viewer/Viewer.java 2014-12-18 00:45:21 UTC (rev 20164) @@ -110,6 +110,7 @@ import javajs.util.P4; import org.jmol.util.Rectangle; +import javajs.util.M4; import javajs.util.Measure; import javajs.util.Rdr; import javajs.util.CU; @@ -2581,18 +2582,13 @@ } public BS getModelUndeletedAtomsBitSet(int modelIndex) { - return excludeAtoms(ms.getModelAtomBitSetIncludingDeleted(modelIndex, true), false); + return slm.excludeAtoms(ms.getModelAtomBitSetIncludingDeleted(modelIndex, true), false); } public BS getModelUndeletedAtomsBitSetBs(BS bsModels) { - return excludeAtoms(ms.getModelAtomBitSetIncludingDeletedBs(bsModels), false); + return slm.excludeAtoms(ms.getModelAtomBitSetIncludingDeletedBs(bsModels), false); } - public BS excludeAtoms(BS bs, boolean ignoreSubset) { - slm.excludeAtoms(bs, ignoreSubset); - return bs; - } - @Override public P3 getBoundBoxCenter() { return ms.getBoundBoxCenter(am.cmi); @@ -7134,7 +7130,7 @@ float endDegrees, boolean isSpin, BS bsSelected, V3 translation, Lst<P3> finalPoints, - float[] dihedralList) { + float[] dihedralList, M4 m4) { // Eval: rotate INTERNAL if (headless) { @@ -7145,7 +7141,7 @@ boolean isOK = tm.rotateAboutPointsInternal(eval, point1, point2, degreesPerSecond, endDegrees, false, isSpin, bsSelected, false, - translation, finalPoints, dihedralList); + translation, finalPoints, dihedralList, m4); if (isOK) setSync(); return isOK; @@ -7161,7 +7157,7 @@ } tm.rotateAboutPointsInternal(null, pt1, pt2, g.pickingSpinRate, Float.MAX_VALUE, isClockwise, true, null, - false, null, null, null); + false, null, null, null, null); } public V3 getModelDipole() { @@ -7305,12 +7301,12 @@ sm.setStatusAtomMoved(bs); } - public void moveAtoms(M3 mNew, M3 rotation, V3 translation, + public void moveAtoms(M4 m4, M3 mNew, M3 rotation, V3 translation, P3 center, boolean isInternal, BS bsAtoms, boolean translationOnly) { // from TransformManager exclusively if (bsAtoms.cardinality() == 0) return; - ms.moveAtoms(mNew, rotation, translation, bsAtoms, center, + ms.moveAtoms(m4, mNew, rotation, translation, bsAtoms, center, isInternal, translationOnly); checkMinimization(); sm.setStatusAtomMoved(bsAtoms); @@ -7474,7 +7470,7 @@ bs.andNot(slm.getMotionFixedAtoms()); rotateAboutPointsInternal(eval, atom1, atom2, 0, degrees, false, bs, null, - null, null); + null, null, null); } public void refreshMeasures(boolean andStopMinimization) { @@ -8916,7 +8912,7 @@ // used for set picking SELECT if (atomExpression instanceof BS) - return excludeAtoms((BS) atomExpression, false); + return slm.excludeAtoms((BS) atomExpression, false); getScriptManager(); return getAtomBitSetEval(eval, atomExpression); } Modified: trunk/Jmol/src/org/openscience/jmol/app/jsonkiosk/JsonNioService.java =================================================================== --- trunk/Jmol/src/org/openscience/jmol/app/jsonkiosk/JsonNioService.java 2014-12-16 03:52:45 UTC (rev 20163) +++ trunk/Jmol/src/org/openscience/jmol/app/jsonkiosk/JsonNioService.java 2014-12-18 00:45:21 UTC (rev 20164) @@ -93,7 +93,8 @@ * * {"type" : "banner", "mode" : "ON" or "OFF" } (set banner for kiosk) * {"type" : "banner", "text" : bannerText } (set banner for kiosk) - * {"type" : "command", "command" : command } (script command request) + * {"type" : "command", "command" : command, "var": vname, "data":vdata} + * (script command request, with optional definition of a Jmol user variable prior to execution) * {"type" : "content", "id" : id } (load content request) * {"type" : "move", "style" : (see below) } (mouse command request) * {"type" : "quit" } (shut down request) @@ -542,6 +543,8 @@ case 10: // command if (contentDisabled) break; + if (json.containsKey("var") && json.containsKey("data")) + vwr.g.setUserVariable(json.get("var").toString(), SV.getVariable(json.get("data"))); sendScript(json.getString("command")); break; case 20: // content @@ -771,7 +774,7 @@ public Object get(String key) { Object o = super.get(key); - return (o instanceof SV ? ((SV) o).value : o); + return (o instanceof SV ? SV.oValue((SV) o) : o); } public long getLong(String key) throws Exception { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits