Distributed rendering in programmable source

Hello!

We are trying to use distributed rendering with custom programmable sources.

Here is what we have right now:

pm = vtk.vtkProcessModule.GetProcessModule()
ppid = pm.GetPartitionId()
reader = vtk.vtkXMLPolyDataReader()
if ppid == 0: # master node
    reader.SetFileName(filename);
    reader.Update()

if pm.GetNumberOfLocalPartitions() == 1:  # local mode
    output.ShallowCopy(reader.GetOutput())
else:  # distributed mode
    dd = vtk.vtkDistributedDataFilter()
    ug = vtk.vtkUnstructuredGrid()

    if ppid == 0:  # master node
        dd.SetInputData(reader.GetOutput())
    else: # slave nodes
        dd.SetInputData(ug)   
    dd.Update()

    output.ShallowCopy(dd.GetOutput())

But the problem is that this code works only for unstructed grid datasets. When we read multiblock dataset using vtkXMLMultiBlockDataReader everything is placed on master node.

Could you please provide us with some examples?