[Paraview-developers] Usage of ColorAttributeType in Python Soprocessing Script

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Sep 4 12:03:08 EDT 2015


Timo,

This merge request should fix this issue:

https://gitlab.kitware.com/paraview/paraview/merge_requests/354

Thanks for reporting the issue. I also checked to see if there are any
other references to POINT_DATA/CELL_DATA that need to be updated. I didn't
spot any.

Utkarsh

On Fri, Jun 5, 2015 at 8:54 AM, Utkarsh Ayachit <utkarsh.ayachit at kitware.com
> wrote:

> Thanks for pointing that out, Timo. I'll take a look.
>
> Utkarsh
>
> On Fri, Jun 5, 2015 at 5:15 AM Timo Oster <timo.oster at ovgu.de> wrote:
>
>> Hi ParaView Developers,
>>
>> I have noticed a problem with using scripts generated with the
>> coprocessing script exporter for rendering screen shots in-situ. The
>> script generator generates code for coloring surfaces like so:
>>
>>     slice1Display.ColorArrayName = ['POINTS', 'temperature']
>>
>> This is the 'new' way of specifying the coloring.
>>
>> When I add this script to a coprocessor that is executed during a
>> simulation, I will get an error that stems from this portion of code in
>> Wrapping/Python/paraview/coprocessing.py (line 381):
>>
>>     input = rep.Input
>>     input.UpdatePipeline(time) #make sure range is up-to-date
>>     lut = rep.LookupTable
>>     if rep.ColorAttributeType == 'POINT_DATA':
>>         datainformation = input.GetPointDataInformation()
>>     elif rep.ColorAttributeType == 'CELL_DATA':
>>         datainformation = input.GetCellDataInformation()
>>     else:
>>         print 'something strange with color attribute type',
>> rep.ColorAttributeType
>>
>> This portion of code still uses the 'old' way of using
>> ColorAttributeType and ColorArrayName, and, on top of that, still uses
>> POINT_DATA and CELL_DATA instead of POINTS and CELLS. The code following
>> this also uses ColorArrayName in the old way, assuming it is not a list.
>> If the usage of the old way here is intentional, then somewhere,
>> something that is supposed to ensure backwards compatibility is not
>> working correctly.
>>
>> The client I'm using for generating the script is the exact same
>> ParaView version as the server evaluating it.
>>
>> I have changed the code in coprocessing.py to use the new way, and
>> everything now seems to work correctly. However, there might be other
>> instances in the code that were missed when ColorArrayName was updated.
>> Perhaps somebody more experienced with the code might want to take a
>> look at this?
>>
>> Regards,
>>
>> Timo
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Search the list archives at:
>> http://markmail.org/search/?q=Paraview-developers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview-developers
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20150904/cd7fdee8/attachment.html>


More information about the Paraview-developers mailing list