<div dir="ltr">Anton,<br><br><div><span style="font-size:13.1999998092651px;line-height:19.7999992370605px">DiffuseCol</span><span style="font-size:13.1999998092651px;line-height:19.7999992370605px">or still exists. Can you post the full error message that you're getting? If you can share the dataset you're using to test this script, that'll be even better!</span><br></div><div><span style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></span></div><div><span style="font-size:13.1999998092651px;line-height:19.7999992370605px">Utkarsh</span></div><div><span style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></span></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 8, 2015 at 7:39 PM Anton Shterenlikht <<a href="mailto:mexas@bris.ac.uk">mexas@bris.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've a script that used to work ok on 4.0 and 4.1,<br>
but now something is wrong with the colours.<br>
Has anything changed between 4.0/4.1 to 4.3 to make<br>
<br>
DataRepresentation3.DiffuseColor = [1.0, 1.0, 0.0]<br>
<br>
not understood?<br>
<br>
<br>
The full script:<br>
<br>
######################################################################72<br>
# Adjust these parameters<br>
ext1    = 220         # data extent along 1<br>
ext2    = 220         # data extent along 2<br>
ext3    = 220        # data extent along 3<br>
ffile   = "zf5.raw" # fracture file<br>
gfile   = "zg0.raw"   # grain file<br>
imsize1 = 1000        # size, in pixels, of the resulting image along 1<br>
imsize2 = 1000        # size, in pixels, of the resulting image along 2<br>
<br>
# End of adjustable parameters<br>
######################################################################72<br>
<br>
# define the centre of rotation (cor)<br>
cor1 = 0.5 * ext1<br>
cor2 = 0.5 * ext2<br>
cor3 = 0.5 * ext3<br>
<br>
from paraview.simple import *<br>
<br>
# the extents start from zero, so need to lower<br>
# the upper extents by 1<br>
cracks = ImageReader( FilePrefix= ffile )<br>
cracks.DataExtent=[ 0, ext1-1, 0, ext2-1, 0, ext3-1 ]<br>
cracks.DataByteOrder = 'LittleEndian'<br>
cracks.DataScalarType = 'int'<br>
<br>
RenderView1 = GetRenderView()<br>
DataRepresentation1 = Show()<br>
<br>
DataRepresentation1.Representation = 'Outline'<br>
DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5]<br>
<br>
# grain boundaries, cell state 2<br>
<br>
Threshold1 = Threshold()<br>
Threshold1.Scalars = ['POINTS', 'ImageFile']<br>
Threshold1.ThresholdRange = [ 2, 2 ]<br>
Threshold1.AllScalars = 0<br>
<br>
DataRepresentation2 = Show()<br>
DataRepresentation2.ScalarOpacityUnitDistance = 1.0<br>
DataRepresentation2.SelectionPointFieldDataArrayName = 'ImageFile'<br>
DataRepresentation2.DiffuseColor = [ 1, 0, 1 ]<br>
<br>
camera = GetActiveCamera()<br>
camera.SetViewUp(-1,0,0)<br>
camera.Azimuth(30)<br>
camera.Elevation(30)<br>
<br>
RenderView1.ResetCamera()<br>
<br>
# gradient background colour<br>
RenderView1.UseGradientBackground = 1<br>
RenderView1.Background2 = [0.0, 0.0, 0.16470588235294117]<br>
RenderView1.Background = [0.3215686274509804, 0.3411764705882353, 0.43137254901960786]<br>
<br>
RenderView1.CenterAxesVisibility = 0<br>
RenderView1.OrientationAxesVisibility = 1<br>
RenderView1.CenterOfRotation = [ cor1, cor2, cor3 ]<br>
RenderView1.CameraFocalPoint = [ cor1, cor2, cor3 ]<br>
RenderView1.ViewSize = [ imsize1, imsize2 ]<br>
RenderView1.CameraViewAngle = 30<br>
<br>
# do all crack states from the main dataset<br>
SetActiveSource( cracks )<br>
<br>
# (100) cracks<br>
cracks100 = Threshold()<br>
cracks100.Scalars = ['POINTS', 'ImageFile']<br>
cracks100.ThresholdRange = [ 0, 0 ]<br>
cracks100.AllScalars = 0<br>
<br>
DataRepresentation3 = Show()<br>
DataRepresentation3.ScalarOpacityUnitDistance = 1.0<br>
DataRepresentation3.SelectionPointFieldDataArrayName = 'ImageFile'<br>
DataRepresentation3.DiffuseColor = [1.0, 1.0, 0.0]<br>
<br>
# (110) cracks<br>
SetActiveSource( cracks )<br>
cracks110 = Threshold()<br>
cracks110.Scalars = ['POINTS', 'ImageFile']<br>
cracks110.ThresholdRange = [ -1, -1 ]<br>
cracks110.AllScalars = 0<br>
<br>
DataRepresentation4 = Show()<br>
DataRepresentation4.ScalarOpacityUnitDistance = 1.0<br>
DataRepresentation4.SelectionPointFieldDataArrayName = 'ImageFile'<br>
DataRepresentation4.DiffuseColor = [0.0, 1.0, 0.5]<br>
<br>
# 1 is to show, 0 not to show<br>
# data2 is GB<br>
# data3 is cracks<br>
# data4 is grains microstructure<br>
<br>
DataRepresentation2.Opacity = 0.1<br>
WriteImage( "crgb.png" )<br>
<br>
DataRepresentation2.Opacity = 1<br>
DataRepresentation3.Visibility = 0<br>
WriteImage( "gb.png" )<br>
<br>
DataRepresentation2.Visibility = 0<br>
DataRepresentation3.Visibility = 1<br>
WriteImage( "cr.png" )<br>
<br>
RenderView1.ResetCamera()<br>
<br>
Render()<br>
<br>
<br>
****<br>
<br>
Is there anything wrong in this script for 4.3?<br>
<br>
Many thanks<br>
<br>
Anton<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
</blockquote></div>