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?
perhaps to protect from
ugly haircuts...
sorry, not very helpfull
is it?
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
|