Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
toggle key .....

toggle key .....

2004-07-05       - By Rafe Sacks

 Back
Reply:     1     2     3     4     5  

Boolean values can always be switched using 1 - value. For example....

   oDisp = GetValue ("Views.ViewD.TopCamera.camdisp.statsel")

   bSwitch = 1 - oDisp;

   SetValue "*.camdisp.statsel"          , bSwitch
   SetValue "*.camdisp.statsel"          , bSwitch
   SetValue "*.camdisp.intsel"           , bSwitch
   SetValue "*.camdisp.playbacksel"      , bSwitch
   SetValue "*.camdisp.statunselnear"    , bSwitch
   SetValue "*.camdisp.intunselnear"     , bSwitch
   SetValue "*.camdisp.playbackunselnear", bSwitch


   if bSwitch then
       SetDisplayMode "Views.*.*", "shaded"
   Else
       SetDisplayMode "Views.*.*", "wireframe"
   End if




These means alot less double code. It works like this...

true  = 1
false = 0

1 - 0 = 1
1 - 1 = 0

P.S. Been a while since I have used VBS, hope this is right. There are
probably better ways to do this.. object model etc, I am just
illustrating the boolean point here.



*__ ____ ____ ____ ____ ____ _____
*R A F E   S A C K S*
*C h a r a c t e r   D e p a r t m e n t
A n i m a l   L o g i c



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 <meta content="text/html;charset=ISO-8859 (See http://ISO-8859.ora-code.com)-1" http-equiv="Content-Type">
 <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<small><font color="#000099" face="Helvetica, Arial, sans-serif">Boolean
values can always be switched using 1 - value. For example....</font></small>
<br>
<br>
<blockquote>
 <p class="MsoNormal" style=""><span class="SpellE"><span class="GramE"><font
size="2" color="black"><span
style="font-size: 10pt; font-family: Courier; color: windowtext;"></span><
/font></span></span><font
size="2" color="black"><span
style="font-size: 10pt; font-family: Courier; color: windowtext;"></span><
/font><tt>oDisp
= GetValue ("Views.ViewD.TopCamera.camdisp.statsel")<br>
 <br>
bSwitch = 1 - oDisp;<br>
 <br>
SetValue "*.camdisp.statsel"&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; , </tt
><tt>bSwitch </tt><br>
 <tt>SetValue "*.camdisp.statsel"&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
, </tt><tt>bSwitch </tt><br>
 <tt>SetValue "*.camdisp.intsel"&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
&nbsp; , </tt><tt>bSwitch </tt><br>
 <tt>SetValue "*.camdisp.playbacksel"&nbsp;&nbsp;&nbsp; &nbsp; , </tt><tt
>bSwitch </tt><br>
 <tt>SetValue "*.camdisp.statunselnear"&nbsp;&nbsp;&nbsp; , </tt><tt>bSwitch <
/tt><br>
 <tt>SetValue "*.camdisp.intunselnear"&nbsp;&nbsp;&nbsp;&nbsp; , </tt><tt
>bSwitch </tt><br>
 <tt>SetValue "*.camdisp.playbackunselnear", </tt><tt>bSwitch </tt><br>
 <tt><br>
 <br>
if </tt><tt>bSwitch </tt><tt>then<br>
&nbsp;&nbsp;&nbsp; SetDisplayMode "Views.*.*", "shaded"<br>
Else<br>
&nbsp;&nbsp;&nbsp; SetDisplayMode "Views.*.*", "wireframe"<br>
End if</tt><br>
 </p>
</blockquote>
<br>
<br>
<br>
<small><font color="#000099" face="Helvetica, Arial, sans-serif">These
means alot less double code. It works like this...<br>
<br>
</font><big><font color="#000099"><tt>true&nbsp; = 1<br>
false = 0<br>
<br>
1 - 0 = 1<br>
1 - 1 = 0<br>
<br>
P.S. Been a while since I have used VBS, hope this is right. There are
probably better ways to do this.. object model etc, I am just
illustrating the boolean point here.<br>
<br>
<br>
<br>
</tt></font></big></small>
<pre wrap=""><small><b><font face="Century Gothic"><font color="#000066"><font
color="#000066"><font color="#c0c0c0">__ ____ ____ ____ ____ ____ _____</font>
</font></font></font></b><font face="Century Gothic"><font
color="#000066"><small><small><font color="#666666"><big><font
color="#000066"><big><big>R</big></big> <big>A F E </big>  <big><big>S</big><
/big> <big>A C K S</big></font></big></font></small></small></font></font><
/small><b><small><font
face="Century Gothic"><small><font color="#999999">
</font></small></font></small></b><font color="#999999"><small><font
face="Century Gothic"><small>C h a r a c t e r   D e p a r t m e n t
</small></font></small></font><small><font color="#000066"><big><small><font
face="Century Gothic"><small>A n i m a l   L o g i c</small></font></small><
/big></font></small></pre>
<br>
</body>
</html>