]> git.sesse.net Git - nageru/commitdiff
Rename add_auto_white_balance() to add_white_balance().
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 29 Mar 2020 13:00:35 +0000 (15:00 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 29 Mar 2020 13:00:35 +0000 (15:00 +0200)
“auto” white balance sounds like we are doing some kind of analysis
to find the correct white balance, which we're not, so rename before
release to reduce the chance of confusion.

nageru/scene.cpp
nageru/scene.h
nageru/theme.cpp
nageru/theme.lua

index 7a8e882fc038b1c092cdb2e4f68e5ac040586b01..a44c9a856316d2cf1f3296365b69862498a4e188 100644 (file)
@@ -339,7 +339,7 @@ const Block *Scene::find_root_input_block(lua_State *L, const Block *block)
                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;
                }
@@ -347,7 +347,7 @@ const Block *Scene::find_root_input_block(lua_State *L, const Block *block)
        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");
@@ -375,10 +375,10 @@ int Scene::add_auto_white_balance(lua_State* L)
                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);
index 4e1181bbf4cf9f504625d5eae9708db79a057ba1..4388bbe71720b71930d8a078249849c0b2dc645f 100644 (file)
@@ -202,7 +202,7 @@ public:
        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);
 };
 
index d63c853ff2fef227e0d620fe66ddc5511d3c3575..d04a580f2cd7bbaee8668792443931dd7f4766d4 100644 (file)
@@ -866,7 +866,7 @@ const luaL_Reg Scene_funcs[] = {
        { "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 },
index 195e89b88ab11e5bbcfc9eb7e187dc4514e690de..b95d1e168d0efc413b44832fd8673f75f7f9aeb1 100644 (file)
@@ -35,7 +35,7 @@ function make_sbs_input(scene)
        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
@@ -67,7 +67,7 @@ function make_fade_input(scene)
        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
 
@@ -95,7 +95,7 @@ local simple_scene = {
        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()