Re: [Script] Point Position of Enveloped Object in Shape Modeling stack
| Date : Mon, 08 May 2006 17:18:00 +0930 |
| To : XSI(at)Softimage.COM |
| From : Raffaele Fragapane <jaco(at)thejaco.com> |
| Subject : Re: [Script] Point Position of Enveloped Object in Shape Modeling stack |
once you have that you can use the copy of your object as a shape target
****************************** | Raffaele Fragapane | | Rising Sun Pictures | | "Remember, TD is for TopDog" | ******************************
L. Edy Susanto wrote:
Hi Rafaele, thx
My current target is to envelope the one object, transform the deformer, move some of it's point to certain position in global space (in Shape modeling stage) and then get rid of the envelope operator.
and use the result as Shape.
but I got stuck when trying mo move the point in precise global position..
rgds,
edy
Raffaele Fragapane wrote:
the problem isn't at what entry point you run.
the problem is that architecturally you can't change an array in place unless its frozen, so if you have operators altering the positionArray before modification you simply can't change it.
the way around it is either freezing (yeah... right) or puttig the operation into operator form with a scripted op.
for a simple mesh sync (dumping a position array into another) we're talking maybe 2 mins of work to write the op and 10 to write a script that builds it and applies it.
****************************** | Raffaele Fragapane | | Rising Sun Pictures | | "Remember, TD is for TopDog" | ******************************
L. Edy Susanto wrote:
---Hi everyone,
Anyone got idea how to snap one point to certain place in the Shape modeling and the object already enveloped ?
We can easily do that in After Animation stack or Secondary shape stack mode. but how to do it in shape modeling??
I tried to use points position array to transfer point position from one object (base object) to another (target object) and it works fine.
the thing is that the target Object need to be freezed to get the transfer working.
If the target object got another operator working in it I got this error message "//ERROR : 2009 - Access denied - [line 39]"
I enclose my script below, just enable the first or the second part that I marked in the script. notice that in the first part there is a freezeObject command
the second part can also work without freezing the object, but both can only work well / correctly if there is no other operator above it.
here is the script :
// select two identical object // [1] : base // [2] : target
var oBase = selection(0); var oTarget = selection(1);
//input checking if(oInObjs.count != 2) { LogMessage("Wrong Selection Number", siError); return false; }
//getting points basePnts = oBase.activeprimitive.geometry.Points; targetPnts = oTarget.activeprimitive.geometry.Points;
if(basePnts.count != targetPnts.count){ LogMessage("Objects dont match", siError); return false; }
/* first part
var targetPos = new VBArray(targetPnts.PositionArray); aPos2 = targetPos.toArray();
FreezeObj( oBase.name ); basePnts.PositionArray= aPos2;
*/ /* second part var delta = XSIMath.CreateVector3(); SetValue("Context.ConstructionMode", 1, null);
for(var i=0; i < basePnts.count; i++){ delta.sub(targetPnts(i).Position, basePnts(i).Position);
if(delta.Length()!=0 ){ Translate(basePnts(i), delta.x, delta.y, delta.z); } } */ LogMessage("Object Shape Matched");
please help... thx :)
Leonardo Edy Susanto
Infinite Frameworks Studios
Batam-Indonesia
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi
--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi
- References:
- [Script] Point Position of Enveloped Object in Shape Modeling stack
- From: "L. Edy Susanto" <sawamura(at)neorack.com>
- Re: [Script] Point Position of Enveloped Object in Shape Modeling stack
- From: Raffaele Fragapane <jaco(at)thejaco.com>
- Re: [Script] Point Position of Enveloped Object in Shape Modeling stack
- From: "L. Edy Susanto" <sawamura(at)neorack.com>
- [Script] Point Position of Enveloped Object in Shape Modeling stack
| DATE: | << | >> | THREAD: | << | >> | INDEX: | Main | Thread |
|---|
- Previous by Date: Re: Re[2]: Batch and 64 bit
- Next by Date: Re: Re[2]: Batch and 64 bit
- Previous by Thread: Re: Re[2]: Batch and 64 bit
- Next by Thread: Re: Re[2]: Batch and 64 bit
- Index(es):
| Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available. |