Call a user action from a plugin
Hello
Is it possible to call an action made by a user, if yes how I can retrieve it (by its name ?) and is it possible to set some arguments of the action ?
Thanks
Hello
Is it possible to call an action made by a user, if yes how I can retrieve it (by its name ?) and is it possible to set some arguments of the action ?
Thanks
here it is a sample of how PlayActionEvent method could be used:
ASErr
AIArtHandleModifier::Rasterize()
{
AIErr result = kNoErr;
AIActionParamValueRef valueParameterBlock = NULL;
ActionDialogStatus dialogStatus = kDialogOff;
try
{
result = sAIActionManager->AINewActionParamValue(&valueParameterBlock);
aisdk::check_ai_error(result);
if (valueParameterBlock)
{
//set valueParameterBlock values (params) before calling
//PlayActionEvent method.
//It's up to you to set it
result = sAIActionManager->PlayActionEvent("ai_plugin_rasterize", dialogStatus, valueParameterBlock);
aisdk::check_ai_error(result);
result = sAIActionManager->AIDeleteActionParamValue(valueParameterBlock);
aisdk::check_ai_error(result);
}
}
catch(ai::Error& ex)
{
//Do something with this!!!
}
return result;
}
Regards,
Thomas.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.