Solved PoseMorph Tag question

I want to print PoseMorphTag Values(like point relative position),but seem to have some problems。

def main():
    m_tag = op.GetTag(c4d.Tposemorph)
    mor = m_tag.GetMorph(1)
    node = mor.GetFirst()
    cnt = node.GetPointCount()
    print cnt
    for i in xrange(cnt):
        print i,":",node.GetPoint(i)


I want to get point(index: 167 or >12),but i don't know how to get?

Thanks for anyone help!


Hi @chuanzhen,

In its "normal" state, a CAMorphNode only store modified point and not all the points. So if you want to access all the points, you should call SetMode with flags c4d.CAMORPH_MODE_FLAGS_ALL | c4d.CAMORPH_MODE_FLAGS_EXPAND, do not forget to collapse it after any usage.
I know you are developing in Python, but the C++ document is way more relevant in this regards, so please take a look at the CAMorphNode::SetMode or even the CAMorphNode Manual.

Improvement of the python doc will be done.

@m_adam Thanks for your help and look forward to the improvement of python doc:relaxed:


@m_adam Hello thank you for the quick fix, but do you have any further explanation about what the flags and modes specify? The documentation still has no information.

Thank you in advance for "expanding" on this topic. :wink:

The mode specifies how data can be read from the Morph Tag.
By default, they are presented in a compact way (aka only modified points are stored for some internal optimization).

But if you SetMode with c4d.CAMORPH_MODE_FLAGS_ALL | c4d.CAMORPH_MODE_FLAGS_EXPAND then all the points are then readable from outside of the morph Tag.

I adapted the Python documentation to match the C++ documentation so it will be available in the next documentation update. But I would say the C++ documentation for SetMode is pretty self-explanatory, what is the part you don't understand?