create link parameter accept Alembic tag
-
Hi,
Could you please help me find out how to define the link parameter in res file which only accepts Alembic tag? (And the Alembic tag should also converted from a vertex color tag before the object was backed as Alembic)I'm developing a plugin, and there is a link parameter, previously, in the res file, I used this to make the parameter only accept a vertex color tag.
LINK xxx { OPEN; ACCEPT { Tvertexcolor; } }
I'd like to change this link to only accept an Alembic tag which is converted from a vertex color tag.
I got the "the Alembic tag which is converted from a vertex color tag" by this:
There is an object with a vertex color tag, then the object is baked as Alembic by using the "Bake as Alembic" menu item popped by right click on the object.
Then the backed Alembic file is imported automatically, and the original vertex color tag will become an Alembic tag.I tried
LINK xxx { OPEN; ACCEPT { Talembic; } }
However, this somehow broke the res file, and made all other parameters disappear.
LINK xxx { OPEN; ACCEPT { 1036433; } }
By replacing Talembic with 1036433 (this is the value defined for Talembic in cinema.framework/source/ge_prepass.h), it does give me a link parameter accepts Alembic tags (I don't know why the Talembic doesn't work, but the actual number works here), but it doesn't limit to the Alembic tags converted from vertex color tags (i.e. all kinds of Alembic tags are accepted).
Thanks!
-
Hey @BruceC, sadly its a bug in our own parser, so you will have to cope with the integer value for now.
Regarding your second question on how to limit only to VertexColorTag for Alembic, there is no way to do that via the res file. But you can react in your Message method to the MSG_DESCRIPTION_CHECKDRAGANDDROP Message. Then check if the passed object is an alembic tag and if its a vertex map or not. You cna find a python example (although you are in C++, just so that you have an idea of how it works in this topic)
Cheers,
Maxime. -
@m_adam, Thank you!
Yes,
Message(GeListNode* node, Int32 type, void* data)
works for me.I'm wondering shall my plugin just return
true
after processingMSG_DESCRIPTION_CHECKDRAGANDDROP
in theMessage()
function (set the value ofDescriptionCheckDragAndDrop::_result
) or still callSUPER::Message(node, type, data);
at the end?
It looks to me that callingSUPER::Message(node, type, data);
at the end still works.
But the example in MSG_DESCRIPTION_CHECKDRAGANDDROP Message doesn't callSUPER::Message(node, type, data);
.Thanks!