Skip to content

Python states can save selections

simple provides a new function to create a selection, in order to create selections in python that won't appear in the pipeline.

The trace can now call this function when meeting selections. However, when tracing nothing will call it. This is only used when saving state for now.

Fixes #21372 (closed)

Example of the new section generated in the Python state
# ----------------------------------------------------------------
# setup the selections
# ----------------------------------------------------------------

# create a new 'Frustum Selection Source'
selection_sources19876 = CreateSelection(proxyname='FrustumSelectionSource', registrationname='selection_sources.19876', Frustum=[-3.5370015433930493, -2.052000895403603, 20.569213042990253, 1.0, -7.094677881649682, -4.115996328285315, -26.05381956448536, 1.0, -3.5370015433930493, 3.02400131954215, 20.569213042990253, 1.0, -7.094677881649682, 6.065678799578356, -26.05381956448536, 1.0, -1.1610005066099325, -2.052000895403603, 20.569213042990253, 1.0, -2.32878739626669, -4.115996328285315, -26.05381956448536, 1.0, -1.1610005066099325, 3.02400131954215, 20.569213042990253, 1.0, -2.32878739626669, 6.065678799578356, -26.05381956448536, 1.0])

# create a new 'Append Selections'
selection_filter19921 = CreateSelection(proxyname='AppendSelections', registrationname='selection_filter.19921', Input=selection_sources19876,
    Expression='s0',
    SelectionNames=['s0'])

# ----------------------------------------------------------------
# setup the data processing pipelines
# ----------------------------------------------------------------

# create a new 'Spatio Temporal Harmonics Uniform Grid'
spatioTemporalHarmonicsUniformGrid1 = SpatioTemporalHarmonicsUniformGrid(registrationName='SpatioTemporalHarmonicsUniformGrid1')

# create a new 'Extract Selection'
extractSelection1 = ExtractSelection(registrationName='ExtractSelection1', Input=spatioTemporalHarmonicsUniformGrid1,
    Selection=selection_filter19921)
Edited by Charly Bollinger

Merge request reports