How to use a setting defined in the ApplicationName-UserSettings.json on server side?

Hi all,

I’am using the PipelineSourceName property and want our users be able to specifiy a regex that can be used in the renaming process.

I was thinking about setting this regex in the user (or site) settings file but the problem is that this file is read only by the client when the renaming process occurs on the server.

How can i retrive on server side the setting i put in the user settings file?

I saw the DistributeSettings method of the vtkSMSettings class, but it is effective only for batch process…

Thanks in advance

Hi @guillaume_Peillex

  • A plugin can add a setting
  • A filter can use a setting to initialize a property
  • A filter can use the reader name mechanism and the property to position the registration name

hth

FYI @nicolas.vuaille

@mwestphal thanks for your answer.

Have you got some examples or doc explaining a bit more the process?

Thanks.

@mwestphal i added a setting through a plugin as done here: ThemysSettings · main · themys / ThemysServerPlugins · GitLab
This way i can see the settings in the EditSettings panel.
Now the question i have is how can i use this settings to initialize a property? As the settings file are read from the client, i suppose i should build a client only plugin that will read this settings and set it as a property through the source proxy?

Thanks in advance

That would be a classic filter in a plugin, but with a xml property like this:

          <DoubleVectorProperty default_values="1.0 1.0 1.0"
                                name="GridColor"
                                command="SetColor"
                                number_of_elements="3"
                                panel_widget="color_selector">
            <DoubleRangeDomain max="1 1 1" min="0 0 0" name="range" />
            <Documentation>Color used when coloring the grid wireframe</Documentation>
            <Hints>
              <PropertyLink group="settings" proxy="ColorPalette" property="ForegroundColor"
                unlink_if_modified="1" />
            </Hints>
          </DoubleVectorProperty>

@mwestphal if i understand well, i have to add this Property with its PropertyLink into my reader xml file.
Thus if i set the setting through the EditSettings panel, then this setting is “transmitted” to my reader object.
Am i right or dit i miss something?

Yes, that sounds right.

@mwestphal thanks a lot. It seems to be ok!