const Block *parent = find_root_input_block(L, blocks[input_idx]);
if (parent != nullptr) {
if (ret != nullptr) {
- luaL_error(L, "add_auto_white_balance() was connected to more than one input");
+ luaL_error(L, "add_white_balance() was connected to more than one input");
}
ret = parent;
}
return ret;
}
-int Scene::add_auto_white_balance(lua_State* L)
+int Scene::add_white_balance(lua_State* L)
{
assert(lua_gettop(L) >= 1);
Scene *scene = (Scene *)luaL_checkudata(L, 1, "Scene");
block->inputs.push_back(find_block_from_arg(L, scene, 2)->idx);
block->white_balance_controller_block = find_block_from_arg(L, scene, 3);
} else {
- luaL_error(L, "add_auto_white_balance([input], [white_balance_controller]) takes zero, one or two arguments");
+ luaL_error(L, "add_white_balance([input], [white_balance_controller]) takes zero, one or two arguments");
}
if (block->white_balance_controller_block == nullptr || !block->white_balance_controller_block->is_input) {
- luaL_error(L, "add_auto_white_balance() does not get its white balance from an input");
+ luaL_error(L, "add_white_balance() does not get its white balance from an input");
}
scene->blocks.push_back(block);
static int add_input(lua_State *L);
static int add_effect(lua_State *L);
static int add_optional_effect(lua_State *L);
- static int add_auto_white_balance(lua_State *L);
+ static int add_white_balance(lua_State *L);
static int finalize(lua_State *L);
};
{ "new", Scene_new },
{ "__gc", Scene_gc },
{ "add_input", Scene::add_input },
- { "add_auto_white_balance", Scene::add_auto_white_balance },
+ { "add_white_balance", Scene::add_white_balance },
{ "add_effect", Scene::add_effect },
{ "add_optional_effect", Scene::add_optional_effect },
{ "finalize", Scene::finalize },
return {
input = scene:add_input(0), -- Live inputs only.
resample_effect = scene:add_effect({ResampleEffect.new(), ResizeEffect.new()}),
- wb_effect = scene:add_auto_white_balance(),
+ wb_effect = scene:add_white_balance(),
padding_effect = scene:add_effect(IntegralPaddingEffect.new())
}
end
return {
input = scene:add_input(),
resample_effect = scene:add_optional_effect(ResampleEffect.new()), -- Activated if scaling.
- wb_effect = scene:add_auto_white_balance() -- Activated for video inputs.
+ wb_effect = scene:add_white_balance() -- Activated for video inputs.
}
end
scene = scene,
input = scene:add_input(),
resample_effect = scene:add_effect({ResampleEffect.new(), ResizeEffect.new(), IdentityEffect.new()}),
- wb_effect = scene:add_auto_white_balance()
+ wb_effect = scene:add_white_balance()
}
scene:finalize()