<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7600.16912"></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Segoe UI">
<DIV>Hi Sonja,</DIV>
<DIV>I struggled to get a texture applied through python for quite a while and I finally got it working with a plane source in 3.12. I never tried it with a TextureMapToSphere object but I don't see why it wouldn't work the same way. This is how I did it, I hope it's helpful. </DIV>
<DIV> </DIV>
<DIV>from paraview import servermanager</DIV>Plane1 = Plane()<BR>Plane1.Origin = Org<BR>Plane1.Point1 = PlaneX<BR>Plane1.Point2 = PlaneY<BR>Plane1.UpdatePipeline()
<DIV>Render()<BR>SetActiveSource(Plane1)<BR>PlaneRep= GetDisplayProperties(Plane1)<BR>PlaneRep.Representation = 'Surface'<BR>texProxy = servermanager.CreateProxy("textures","ImageTexture")<BR>texProxy .GetProperty("FileName").SetElement(0, pathToTextureImage)<BR>texProxy .UpdateVTKObjects()<BR>PlaneRep.Texture=texProxy <BR>Plane1.UpdateVTKObjects()<BR>Render()</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>>Hi,<BR>><BR>>I'm still trying to get texture on a sphere animated over time. My new approach is to start a trace and see what happens when I change the texture in the Display dialog >(with the intention to generate a python script which does this automatically for all of my timesteps). Unfortunately, the texture is not specified in the trace...<BR>><BR>>try: paraview.simple<BR>>except: from paraview.simple import *<BR>>paraview.simple._DisableFirstRenderCameraReset()<BR>><BR>>TextureMaptoSphere3 = GetActiveSource()<BR>>DataRepresentation8 = GetDisplayProperties(TextureMaptoSphere3)<BR>>DataRepresentation8.Texture = []<BR>><BR>>Render()<BR>><BR>><BR>><BR>><BR>>Any ideas how I can specify a texture out of a jpeg in a python script?<BR>><BR>>Thanks for your help!<BR>>Sonja<BR></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face="Segoe UI Semibold">Ryan Danks, B.A.Sc., E.I.T.</FONT></DIV>
<DIV><FONT face="Segoe UI Semibold">Project Coordinator</FONT></DIV>
<DIV><FONT face="Segoe UI Semibold">Rowan, Williams Davies & Irwin Inc. (RWDI)</FONT></DIV>
<DIV><FONT face="Segoe UI Semibold">Consulting Engineers & Scientists</FONT></DIV>
<DIV><FONT face="Segoe UI Semibold"></FONT> </DIV>
<DIV><FONT face="Segoe UI Semibold">650 Woodlawn Road West</FONT></DIV>
<DIV><FONT face="Segoe UI Semibold">Guelph, Ontario, Canada N1K 1B8</FONT></DIV>
<DIV><FONT face="Segoe UI Semibold">T (519) 823-1311 x 2282</FONT></DIV>
<DIV><FONT face="Segoe UI Semibold">F (519) 823-1316</FONT></DIV>
<DIV><FONT face="Segoe UI Semibold">email: </FONT><A href="mailto:ryan.danks@RWDI.com"><FONT face="Segoe UI Semibold">ryan.danks@RWDI.com</FONT></A></DIV>
<DIV><FONT face="Segoe UI Semibold">web: </FONT><A href="http://www.rwdi.com/"><FONT face="Segoe UI Semibold">www.rwdi.com</FONT></A></DIV><p>
RWDI - One of Canada's 50 Best Managed Companies
www.rwdi.com/50_best/
This communication is intended for the sole use of the party to whom it was addressed and may contain information that is privileged and/or confidential. Any other distribution, copying or disclosure is strictly prohibited. If you received this email in error, please notify us immediately by replying to this email and delete the message without retaining any hard or electronic copies of same.
Outgoing emails are scanned for viruses, but no warranty is made to their absence in this email or attachments.<p>
</BODY></HTML>