<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I would start by reading "simple.py", <span style="font-family:
"Calibri","sans-serif"; color: rgb(79, 129,
189);">GetDisplayProperties or Show.</span> you should be able
translate the servermamager stuff to c++ fairly easily in a custom
panel.<br>
<br>
On 08/15/2012 01:48 PM, Phil Amburn wrote:
<blockquote cite="mid:502c0b25.e6de320a.58ae.ffffd209@mx.google.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);">Thanks, your suggested changes to the XML worked
and does exactly what I needed! Big help. Thanks.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);">You may be quite right, that it would be a hack
to get to the display properties. I’m trying to do
something in a C++ plugin similar to the following
statements in a python script<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);"><o:p> </o:p></span></p>
<p class="MsoNormal" style=""><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);">DataRepresentation850h = GetDisplayProperties
(Contour850p)<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);">DataRepresentation850h = Show()<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);">DataRepresentation850h.DiffuseColor = [0.,0.,0.]<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);">DataRepresentation850h.LineWidth = 2.<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);"><o:p> </o:p></span></p>
<p class="MsoNormal" style=""><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);">In addition to setting a solid color, as above,
I’m also wanting to set “Color by” and set that to another
of the scalars in the input data.<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);"><o:p> </o:p></span></p>
<p class="MsoNormal" style=""><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);">Any thoughts / recommendations?<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:
"Calibri","sans-serif"; color: rgb(79,
129, 189);">Phil<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family:
"Calibri","sans-serif"; color: rgb(31,
73, 125);"><o:p> </o:p></span></p>
<div>
<div style="border-right: medium none; border-width: 1pt
medium medium; border-style: solid none none; border-color:
rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;
padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span style="font-size: 10pt;
font-family:
"Tahoma","sans-serif"; color:
windowtext;">From:</span></b><span style="font-size:
10pt; font-family:
"Tahoma","sans-serif"; color:
windowtext;"> burlen [<a class="moz-txt-link-freetext" href="mailto:burlen.loring@gmail.com">mailto:burlen.loring@gmail.com</a>] <br>
<b>Sent:</b> Wednesday, August 15, 2012 10:51 AM<br>
<b>To:</b> Phil Amburn<br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:paraview-developers@paraview.org">paraview-developers@paraview.org</a><br>
<b>Subject:</b> Re: [Paraview-developers] c++ plugin;
viewing parameters and output names<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> you could name your outputs in the xml
code, add something similar to the following as suits your use
case<br>
<br>
<OutputPort name="Solar Wind" index="0" /><br>
<OutputPort name="Magnetosphere" index="1" /><br>
<OutputPort name="North Connected" index="2" /><br>
<OutputPort name="South Connected" index="3" /><br>
<OutputPort name="Null/Short Int." index="4" /><br>
<br>
I'm sure you could access the display properties in a custom
panel, however it might be very hackish to do so.<br>
<br>
On 08/13/2012 06:17 PM, Phil Amburn wrote: <o:p></o:p></p>
<pre>I hope this hasn't been submitted twice, but I sent email on Saturday and<o:p></o:p></pre>
<pre>haven't seen it in my mail, so I'm trying again.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>I'm working on a c++ plugin that is a filter that reads a vtkStructuredGrid<o:p></o:p></pre>
<pre>and generates 3 polygonal outputs. The environment I'm using is ParaView<o:p></o:p></pre>
<pre>3.10.1, MS Windows 7, and MS Visual Studio 2008.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>One of the outputs is a 3D contour surface of one of four scalars in the<o:p></o:p></pre>
<pre>vtkStructuredGrid input, and I'd like to be able to modify the "Color by"<o:p></o:p></pre>
<pre>setting in the Display panel from "Solid Color" to color by one of the other<o:p></o:p></pre>
<pre>scalars in the input. Easy to do through the GUI, but I'd like to do this<o:p></o:p></pre>
<pre>from within the plugin. <o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Is it possible to modify the "Color by" setting from within the plugin?<o:p></o:p></pre>
<pre>Can I get a list of the groups being maintained by the server manager? I<o:p></o:p></pre>
<pre>expect (hope) I'm interested in the groups and properties associated with<o:p></o:p></pre>
<pre>the display panel, and hope to be able to set them from within the plugin.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>I have another question. When this filter generates its three outputs, they<o:p></o:p></pre>
<pre>are named output-0, output-1, and output-2 in the Pipeline Browser. Can I<o:p></o:p></pre>
<pre>change those names to something more informative from within the plugin,<o:p></o:p></pre>
<pre>such as "constant pressure surface"?<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>I've attached the xml and cmake files I'm using along with C++ code.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Thanks, any help would be greatly appreciated.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Phil<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Paraview-developers mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://public.kitware.com/mailman/listinfo/paraview-developers">http://public.kitware.com/mailman/listinfo/paraview-developers</a><o:p></o:p></pre>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
<br>
</body>
</html>