CAMorphNode.SetPointCount() always return false
-
hi,
i try to convert my cpp code to python and find CAMorphNode.SetPointCount() always return false. Ensure CAMorphNode.GetInfo() == c4d.CAMORPH_DATA_FLAGS_POINTS (Pose Morph Tag is in Points mode) and can get correct number from CAMorphNode.GetPointCount(), but also not work. Do I need to do something different from cpp or is this a bug?
hope your answer! -
I get it, CAMorph.SetMode(doc, tag, flags, mode) flags must include CAMORPH_MODE_FLAGS_EXPAND, i used to use CAMORPH_MODE_FLAGS_ALL because is marked with "ALL". it is Documentation error?
-
I agree this is somehow misleading at least we could improve the documentation of the ALL flags. Regarding the necessity to call CAMORPH_MODE_FLAGS_EXPAND before any operation and CAMORPH_MODE_FLAGS_COLLAPSE this is I think correctly said in the documentation, and each method even SetPointCount, properly link to the SetMode documentation, so I'm not sure where to improve (of course if you have particular feedback for this point we are open).
So about the CAMORPH_MODE_FLAGS_ALL internally we have a flag for each channel of a morph (p/s/r/ud/param/uv) and the flags ALL simply say extend for all channels. Unfortunately, each channel flags are not exposed, so you should always pass the flag CAMORPH_MODE_FLAGS_ALL in conjunction with another COLLAPSE or EXPAND which is I agree not a good API design.
If you want to know more about pose morph, I strongly advise you to read Character Animation Overview this is in C++ but the code is very similar to what you do in Python, only the syntax change.
Hope this answers your question,
Cheers,
Maxime. -
This post is deleted! -
@m_adam Thank you for your answer. C++ documentation have a "Example" show how to use flags in CAMorph.SetMode, but python documentation not (at least in R21.022), i compared the C++ code with Python, then went back to the C++ documentation and found this.