[Paraview] TransformFilter from python

Jorge Mario Mazo jmm.mecanica at gmail.com
Fri Jan 16 12:34:45 EST 2009


Hi there

I'm having problems trying to use the TransforFilter, so far I can
transform objects
but when I create a filter from python and register the proxy, the
object inspenctor shows nothing

and I got this error "paraview Selected proxy value not in the list:  Transform"

then

I found this

http://markmail.org/message/rfd75oj74fk4u4v7

that is a similar problem, but that solution seems to crash paraview

this a test code

any help is very appreciated it

====================================================================
sph = servermanager.sources.vrmlreader(FileName="/Users/jmazo/Desktop/carRot.wrl")
#sph = servermanager.sources.vrmlreader(FileName=filenamefoo)
pm=servermanager.ProxyManager()
pm.RegisterProxy("sources", "mysource", sph)
view = pm.GetProxy("views", "RenderView1")
rep = servermanager.CreateRepresentation(sph, view)
pm.RegisterProxy("representations", "myrep1", rep)


transforms = servermanager.createModule("transforms")
transform = transforms.Transform()
#transform.Translate = [0, 0, 0]
#transform.Rotate = [3, 2, 11]
#transform.Scale = [1, 1, 10]


tf = servermanager.filters.TransformFilter(Input = sph, Transform = transform)

sourceProperty = tf.GetProperty("Transform")
domain = sourceProperty.GetDomain("proxy_list")
domain.AddProxy(sph.SMProxy)




#tf.Transform = transform
pm.RegisterProxy("sources", "TransformFilter", tf) <====== HERE when I
click on TransformFilter paraview just dies, (no messages)


repr = servermanager.CreateRepresentation(tf, view)
pm.RegisterProxy("representations", "myrep2", repr)
============================================================


More information about the ParaView mailing list