-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprint_something.xml
More file actions
46 lines (46 loc) · 3.2 KB
/
Copy pathprint_something.xml
File metadata and controls
46 lines (46 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version='1.0' encoding='UTF-8'?>
<ServerManagerConfiguration>
<ProxyGroup name="sources">
<SourceProxy class="vtkPythonProgrammableFilter" label="Print Something" name="Print Something">
<InputProperty command="SetInputConnection" name="Input">
<ProxyGroupDomain name="groups">
<Group name="sources"/>
<Group name="filters"/>
</ProxyGroupDomain>
</InputProperty>
<StringVectorProperty command="SetScript" default_values="try: print("hello, " + Name + ' ' + Surname) result = Int1 + Int2 print(str(Int1)+ ' + ' + str(Int2) + ' = ' + str(result)) available_colors = ["blue", "green", "yellow", "black"] print("You have chosen the color " + available_colors[Color_index]) if Bool: print("boolean variable is selected") else: print("boolean variable is unselected") except Exception as e: print("Some errors occurred!") print(e) " name="Script" number_of_elements="1" panel_visibility="advanced">
<Hints>
<Widget syntax="python" type="multi_line"/>
</Hints>
</StringVectorProperty>
<Property command="Modified" name="Refresh" panel_widget="command_button" width="5"/>
<Hints>
<ShowInMenu category="Printing Tools"/>
</Hints>
<StringVectorProperty command="SetParameter" default_values="YourName" initial_string="Name" label="Name" name="Name" number_of_elements="1" panel_visibility="default">
<Documentation>enter here your name</Documentation>
</StringVectorProperty>
<StringVectorProperty command="SetParameter" default_values="YourSurname" initial_string="Surname" label="Surname" name="Surname" number_of_elements="1" panel_visibility="default">
<Documentation>enter here your surname</Documentation>
</StringVectorProperty>
<IntVectorProperty command="SetParameter" default_values="3" initial_string="Int1" label="Int1" name="Int1" number_of_elements="1" panel_visibility="default">
<Documentation>just type an integer</Documentation>
</IntVectorProperty>
<IntVectorProperty command="SetParameter" default_values="1" initial_string="Color_index" label="Color" name="Color_index" number_of_elements="1" panel_visibility="default">
<Documentation>chose your color</Documentation>
<EnumerationDomain name="enum">
<Entry text="blue" value="0"/>
<Entry text="green" value="1"/>
<Entry text="yellow" value="2"/>
<Entry text="black" value="3"/>
</EnumerationDomain>
</IntVectorProperty>
<IntVectorProperty command="SetParameter" default_values="1" initial_string="Int2" label="Int2" name="Int2" number_of_elements="1" panel_visibility="default">
<IntRangeDomain max="14" min="0" name="Int2"/>
</IntVectorProperty>
<IntVectorProperty command="SetParameter" default_values="0" initial_string="Bool" label="Bool" name="Bool" number_of_elements="1" panel_visibility="advanced">
<BooleanDomain name="Bool"/>
</IntVectorProperty>
</SourceProxy>
</ProxyGroup>
</ServerManagerConfiguration>