Re: [scripting] Overwriting the Hair PositionArray?
| Date : Wed, 21 Nov 2007 23:09:45 +0100 |
| To : XSI(at)Softimage.COM |
| From : "guillaume laforge" <guillaume.laforge.3d(at)gmail.com> |
| Subject : Re: [scripting] Overwriting the Hair PositionArray? |
I made a little video for "non-scripted peoples" to show how this plugin work : http://vol2blog.blogspot.com/2007/11/cut-guides-with-weigth-map-operator.html
Cheers
Guillaume
Many thanks Guillaume, you rock. Thanks to Kim as well for your previous mail about accessing the root points and geometry source.
My plugin is done now, it'd have taken me a lot more time without that precious information.
Cheers!
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Guillaume Laforge
Sent: Wednesday, November 21, 2007 9:18 AM
Hi Vincent
See attached plugin scop of tea ;-).
This plugin drive the guides scale with a weight map.
Copy the file in your plugin directory, open xsi and run those jscript lines below to see it in action on a hair object.
//create a grid
CreatePrim("Grid", "MeshSurface", null, null);
SetValue("grid.grid.ulength", 16, null);
//add a weight map
CreateWeightMap(null, null, "Weight_Map", null, null);
SetValue("grid.polymsh.cls.WeightMapCls.Weight_Map.weightmapop.weight ", 1, null);
SetValue("grid.polymsh.cls.WeightMapCls.Weight_Map.weightmapop.type", 1, null);
SetValue("grid.polymsh.cls.WeightMapCls.Weight_Map.weightmapop.wmax", 5, null);
//create a hair object
ApplyHairOp("grid", null);
SetValue("Hair.hair.AllowStretch", true, null);
//scale guides with a weightmap
guil_CutGuidesWithWmap("grid.polymsh.cls.WeightMapCls.Weight_Map");
It is not a self installing plugin so you can inspect the code from a scripted operator editor.
If you want to use it on your own hair :
Set hair stresh on. Select your hair object, go to Property and choose "Cute Guides With a Weight Map", then pick a weight map (no need to transfert map ).
I test it only on xsi 5.11 at home but it should be ok for xsi 6.xx too.
Hope this help
Cheers
Guillaume Laforge | La Maison
Vincent Fortin a écrit :Oh dear, what about a nice scop of tea?
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of peter boeykens
Sent: Tuesday, November 20, 2007 5:17 PM
To: XSI(at)Softimage.COM
Subject: Re: [scripting] Overwriting the Hair PositionArray?
perhaps to protect from ugly haircuts...
sorry, not very helpfull is it?
Is it possible?
I get an "access denied" whatever I try…
// JSCRIPT
var oObj = selection(0);
var aPos = oObj.ActivePrimitive.Geometry.Points.PositionArray.toArray();
FreezeObj(oObj);
oObj.ActivePrimitive.Geometry.Points.PositionArray = aPos;
Thanks,
Vincent
- References:
- Re: [scripting] Overwriting the Hair PositionArray?
- From: Guillaume Laforge <guillaume(at)alamaison.fr>
- RE: [scripting] Overwriting the Hair PositionArray?
- From: "Vincent Fortin" <vincent.fortin(at)ubisoft.com>
- Re: [scripting] Overwriting the Hair PositionArray?
| DATE: | << | >> | THREAD: | << | >> | INDEX: | Main | Thread |
|---|
- Previous by Date: Disregard Re:Rotoscopy options?
- Next by Date: Disregard Re:Rotoscopy options?
- Previous by Thread: Disregard Re:Rotoscopy options?
- Next by Thread: Disregard Re:Rotoscopy options?
- Index(es):
| Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available. |