return 0;
}
else if (aChangeArg == "-set"
- || aChangeArg == "-unset")
+ || aChangeArg == "-unset"
+ || aChangeArg == "-setoverrideglobal")
{
// set / unset plane command
- Standard_Boolean toSet = aChangeArg == "-set";
+ const Standard_Boolean toSet = aChangeArg.StartsWith ("-set");
+ const Standard_Boolean toOverrideGlobal = aChangeArg == "-setoverrideglobal";
Standard_Integer anIt = 1;
for (; anIt < aNbChangeArgs; ++anIt)
{
{
break;
}
- else if (ViewerTest_myViews.IsBound1 (anEntityName))
+ else if (!toOverrideGlobal
+ && ViewerTest_myViews.IsBound1 (anEntityName))
{
Handle(V3d_View) aView = ViewerTest_myViews.Find1 (anEntityName);
if (toSet)
{
aIObj->RemoveClipPlane (aClipPlane);
}
+ if (!aIObj->ClipPlanes().IsNull())
+ {
+ aIObj->ClipPlanes()->SetOverrideGlobal (toOverrideGlobal);
+ }
}
else
{
theCommands.Add("vclipplane",
"vclipplane planeName [{0|1}]"
"\n\t\t: [-equation A B C D]"
- "\n\t\t: [-set|-unset [objects|views]]"
+ "\n\t\t: [-set|-unset|-setOverrideGlobal [objects|views]]"
"\n\t\t: [-maxPlanes]"
"\n\t\t: [-capping {0|1}]"
"\n\t\t: [-color R G B] [-hatch {on|off|ID}]"