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?
 
points transformation by script commands

points transformation by script commands

2004-04-08       - By Raffaele "ThE_JacO" Fragapane

 Back
Reply:     1     2     3     4     5     6     7     8     9     10  

Once you are done manipulating the aindices array all you need to do is

oGeom.Points.PositionArray = aPositions



and that will force the new array (the one with your manipulation in it)
into the object’s geometry, doing effectively what you wanted to do.



Again you only have to be careful that the object is frozen, or trying to
write into the position array will result in an illegal operation.

Good luck :)



                   -~== Raffaele Fragapane ==~-
       -~== Freelance Technical Animator & TD ==~-
-~== Senior Technical Animator @ Peerless Camera ==~-

- Currently London Based
- +44 798 4955734

  __ __  

From: owner-xsi@(protected) [mailto:owner-xsi@(protected)] On Behalf Of
Patrick Vier
Sent: Thursday, April 08, 2004 6:15 PM
To: XSI@(protected)
Subject: Re: points transformation by script commands



Raffaele,



Great, i can get the positions on each points inside the "for next" loop.

My goal is to modify the positions of the points.

An exemple :

- some points position can be 10.05897423 or 5.693145 or 7.00026

- my goal is to modify their position like this : 10.05 or 5.69 or 7.00

- have a choice to keep 2 (ie) number after the dot...



with your help i've made that, but I don't know how to modify the posXYZ of
the point.

-- ---- ---- ---- ---- ---- --

set oRoot = application.activeproject.activescene.root
set oSelection = Application.Selection
set oPoints=oSelection(0)



