Set property server side to retrieve from client using vtkSMPropertyHelper

Apologies if this is the wrong place to ask, I didn’t find a solution to my problem in other sources. I’m not very experienced with Paraview, but more so with VTK. I’m using Paraview 5.11, built from source, on Arch Linux.

I have an issue where my pvserver (with a custom plugin) has a source with a proxy property that can be set either algorithmically by the server, or manually by the user from the client.

The xml for the plugin contains the following, by analogy from here:


      This property can be used to read only every inc-th pixel along the dimensions of the image.

This works perfectly fine if the client side is setting the value, e.g.:

//Set ScaleFactor using the user's choice if not autoscaled
if (!useAutoScale)
    vtkSMPropertyHelper(src->getProxy(), "ScaleFactor").Set(client_choice_num);
//time passes
//Retrieve ScaleFactor
int scaleFac;
vtkSMPropertyHelper(src->getProxy(), "ScaleFactor").Get(&scaleFac);
//use the retrieved ScaleFactor on the client side

However, when this property is set algorithmically by the server, the reading step does not work. E.g., on the custom plugin side, with the header and class as follows:


class VTK_EXPORT myCustomReader : public vtkMPIImageReader
    vtkGetMacro(ScaleFactor, int);
    vtkSetMacro(ScaleFactor, int);
     * @brief This property can be used to read only every inc-th pixel along the
     * dimensions of the image.
    int ScaleFactor;

    //if the image should be scaled automatically
    if (AutoScale){
        int sf = calcScaleFactor(size, limit);
    vtkDebugMacro(<< "Scale factor: " << this->GetScaleFactor())

The server’s debug output gives me the correct and expected value of sf, and the rendering behaviour is as expected. However, the value retrieved using the vtkSMPropertyHelper does not match and is only the default 1. Again, it works perfectly if it is first set from the client side and then retrieved.

I would like to know why setting the property value on the server side does not allow for retrieval by the client, and if there is a way to do it without moving the calculation to the client side.

Thank you in advance.