[Paraview] Texture Coordinates in python calculator
David E DeMarle
dave.demarle at kitware.com
Tue Sep 27 09:57:24 EDT 2011
On Thu, Sep 22, 2011 at 2:32 PM, Felipe Bordeu
<felipe.bordeu at ec-nantes.fr> wrote:
> Hello,
>
> I'm trying to generater a Texture coordinates array using the position of my
> points.
> For this I used the python calculator with this formula, (With the Result
> Array Name: Texture Coordinates)
>
> coordsX/256*iHat+coordsY/1024*jHat
>
> the problem is that the python calculator keep putting an extra column in my
> data (like 0*kHat). In the information tab, I can see 3 components in my new
> field. So the Apply Texture is grey and I cant use it.
Is that a _python_ calculator expression or a normal calculator filter
expression?
It looks like the normal calculator to me and it may well be that you
can not create two component arrays with it. Additionally, it doesn't
have a way to mark the array as the active scalars. Just assigning the
name won't do it.
I recommend using the python filter instead and then calling
point_data.SetTCoords("nameofyourarray") instead.
good luck!
More information about the ParaView
mailing list