ApresLaVirgule = InputBox ("Nbs de chiffre apès la virgule :","XSI
Script","2")
If ApresLaVirgule <> "" then



if oPoints.Type = ".....

.................oPoints.SubElements



           for i = LBound( aIndices, 1 ) to UBound( aIndices, 1 )
                   ii = aIndices(i)
                     for axis=0 to 2

                           pos = aPositions(axis,ii)
                           LaVirgule=inStr(1,pos,".",0)                    
                           aPositions(axis,ii) = left(pos,ApresLaVirgule +
LaVirgule)

                      Next

....

-- ---- ---- ---- ---- ---- --



Hope that i'm clear



Thank

Patrick


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.638 / Virus Database: 409 - Release Date: 21-Mar-04 (See http://Mar-04.ora-code.com)



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.638 / Virus Database: 409 - Release Date: 21-Mar-04 (See http://Mar-04.ora-code.com)



<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft
-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http:
//www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1">


<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<base href="file:///C:\Documents%20and%20Settings\PL\Local%20Settings\ppalettre
\">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Post_Logic - Mail paper</title>
<style>
<!--
/* Font Definitions */
@(protected)
  {font-family:Tahoma;
  panose-1 (See http://ose-1.ora-code.com):2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
  {margin:0cm;
  margin-bottom:.0001pt;
  font-size:12.0pt;
  font-family:"Times New Roman";
  color:#000033;}
a:link, span.MsoHyperlink
  {color:#000033;
  text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
  {color:blue;
  text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
  {margin:0cm;
  margin-bottom:.0001pt;
  font-size:10.0pt;
  font-family:"Courier New";
  color:windowtext;}
p
  {mso-margin-top-alt:auto;
  margin-right:0cm;
  mso-margin-bottom-alt:auto;
  margin-left:0cm;
  font-size:12.0pt;
  font-family:"Times New Roman";
  color:#000033;}
span.EmailStyle19
  {mso-style-type:personal;
  font-family:Arial;
  color:navy;}
span.EmailStyle21
  {mso-style-type:personal-reply;
  font-family:Arial;
  color:navy;}
@(protected) Section1
  {size:612.0pt 792.0pt;
  margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
  {page:Section1;}
-->
</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]-->
</head>

<body bgcolor=white lang=EN-US link="#000033" vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Once you are done manipulating the
aindices array all you need to do is<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>oGeom.Points.PositionArray = aPositions<o
:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>and that will force the new array (the one
with your manipulation in it) into the object&#8217;s geometry, doing
effectively
what you wanted to do.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Again you only have to be careful that the
object is frozen, or trying to write into the position array will result in an
illegal operation.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Good luck :)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p><font size=2 color="#000033" face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-~== Raffaele Fragapane ==~-</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-~== Freelance Technical Animator &amp; TD ==~-</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>-~==
Senior Technical Animator @ Peerless Camera ==~-</span></font> <o:p></o:p></p>

<p><font size=2 color="#000033" face=Arial><span lang=IT style='font-size:10
.0pt;
font-family:Arial'>- Currently London Based</span></font> <br>
<font size=2 face=Arial><span lang=IT style='font-size:10.0pt;font-family:Arial
'>-
+44 798 4955734</span></font><span lang=IT> </span><o:p></o:p></p>

</div>

<div>

<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'>
<font
size=3 color=black face="Times New Roman"><span style='font-size:12.0pt;
color:windowtext'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal style='margin-left:36.0pt'><b><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:windowtext;
font-weight:bold'>From:</span></font></b><font size=2 color=black face=Tahoma>
<span
style='font-size:10.0pt;font-family:Tahoma;color:windowtext'>
owner-xsi@(protected) [mailto:owner-xsi@(protected)] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Patrick Vier<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, April 08, 2004
6:15 PM<br>
<b><span style='font-weight:bold'>To:</span></b> XSI@(protected)<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: points transformation
by script commands</span></font><font color=black><span style='color:windowtext
'><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3 color="#000033"
face="Times New Roman"><span style='font-size:12.0pt'><o:p>&nbsp;</o:p></span><
/font></p>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'
>Raffaele,</span></font><font
color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>&nbsp;<o
:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'
>Great,
i can get the positions on each points inside the &quot;for next&quot; loop.<
/span></font><font
color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'>My
goal is to modify the positions of the points.</span></font><font color=black>
<span
style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'>An
exemple :</span></font><font color=black><span style='color:windowtext'><o:p><
/o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'>-
some points position can be 10.05897423 or 5.693145 or 7.00026</span></font>
<font
color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'>-
my goal is to modify their position like this : 10.05 or 5.69 or 7.00</span><
/font><font
color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'>-
have a choice to keep 2 (ie) number after the dot...</span></font><font
color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>&nbsp;<o
:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'
>with
your help i've made that, but I don't know how to modify the posXYZ of the
point.</span></font><font color=black><span style='color:windowtext'><o:p></o:p
></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'>--
-- ---- ---- ---- ---- -----</span></font><font
color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'>set
oRoot = application.activeproject.activescene.root<br>
set oSelection = Application.Selection<br>
set oPoints=oSelection(0)</span></font><font color=black><span
style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>&nbsp;<o
:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><em><i><font size=2 color=blue
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'
>ApresLaVirgule
= InputBox (&quot;Nbs de chiffre apès la virgule :&quot;,&quot;XSI
Script&quot;,&quot;2&quot;)</span></font></i></em><i><font size=2 color=blue
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue;
font-style:italic'><br>
<em><i><font face=Arial><span style='font-family:Arial'>If ApresLaVirgule
&lt;&gt; &quot;&quot; then</span></font></i></em></span></font></i><font
color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>&nbsp;<o
:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'>
&nbsp;if
oPoints.Type = &quot;.....</span></font><font color=black><span
style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'>..
...............oPoints.SubElements</span></font><font
color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>&nbsp;<o
:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
for i = LBound( aIndices, 1 ) to UBound( aIndices, 1 )<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ii = aIndices(i)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span></font><em><i><font size=2
color=blue face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:blue'>for axis=0 to 2</span></font></i></em><font color=black><span
style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><em><i><font size=2 color=blue
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>&nbsp;
&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pos = aPositions(axis,ii)</span></font><
/i></em><i><font
size=2 color=blue face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:blue;font-style:italic'><br>
<em><i><font face=Arial><span style='font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
LaVirgule=inStr(1,pos,&quot;.&quot;,0)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<
/span></font></i></em><br>
<em><i><font face=Arial><span style='font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; aPositions(axis,ii) = left(pos,ApresLaVirgule + LaVirgule)<
/span></font></i></em></span></font></i><font
color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><em><i><font size=2 color=blue
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Next</span></font></i></em
><font
color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'>..
..</span></font><font
color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'>--
-- ---- ---- ---- ---- -----</span></font><font
color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>&nbsp;<o
:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'
>Hope
that i'm clear</span></font><font color=black><span style='color:windowtext'><o
:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>&nbsp;<o
:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=black
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:windowtext'
>Thank</span></font><font
color=black><span style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3 color="#000033"
face="Times New Roman"><span style='font-size:12.0pt'>Patrick <o:p></o:p></span
></font></p>

</div>

</div>

</body>

</html>
<BR>

<P><FONT SIZE=2>---<BR>
Incoming mail is certified Virus Free.<BR>
Checked by AVG anti-virus system (http://www.grisoft.com).<BR>
Version: 6.0.638 / Virus Database: 409 - Release Date: 21-Mar-04 (See http://Mar-04.ora-code.com)<BR>
</FONT> </P>

<P><FONT SIZE=2 FACE="Arial">   </FONT> </P><BR>

<P><FONT SIZE=2>---<BR>
Outgoing mail is certified Virus Free.<BR>
Checked by AVG anti-virus system (http://www.grisoft.com).<BR>
Version: 6.0.638 / Virus Database: 409 - Release Date: 21-Mar-04 (See http://Mar-04.ora-code.com)<BR>
</FONT> </P>