SOLVED How ObjectData add PRIORITY and execute

hi,
i am confuse about how to add PRIORITY in ObjectData like Skin and Hair object ? show in basic tab?
and how to connect PRIORITY to ObjectData::Execute()? i try to use ObjectData::AddToExecute(), it work but not same as ExpressionTag, it will execute when i move cursor or other action, even execute after i closed objectplugin. it is strange. if any way execute ObjectData::Execute() like ExpressionTag do ?
hope your help!

Hello,

Objects and tags are two different things, so I would not expect them to work similarly.

In the case of the Skin object, the priority parameter is simply added in the resource file. Take a look at the ocaskin.res file.

GROUP Obaselist
{
  SEPARATOR { LINE; }

  PRIORITY ID_CA_SKIN_OBJECT_PRIORITY { ANIM OFF; NOCAMERA; }
}

Within AddToExecution() the value of that parameter is read, converted to EXECUTIONPRIORITY and used to set the priority value of PriorityList::Add().

best wishes,
Sebastian

Hello,

Objects and tags are two different things, so I would not expect them to work similarly.

In the case of the Skin object, the priority parameter is simply added in the resource file. Take a look at the ocaskin.res file.

GROUP Obaselist
{
  SEPARATOR { LINE; }

  PRIORITY ID_CA_SKIN_OBJECT_PRIORITY { ANIM OFF; NOCAMERA; }
}

Within AddToExecution() the value of that parameter is read, converted to EXECUTIONPRIORITY and used to set the priority value of PriorityList::Add().

best wishes,
Sebastian

@s_bach Thank you!