View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006482ParaView(No Category)public2008-02-29 16:102008-04-15 12:49
ReporterRobert Maynard 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformApple MacOSOS XOS Version10.4.10
Product Version 
Target VersionFixed in Version 
Summary0006482: Python Servermanager mulitple source objects with same name
Descriptionif a user names two or more pipeline objects with the same name, the source proxies group will overwrite the dictonary entry.

The solution seems to be is to before adding an entry to the source dict, first make sure that will not clobber an existing name, and if so rename the source entry.

This problem does not happen in the representations as they are automatically named.
Steps To ReproduceLoad same file twice into paraview
Open up Python Shell

pxm = servermanager.ProxyManager()
source = pxm.GetProxiesInGroup('sources')
rep = pxm.GetProxiesInGroup('representations')

print len(source), len(rep) #should print 1 2
TagsNo tags attached.
Project
Topic Name
Type
Attached Files

 Relationships

  Notes
(0010671)
Robert Maynard (developer)
2008-02-29 17:14

I was able to add a work around to MIRARCO's own version by changing the GetProxiesInGroup method inside the servermanager.py to the following code. It is a little rough and the string join should be used rather then the + method but it works so far in testing

    def GetProxiesInGroup(self, groupname, connection=None):
        """Returns a map of proxies in a particular group.
         If connection is not None, then only those proxies
         in the group that are on the particular connection
         are returned.
        """
        proxies = {}
        iter = self.NewGroupIterator(groupname)
        for aProxy in iter:
            temp = iter.GetKey()
            name = temp
            counter = 1
            while name in proxies:
                name = temp +'_' +str(counter)
                counter+=1
            proxies[name] = aProxy;
        return proxies
(0011336)
Berk Geveci (administrator)
2008-04-15 12:49

This is not true. The proxy manager dictionary uses the proxy id as well as the name in the key. Use vtkSMProxyManager::GetProxies() when there are multiple proxies with the same name.

 Issue History
Date Modified Username Field Change
2008-02-29 16:10 Robert Maynard New Issue
2008-02-29 17:14 Robert Maynard Note Added: 0010671
2008-04-15 12:49 Berk Geveci Status backlog => closed
2008-04-15 12:49 Berk Geveci Note Added: 0011336
2008-04-15 12:49 Berk Geveci Resolution open => no change required
2011-06-16 13:10 Zack Galbreath Category => (No Category)


Copyright © 2000 - 2018 MantisBT Team