|
How are you getting on in the decision of this question?
I too try to solve this question.
Access to UV-co-ordinates is not difficult.
Here a principle of change of UV-co-ordinates on JScript:
[I]ob=CreatePrim ("Cube", “MeshSurface”, null, null);
//a=selection (0);
a=ob;
CreateProjection (ob, 11, 0, “tx_Support”, “tx_Property”, true, 1);//create UV-projection
b=a.ActivePrimitive.Geometry;
c=b.Clusters(0).Properties (0); //select UV property
d1=c.Elements.Array.toArray();
for (i=0; i <d1.length-1; i ++)
{
d1 =d1 +0.5; //offset texture coordinates
}
c.Elements.Array = d1;[/I]
But problems begin, when this code works as Update for Custom Op, if the operator change topology, with the help
i[B][I]n_ctxt. OutputTarget. Geometry.set (newgeometry.points, newgeometry.polygons); [/I][/B]- commands.
It is necessary to update UV-cluster that he included all samples object.
It is made by the command
[B][I]SIAddToCluster (inCluster, MeshName + “. sample [0-LAST]");[/I][/B]
But data with “tx_Property”, all the same are not updated, and the quantity samples cannot increase.
I do not know as to solve this problem.
p.s.:
Automatic updating cluster does not work at manual creation Uv-cluster , and at change of topology by a command [I]:in_ctxt. OutputTarget. Geometry.set (newgeometry.points, newgeometry.polygons);
[/I]p.s.:
[I]If to create in the operator 2 Out ports, as in function an update to divide for write these ports?
[/I]
I and have not understood how to update samples in UV-cluster, and in UV-cluster-property.
|