Get Vertex map help pls
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/02/2012 at 01:12, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13
Platform:
Language(s) : PYTHON ;---------
I've been trying to get my head around this with little successCube
editable
select point create vertex map - tag is first tagGet a point object - editable cube op
vtag = op.GetFirstTag()
vtag is a variabletag object and CalcVertexmap - doesn't use that type of objectQ: How do I retrieve the Vertex Map weight info?
From what I can see I should get a list of weights (as reals equal to the number of points??)
Get a point object - editable cube op
PointObject.CalcVertexmap
( modifier )
cvm = op.CalcVertexmap(whats the modifier?)guidance appreciated
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/02/2012 at 01:30, xxxxxxxx wrote:
You're on the right lines but I don't think you need to use CalcVertexMap(). What I do is get the tag, which is a VariableTag, then get the array of SReals it points to. In C++ something like this:
// *vt = a pointer to your vertex map tag LONG vcnt = vt->GetDataCount(); SReal *vmap = vt->GetDataAddressW(); for(LONG i = 0; i < vcnt; i++) { // get the weight for each vertex, for example: if(vmap[i] == 1.0 // this is the weight { // carry out the desired action } }
I assume these calls are present in Python as well as in C++, but I haven't looked.
Steve
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/02/2012 at 01:49, xxxxxxxx wrote:
cheers Steve
Lots of things are starting to fall into place
but the SDK still frustrates meI can see how the pointer would work
I guess I need (how to get the pointer) equivalent in PythonEdit -
still going round and round getting nowhere
what is the modifier please
and the use of CalcVertextMap()Edit -
think I've found something...
tag = op.GetFirstTag() - first tag is VertexMap
print tag.GetAllHighlevelData()aahhh! - the SDK is really not a helpful doc (sorry - just frustrating)
Edit -
OK
I can get the tag and the Map height per point
and I'll get done what needs to be done - pseudo codeGet object
Check object is poly
Get pointslist
Search tags
Find Vertex tag
Check name
Discard if not the one I want (have to have some way to identify)
Check Object point count against Tags Height Data count
If OK make use of values against object pointslist
exitNote - I've searched the net and the SDK and can't find anything concrete on getting a vertex Map in Python. To that end, it would be very useful to have an experienced programmer post an example of how to do the job correctly.
As I'm still learning - I don't want to post anything that might steer others in the wrong direction