Jugdish

11-03-2005, 01:08 AM

I've found any easy way to get the total number of vertices on a poly surface, by doing a `getAttr -size polygon1.vt`, but how can you get the total number of CVs on a nurbsSurface, such that you can iterate over them properly?

I've tried using the minMaxRangeU and minMaxRangeV attributes of nurbsSurface objects to get this information, but it doesn't seem to be accurate. For example, there is one nurbsSurface that when I select all of its CVs (by dragging across them), the Script Editor says:

select -r nurbsSurface1.cv[0:15][0:11]

This tells me that there are 16 CVs in the U direction and 12 in the V direction (right?). However, when I call minMaxRangeU and minMaxRangeV on this same surface, I get the following:

getAttr nurbsSurface1.minMaxRangeU;

// Result: 0 11 //

getAttr nurbsSurface1.minMaxRangeV;

// Result: 0 8 //

which is not consistent with the actual number of CVs. So how do I get the total number of CVs for a nurbsSurface so I can iterate over them??

I've tried using the minMaxRangeU and minMaxRangeV attributes of nurbsSurface objects to get this information, but it doesn't seem to be accurate. For example, there is one nurbsSurface that when I select all of its CVs (by dragging across them), the Script Editor says:

select -r nurbsSurface1.cv[0:15][0:11]

This tells me that there are 16 CVs in the U direction and 12 in the V direction (right?). However, when I call minMaxRangeU and minMaxRangeV on this same surface, I get the following:

getAttr nurbsSurface1.minMaxRangeU;

// Result: 0 11 //

getAttr nurbsSurface1.minMaxRangeV;

// Result: 0 8 //

which is not consistent with the actual number of CVs. So how do I get the total number of CVs for a nurbsSurface so I can iterate over them??