Blame toonz/sources/toonzqt/toonz_params.cpp
|
Toshihiro Shimizu |
890ddd |
#include "pluginhost.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "toonz_params.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
extern "C" {
|
|
Toshihiro Shimizu |
890ddd |
int set_parameter_pages(void *, int num, toonz_param_page_t *params);
|
|
Toshihiro Shimizu |
890ddd |
int set_parameter_pages_with_error(void *, int num, toonz_param_page_t *params, int *, void **);
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int set_parameter_pages_with_error(void *host, int num, toonz_param_page_t *params, int *err, void **position)
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
if (!host)
|
|
Toshihiro Shimizu |
890ddd |
return TOONZ_ERROR_NULL;
|
|
Toshihiro Shimizu |
890ddd |
if (num == 0)
|
|
Toshihiro Shimizu |
890ddd |
return TOONZ_OK; /* num==0 の場合は無視してよい */
|
|
Toshihiro Shimizu |
890ddd |
if (params == NULL)
|
|
Toshihiro Shimizu |
890ddd |
return TOONZ_ERROR_NULL;
|
|
Toshihiro Shimizu |
890ddd |
int e = 0;
|
|
Toshihiro Shimizu |
890ddd |
void *pos = NULL;
|
|
Toshihiro Shimizu |
890ddd |
bool ret = reinterpret_cast<rasterfxpluginhost *="">(host)->setParamStructure(num, params, e, pos);</rasterfxpluginhost>
|
|
Toshihiro Shimizu |
890ddd |
if (!ret) {
|
|
Toshihiro Shimizu |
890ddd |
if (err) {
|
|
Toshihiro Shimizu |
890ddd |
*err = e;
|
|
Toshihiro Shimizu |
890ddd |
if (position)
|
|
Toshihiro Shimizu |
890ddd |
*position = pos;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
return TOONZ_ERROR_INVALID_VALUE;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
return TOONZ_OK;
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
int set_parameter_pages(void *host, int num, toonz_param_page_t *params)
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
return set_parameter_pages_with_error(host, num, params, NULL, NULL);
|
|
Toshihiro Shimizu |
890ddd |
}
|