diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-11-02 15:17:35 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-11-02 15:17:35 +0300 |
commit | a083b23cebee4a35c7b658ce6f5c15bd7db9db58 (patch) | |
tree | 92deec27cd8d29c7482ae9852958b6863fff3806 /source/blender/editors | |
parent | 638bf05a23e1ef7dddd3b5d42d9521d8849a4375 (diff) |
First iteration of a virtual camera node.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_node/drawnode.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc index df31a0342cb..b713b225638 100644 --- a/source/blender/editors/space_node/drawnode.cc +++ b/source/blender/editors/space_node/drawnode.cc @@ -432,6 +432,20 @@ static void node_shader_buts_tex_environment(uiLayout *layout, bContext *C, Poin node_buts_image_user(layout, C, &iuserptr, &imaptr, &iuserptr, false, true); } +static void node_shader_buts_virtual_camera(uiLayout *layout, bContext *C, PointerRNA *ptr) +{ + uiTemplateID(layout, + C, + ptr, + "camera", + nullptr, + nullptr, + nullptr, + UI_TEMPLATE_ID_FILTER_ALL, + false, + nullptr); +} + static void node_shader_buts_tex_environment_ex(uiLayout *layout, bContext *C, PointerRNA *ptr) { PointerRNA iuserptr = RNA_pointer_get(ptr, "image_user"); @@ -499,6 +513,9 @@ static void node_shader_set_butfunc(bNodeType *ntype) ntype->draw_buttons = node_shader_buts_tex_environment; ntype->draw_buttons_ex = node_shader_buts_tex_environment_ex; break; + case SH_NODE_VIRTUAL_CAMERA: + ntype->draw_buttons = node_shader_buts_virtual_camera; + break; case SH_NODE_DISPLACEMENT: case SH_NODE_VECTOR_DISPLACEMENT: ntype->draw_buttons = node_shader_buts_displacement; |