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