Query Morph Order Based on the UI Order?
-
Hi,
By default when you perform
morph.GetCount()
, it returns a count based on the order they inserted.
Is there a way to get the order based on the UI order?See illustration below:
-
Hello @bentraje,
Thank you for reaching out to us. Your posting is lacking a bit clarity as to regarding what you are doing. The image demonstrates your core problem but the rest is a bit hazy for us. I assume you are talking about c4d.modules.character.CAPoseMorphTag and its methods
GetMorphCount
andGetMorph
.Generally, no, I do not think that this is possible. There are the morph
DescID
exposed by a morph tag in addition to the indices, but they will be out of order too when you manually mess with the morph order. I.e., both index and ID will reflect creation order and not arrangement order.
The underlying problem is that the data type ItemTreeData of the Poses parameter is not exposed in Python (in C++ it is only semi-public too).
>>> PoseMorph[c4d.ID_CA_POSE_MORPHS] Traceback (most recent call last): File "console", line 1, in <module> AttributeError: Parameter value not accessible (object unknown in Python)
With that type you could do what you want to do here. In Python you are out of options here.
Cheers,
Ferdinand -
Hi @ferdinand
Thanks for the response.
Found a workaround it.
Basically, just name the poses properly in a sorting order.
Query theGetName()
method and perform my own sorting.Regards,
Ben