Hi Sebastien,<br><br>Thanks for your reply. I tried this and it is working.<br><br>Would like to know if there is any way to get this done in Custom applications (like in my case), without changing ParaView code or paraview related files.<br>
<br>Thanks,<br>Pandu.<br>
<br><div class="gmail_quote">On Mon, Oct 1, 2012 at 12:49 PM, Sebastien Jourdain <span dir="ltr">&lt;<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Pandu,<br>
<br>
another way to see that is to change the default definition of the<br>
camera proxy in the file:<br>
<br>
src/ParaViewCore/ServerManager/SMApplication/Resources/rendering.xml<br>
<br>
And replace<br>
<br>
&lt;IntVectorProperty command=&quot;SetParallelProjection&quot;<br>
                         default_values=&quot;0&quot;<br>
                         ignore_synchronization=&quot;1&quot;<br>
                         name=&quot;CameraParallelProjection&quot;<br>
                         number_of_elements=&quot;1&quot;&gt;<br>
        &lt;BooleanDomain name=&quot;bool&quot; /&gt;<br>
      &lt;/IntVectorProperty&gt;<br>
<br>
By that<br>
<br>
&lt;IntVectorProperty command=&quot;SetParallelProjection&quot;<br>
                         default_values=&quot;1&quot;<br>
                         ignore_synchronization=&quot;1&quot;<br>
                         name=&quot;CameraParallelProjection&quot;<br>
                         number_of_elements=&quot;1&quot;&gt;<br>
        &lt;BooleanDomain name=&quot;bool&quot; /&gt;<br>
      &lt;/IntVectorProperty&gt;<br>
<br>
Seb<br>
<div><div><br>
On Mon, Oct 1, 2012 at 7:23 AM, Pandu tech &lt;<a href="mailto:pandu4tech@gmail.com" target="_blank">pandu4tech@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; Please let me know if you have any suggestions in this regard.<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Pandu<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Sep 27, 2012 at 9:41 AM, Pandu tech &lt;<a href="mailto:pandu4tech@gmail.com" target="_blank">pandu4tech@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt;<br>
&gt;&gt; In my application, I would like to set 3D render view &quot;Use Parallel<br>
&gt;&gt; Projection&quot; option to checked by default. I understood that<br>
&gt;&gt; &quot;CameraParallelProjection&quot; is the property associated with this.<br>
&gt;&gt;<br>
&gt;&gt; I tried to modify the settings.ini file created by pqSettings class. I<br>
&gt;&gt; tried the following in myMainWindow.cxx file:<br>
&gt;&gt;<br>
&gt;&gt; code:--<br>
&gt;&gt; //creating a new settings file if not exists<br>
&gt;&gt;   QString settingsRoot;<br>
&gt;&gt; #if defined(Q_OS_WIN)<br>
&gt;&gt;   settingsRoot = QString::fromLocal8Bit(getenv(&quot;APPDATA&quot;));<br>
&gt;&gt; #else<br>
&gt;&gt;   settingsRoot = QString::fromLocal8Bit(getenv(&quot;HOME&quot;)) +<br>
&gt;&gt;                  QDir::separator() + QString::fromLocal8Bit(&quot;.config&quot;);<br>
&gt;&gt; #endif<br>
&gt;&gt;   QString settingsPath = QString(&quot;%2%1%3&quot;);<br>
&gt;&gt;   settingsPath = settingsPath.arg(QDir::separator());<br>
&gt;&gt;   settingsPath = settingsPath.arg(settingsRoot);<br>
&gt;&gt;   settingsPath = settingsPath.arg(QApplication::organizationName());<br>
&gt;&gt;<br>
&gt;&gt;   QString filename = settingsPath.append(&quot;/&quot;<br>
&gt;&gt; +QApplication::applicationName() +<br>
&gt;&gt; QApplication::applicationVersion()+&quot;.ini&quot;);<br>
&gt;&gt;<br>
&gt;&gt;   QSettings *settings = 0;<br>
&gt;&gt;   QFile file;<br>
&gt;&gt;   if(!file.exists(filename))<br>
&gt;&gt;   {<br>
&gt;&gt;       settings = new QSettings(QSettings::IniFormat,QSettings::UserScope,<br>
&gt;&gt;<br>
&gt;&gt; QApplication::organizationName(),<br>
&gt;&gt;                                           QApplication::applicationName()<br>
&gt;&gt; + QApplication::applicationVersion(), this);<br>
&gt;&gt;<br>
&gt;&gt;       settings-&gt;beginGroup(&quot;renderModule&quot;);<br>
&gt;&gt;       settings-&gt;setValue(&quot;CameraParallelProjection&quot;, 1); // setting value<br>
&gt;&gt; to 1<br>
&gt;&gt;       settings-&gt;endGroup();<br>
&gt;&gt;       settings-&gt;sync();<br>
&gt;&gt;   }<br>
&gt;&gt;<br>
&gt;&gt; Using this code, I am able to create .ini file with<br>
&gt;&gt; CameraParallelProjection value set to 1. But for the first time, when I run<br>
&gt;&gt; my application, UseParallelProjection is not checked.<br>
&gt;&gt;<br>
&gt;&gt; Whenever I switch b/w views or restart the application once again, because<br>
&gt;&gt; .ini file already present, then I can see UseParallelProjection option<br>
&gt;&gt; checked.<br>
&gt;&gt;<br>
&gt;&gt; How can I set UseParallelProjection option to be checked even in the first<br>
&gt;&gt; time? Please let me know if there is any better approach regarding this.<br>
&gt;&gt;<br>
&gt;&gt; Truly appreciate your help reg. this.<br>
&gt;&gt;<br>
&gt;&gt; Thanks,<br>
&gt;&gt; Pandu.<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Paraview-developers mailing list<br>
&gt; <a href="mailto:Paraview-developers@paraview.org" target="_blank">Paraview-developers@paraview.org</a><br>
&gt; <a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
&gt;<br>
</blockquote></div><br>