[Paraview-developers] filter default values and class constructor disconnect

Wylie, Brian bnwylie at sandia.gov
Wed, 17 Dec 2003 07:34:51 -0700


All,

It appears that the default values that are set in the xml descriptions
don't actually get 'synced' with the class.

For example the tube filter now has 6 sides as the default (see below), the
constructor for vtkTubeFilter sets number of sides to 3. The variable is
totally disconnected.... until you move the slider and hit accept. So the
default value in the xml description is not getting communicated to the
class until a change is made... obviously this is not good.


<Module name="TubeFilter" menu_name="Tube" root_name="Tuber"
module_type="Filter" long_help="Convert lines into tubes.  Normals are used
to avoid cracks between tube segments." short_help="Convert lines into
tubes.">
  <Filter class="vtkTubeFilter">
    <Input name="Input" class="vtkPolyData"/>
  </Filter>
  <InputMenu trace_name="Input" id="im" label="Input" help="Set the input to
this filter." input_name="Input"/>
  <Scale label="Num. sides" variable="NumberOfSides"
trace_name="NumberOfSides" help="Set the number of sides for the tube"
default_value="6" resolution="1" range="1 100"/>
  <LabeledToggle variable="Capping" trace_name="Capping" help="Select
whether to draw endcaps on the tube" default_value="0"/>
  <ScaleFactorEntry variable="Radius" input_menu="im" trace_name="Radius"
type="float" scale_factor="0.01" help="Set the radius of the tube" />
  <SelectionList label="Vary radius" trace_name="VaryRadius"
variable="VaryRadius" help="Select whether/how to vary the radius of the
tube" default_value="0">
    <Item name="Off" value="0"/>
    <Item name="ByScalar" value="1"/>
    <Item name="ByVector" value="2"/>
  </SelectionList>
<!-- RadiusFactor value chosen does not change processing speed of this
filter or cause it to crash. -->
  <VectorEntry label="Radius factor" trace_name="RadiusFactor"
variable="RadiusFactor" type="float" help="Set the maximum tube radius in
terms of a multiple of the minimum radius" default_value="10"/>
</Module>

	Brian Wylie
	Sandia National Laboratories
	MS 0822 - Org 9227 - Building 880/A1-J
     (505) 844-2238   FAX (505) 845-0833