new object creation interface

This commit is contained in:
IlyaShurupov 2024-03-25 10:25:25 +03:00 committed by Ilya Shurupov
parent ca1ae75b07
commit cf3f8dbc9c
23 changed files with 103 additions and 84 deletions

View file

@ -9,7 +9,7 @@ void ColorObject::constructor(ColorObject* self) { self->mCol = tp::RGBA(1.f); }
void ColorObject::copy(ColorObject* self, const ColorObject* in) { self->mCol = in->mCol; }
ColorObject* ColorObject::create(tp::RGBA in) {
auto out = objects_api::cast<ColorObject>(NDO->create("RGBA"));
auto out = objects_api::create<ColorObject>();
out->mCol = in;
return out;
}