diff --git a/libsrc/effectengine/Effect.cpp b/libsrc/effectengine/Effect.cpp index f1f0ea21..585a3448 100644 --- a/libsrc/effectengine/Effect.cpp +++ b/libsrc/effectengine/Effect.cpp @@ -35,9 +35,10 @@ PyMethodDef Effect::effectMethods[] = { {"imageSetPixel" , Effect::wrapImageSetPixel , METH_VARARGS, "set pixel color of image"}, {"imageGetPixel" , Effect::wrapImageGetPixel , METH_VARARGS, "get pixel color of image"}, {"imageSave" , Effect::wrapImageSave , METH_NOARGS, "adds a new background image"}, - {"imageMinSize" , Effect::wrapImageMinSize , METH_VARARGS, "sets minimal dimension of background image"}, + {"imageMinSize" , Effect::wrapImageMinSize , METH_VARARGS, "sets minimal dimension of background image"}, {"imageWidth" , Effect::wrapImageWidth , METH_NOARGS, "gets image width"}, {"imageHeight" , Effect::wrapImageHeight , METH_NOARGS, "gets image height"}, + {"hsvF_to_rgb" , Effect::wrapHsvFtoRgb , METH_NOARGS, "convert hsvF (double) to rgb (int)"}, {NULL, NULL, 0, NULL} }; @@ -836,6 +837,19 @@ PyObject* Effect::wrapImageHeight(PyObject *self, PyObject *args) return Py_BuildValue("i", effect->_imageSize.height()); } +PyObject* Effect::wrapHsvFtoRgb(PyObject *self, PyObject *args) +{ + int argCount = PyTuple_Size(args); + double h, s, v, a; + + if ( argCount == 3 && PyArg_ParseTuple(args, "ddd", &h, &s, &v) ) + { + QColor cC.fromHsvF(h,s,v,a = 1.0).toRgb() + return Py_BuildValue("iii", cC.red(), cC.green(), cC.blue()); + } + return nullptr; +} + Effect * Effect::getEffect() { // extract the module from the runtime diff --git a/libsrc/effectengine/Effect.h b/libsrc/effectengine/Effect.h index e8a20676..3a58d8d4 100644 --- a/libsrc/effectengine/Effect.h +++ b/libsrc/effectengine/Effect.h @@ -70,6 +70,7 @@ private: static PyObject* wrapImageMinSize (PyObject *self, PyObject *args); static PyObject* wrapImageWidth (PyObject *self, PyObject *args); static PyObject* wrapImageHeight (PyObject *self, PyObject *args); + static PyObject* wrapHsvFtoRgb (PyObject *self, PyObject *args); static Effect * getEffect(); diff --git a/libsrc/hyperion/schemas/hyperion.schema-2.json b/libsrc/hyperion/schemas/hyperion.schema-2.json index 86b5f6f0..0b707c4e 100644 --- a/libsrc/hyperion/schemas/hyperion.schema-2.json +++ b/libsrc/hyperion/schemas/hyperion.schema-2.json @@ -1303,6 +1303,7 @@ "type": "string", "title" : "edt_conf_effp_paths_itemtitle" }, + "minItems": 1, "propertyOrder" : 1 }, "disable" :