Revision: 18315
          http://sourceforge.net/p/jmol/code/18315
Author:   hansonr
Date:     2013-06-08 12:30:43 +0000 (Sat, 08 Jun 2013)
Log Message:
-----------
___JmolVersion="13.1.17_dev_2013.06.07"

TODO: PyMOL EDM data saved from PyMOL 1.6? 
TODO: PyMOL uniqueAtomSettings for mesh_color, surface_color, and transparency
        -- color isosurface {xxxx} red translucent 0.5  ??

bug fix: jvxl reader ignores jvxlVertexColorData 

Modified Paths:
--------------
    trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java
    trunk/Jmol/src/org/jmol/shapesurface/Isosurface.java
    trunk/Jmol/src/org/jmol/shapesurface/IsosurfaceMesh.java
    trunk/Jmol/src/org/jmol/viewer/Jmol.properties

Modified: trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java
===================================================================
--- trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java  2013-06-08 
12:30:13 UTC (rev 18314)
+++ trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java  2013-06-08 
12:30:43 UTC (rev 18315)
@@ -1169,6 +1169,10 @@
       params.state = Parameters.STATE_DATA_COLORED;
       surfaceReader.applyColorScale();
     }
+    if (jvxlData.vertexColorMap != null) {
+      jvxlData.vertexColorMap = null;
+      surfaceReader.hasColorData = false;
+    }
     surfaceReader.jvxlUpdateInfo();
     setMarchingSquares(surfaceReader.marchingSquares);
     surfaceReader.discardTempData(false);

Modified: trunk/Jmol/src/org/jmol/shapesurface/Isosurface.java
===================================================================
--- trunk/Jmol/src/org/jmol/shapesurface/Isosurface.java        2013-06-08 
12:30:13 UTC (rev 18314)
+++ trunk/Jmol/src/org/jmol/shapesurface/Isosurface.java        2013-06-08 
12:30:43 UTC (rev 18315)
@@ -267,15 +267,32 @@
       // color $id red ({0:30 ....})  (atoms)
       // color $id red [{0:30 ....}]  (vertices)
       if (thisMesh != null) {
-        if (thisMesh.vertexSource == null) {
+        boolean haveColors = (thisMesh.vertexSource != null);
+        if (haveColors)
+          for (int i = thisMesh.vertexCount; --i >= 0;)
+            if (thisMesh.vertexSource[i] < 0) {
+              haveColors = false;
+              break;
+            }
+        if (!haveColors) {
+          int[] source = thisMesh.vertexSource;
+          short[] vertexColixes = thisMesh.vertexColixes;
           short colix = (!thisMesh.isColorSolid ? 0 : thisMesh.colix);
           setProperty("init", null, null);
           setProperty("map", Boolean.FALSE, null);
           setProperty("property", new float[viewer.getAtomCount()], null);
-          if (colix != 0) {
-            thisMesh.colorCommand = "color isosurface "
-                + C.getHexCode(colix);
-            setProperty("color", Integer.valueOf(C.getArgb(colix)), null);
+          if (source == null) {
+            if (colix != 0) {
+              thisMesh.colorCommand = "color isosurface "
+                  + C.getHexCode(colix);
+              setProperty("color", Integer.valueOf(C.getArgb(colix)), null);
+            }                      
+          } else {
+            for (int i = thisMesh.vertexCount; --i >= 0;)
+              if (source[i] < 0)
+                source[i] = thisMesh.vertexSource[i];
+            thisMesh.vertexSource = source;
+            thisMesh.vertexColixes = vertexColixes;
           }
         }
         thisMesh.colorAtoms(C.getColixO(value), bs);

Modified: trunk/Jmol/src/org/jmol/shapesurface/IsosurfaceMesh.java
===================================================================
--- trunk/Jmol/src/org/jmol/shapesurface/IsosurfaceMesh.java    2013-06-08 
12:30:13 UTC (rev 18314)
+++ trunk/Jmol/src/org/jmol/shapesurface/IsosurfaceMesh.java    2013-06-08 
12:30:43 UTC (rev 18315)
@@ -528,7 +528,10 @@
     // TODO: color translucency?
     if (isAtoms)
       for (int i = 0; i < vertexCount; i++) {
-        if (bs.get(vertexSource[i])) {
+        int pt = vertexSource[i]; 
+        if (pt < 0)
+          continue;
+        if (bs.get(pt)) {
           vertexColixes[i] = colix;
           bsVertices.set(i);
         }
@@ -657,27 +660,30 @@
       meshColix = C.getColixS(jvxlData.meshColor);
     setJvxlDataRendering();
 
-    isColorSolid = !jvxlData.isBicolorMap && jvxlData.vertexColors == null;
+    isColorSolid = !jvxlData.isBicolorMap && jvxlData.vertexColors == null
+        && jvxlData.vertexColorMap == null;
     if (colorEncoder != null) {
       // bicolor map will be taken care of with params.isBicolorMap
-      if (jvxlData.colorScheme != null) {
-        String colorScheme = jvxlData.colorScheme;
-        boolean isTranslucent = colorScheme.startsWith("translucent ");
-        if (isTranslucent)
-          colorScheme = colorScheme.substring(12);
-        colorEncoder.setColorScheme(colorScheme, isTranslucent);
-        remapColors(null, null, Float.NaN);
-      }
-      if (jvxlData.vertexColorMap != null)
-        for (Map.Entry<String, BS> entry : jvxlData.vertexColorMap
-            .entrySet()) {
+      if (jvxlData.vertexColorMap == null) {
+        if (jvxlData.colorScheme != null) {
+          String colorScheme = jvxlData.colorScheme;
+          boolean isTranslucent = colorScheme.startsWith("translucent ");
+          if (isTranslucent)
+            colorScheme = colorScheme.substring(12);
+          colorEncoder.setColorScheme(colorScheme, isTranslucent);
+          remapColors(null, null, Float.NaN);
+        }
+      } else {
+        for (Map.Entry<String, BS> entry : jvxlData.vertexColorMap.entrySet()) 
{
           BS bsMap = entry.getValue();
-          short colix = C.copyColixTranslucency(this.colix, C
-              .getColixS(entry.getKey()));
+          short colix = C.copyColixTranslucency(this.colix, C.getColixS(entry
+              .getKey()));
           for (int i = bsMap.nextSetBit(0); i >= 0; i = bsMap.nextSetBit(i + 
1))
             vertexColixes[i] = colix;
         }
-    }    
+      }
+    }
+
   }
 
   void setJvxlDataRendering() {

Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties
===================================================================
--- trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2013-06-08 12:30:13 UTC 
(rev 18314)
+++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties      2013-06-08 12:30:43 UTC 
(rev 18315)
@@ -14,7 +14,8 @@
 TODO: PyMOL EDM data saved from PyMOL 1.6? 
 TODO: PyMOL uniqueAtomSettings for mesh_color, surface_color, and transparency
         -- color isosurface {xxxx} red translucent 0.5  ??
- 
+
+bug fix: jvxl reader ignores jvxlVertexColorData 
 bug fix: ellipsoid rendering problems
 
 new feature: set translucent

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Jmol-commits mailing list
Jmol-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-commits

Reply via email to