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  

You want to get the selection, the object the selection is on and then get
the activeprimitive.geometry of it.

>From that you can get the points.positionarray, manipulate the array, and
then store the manipulated array back in the positionarray.



Should be said tho that you can only manipulate the positionarray in a
script if the object is frozen, if you need to keep the operators you’ll
have to write a scop to do the same job, with the undertow that SCOPs
manipulating partial selections of points need a cluster to relate to those
points (or the pointIDs hardcoded in a loop).



Here’s an example



set oRoot = application.activeproject.activescene.root

set oSelection = Application.Selection

set oPoints=oSelection(0)



if oPoints.Type = "pntSubComponent" Then



           set oObj = oRoot.FindChild(oPoints.Name)          

           set oGeom = oObj.ActivePrimitive.Geometry

           ArrPoints = oPoints.SubElements

           aPositions = oGeom.Points.PositionArray

           aIndices = oPoints.SubElements

           

           for i = LBound( aIndices, 1 ) to UBound( aIndices, 1 )

                       ii = aIndices(i)

                       

                       aPositions(0,ii) = aPositions(0,ii) +1

                       aPositions(1,ii) = aPositions(1,ii) +1

                       aPositions(2,ii) = aPositions(2,ii) +1

           next

           

           oGeom.Points.PositionArray = aPositions



end if



select points on a frozen object and run it, it will shift every point by
1,1,1



                   -~== 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 2:15 PM
To: Softimage - XSI list
Subject: points transformation by script commands




Hi all,

I select points on an object by tagging an d i need to GET (SRT info) and
SET to a new positions (SRT) on each points by script, of course.

Have you an suggestion ??
Thanks.

Patrick
*********





Patrick Vier
HYPERLINK "http://www.post-logic.com"Post Logic
tel 33 (0)1 46 37 77 61
fax 33 (0)1 46 37 55 51
email HYPERLINK "mailto:patrick@(protected)"patrick@(protected)







---
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=Windows-1252 (See http://ows-1252.ora-code.com)">


<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.EmailStyle18
  {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'>You want to get the selection, the object
the selection is on and then get the activeprimitive.geometry of it.<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'>From that you can get the
points.positionarray, manipulate the array, and then store the manipulated
array back in the positionarray.<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'>Should be said tho that you can only
manipulate the positionarray in a script if the object is frozen, if you need
to keep the operators you&#8217;ll have to write a scop to do the same job,
with the undertow that SCOPs manipulating partial selections of points need a
cluster to relate to those points (or the pointIDs hardcoded in a loop).<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'>Here&#8217;s an example<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'>set oRoot =
application.activeproject.activescene.root<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'>set oSelection = Application.Selection<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'>set oPoints=oSelection(0)<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'>if oPoints.Type =
&quot;pntSubComponent&quot; Then<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; set
oObj = oRoot.FindChild(oPoints.Name)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; <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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; set
oGeom = oObj.ActivePrimitive.Geometry<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; ArrPoints
= oPoints.SubElements<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; aPositions
= oGeom.Points.PositionArray<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; aIndices
= oPoints.SubElements<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; <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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; for
i = LBound( aIndices, 1 ) to UBound( aIndices, 1 )<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; ii
= aIndices(i) <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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; <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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; aPositions(0,ii)
= aPositions(0,ii) +1<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; aPositions(1,ii)
= aPositions(1,ii) +1<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; aPositions(2,ii)
= aPositions(2,ii) +1<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; next<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; <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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; 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'>end if<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'>select points on a frozen object and run
it, it will shift every point by 1,1,1<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
2:15 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Softimage - XSI list<br>
<b><span style='font-weight:bold'>Subject:</span></b> 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>

<table class=MsoNormalTable border=0 cellpadding=0 width=706 style='width:529
.5pt;
margin-left:36.0pt'>
<tr>
 <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
 <p><font size=2 color="#000033" face=Arial><span style='font-size:10.0pt;
 font-family:Arial'>Hi all,</span></font><o:p></o:p></p>
 <p><font size=2 color="#000033" face=Arial><span style='font-size:10.0pt;
 font-family:Arial'>I select points on an object by tagging an d i need to GET
 (SRT&nbsp;info) and SET&nbsp;to a new positions (SRT) on each points by
 script, of course.</span></font><o:p></o:p></p>
 <p><font size=2 color="#000033" face=Arial><span style='font-size:10.0pt;
 font-family:Arial'>Have you an suggestion ??<br>
 Thanks.</span></font><o:p></o:p></p>
 <p><font size=2 color="#000033" face=Arial><span style='font-size:10.0pt;
 font-family:Arial'>Patrick<br>
 *********</span></font><o:p></o:p></p>
 </td>
</tr>
<tr height=6 style='height:4.5pt'>
 <td height=6 style='padding:.75pt .75pt .75pt .75pt;height:4.5pt'>
 <p align=center style='text-align:center'><font size=3 color="#000033"
 face="Times New Roman"><span style='font-size:12.0pt'><img width=700
 height=1 id="_x0000_i1025" src="cid:image001.gif@(protected)"><o:p></o
:p></span></font></p>
 </td>
</tr>
<tr height=76 style='height:57.0pt'>
 <td height=76 style='padding:.75pt .75pt .75pt .75pt;height:57.0pt'>
 <p class=MsoNormal align=right style='text-align:right'><b><font size=2
 color="#0099ff" face=Arial><span style='font-size:10.0pt;font-family:Arial;
 color:#0099FF;font-weight:bold'>Patrick Vier<br>
 </span></font></b><b><font size=2 face=Arial><span style='font-size:10.0pt;
 font-family:Arial;font-weight:bold'><a href="http://www.post-logic.com">Post
 Logic</a></span></font></b><font size=2 face=Arial><span style='font-size:
 10.0pt;font-family:Arial'><br>
 tel <img border=0 width=13 height=13 id="_x0000_i1026"
 src="cid:image002.gif@(protected)">33 (0)1 46 37 77 61<br>
 fax <img border=0 width=13 height=13 id="_x0000_i1027"
 src="cid:image002.gif@(protected)">33 (0)1 46 37 55 51</span></font>
<font
 size=2 color="#0099ff" face=Arial><span style='font-size:10.0pt;font-family:
 Arial;color:#0099FF'><br>
 </span></font><font size=2 face=Arial><span style='font-size:10.0pt;
 font-family:Arial'>email</span></font><font size=2 color="#0099ff"
 face=Arial><span style='font-size:10.0pt;font-family:Arial;color:#0099FF'> <
/span></font><font
 size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><img
 border=0 width=13 height=13 id="_x0000_i1028"
 src="cid:image002.gif@(protected)"></span></font><b><font size=2
 color="#0099ff" face=Arial><span style='font-size:10.0pt;font-family:Arial;
 color:#0099FF;font-weight:bold'><a href="mailto:patrick@(protected)"
>patrick@(protected)</a></span></font></b><font
 size=2 color="#0099ff" face=Arial><span style='font-size:10.0pt;font-family:
 Arial;color:#0099FF'> </span></font><o:p></o:p></p>
 </td>
</tr>
<tr>
 <td style='padding:.75pt .75pt .75pt .75pt'>
 <p class=MsoNormal align=center style='text-align:center'><font size=3
 color="#000033" face="Times New Roman"><span style='font-size:12.0pt'>&nbsp;
<o:p></o:p></span></font></p>
 </td>
</tr>
</table>

<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'><o:p>
&nbsp;</o:p></span></font></p>

</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>

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