diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-10-14 00:01:15 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-10-14 00:41:14 +0300 |
commit | 1c42d4930a24d639b3aa561b9a8b4bbce05977e0 (patch) | |
tree | 68c2aae3fd5ae98b78708bea28c0b55d3f4fb5f0 /source/blender/compositor/nodes/COM_CompositorNode.cc | |
parent | a2ee3c3a9f01f5cb2f05f1e84a1b6c1931d9d4a4 (diff) |
Cleanup: convert camelCase naming to snake_case in Compositor
To convert old code to the current convention and
use a single code style.
Diffstat (limited to 'source/blender/compositor/nodes/COM_CompositorNode.cc')
-rw-r--r-- | source/blender/compositor/nodes/COM_CompositorNode.cc | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/source/blender/compositor/nodes/COM_CompositorNode.cc b/source/blender/compositor/nodes/COM_CompositorNode.cc index 10c87b8c886..5121a7cc123 100644 --- a/source/blender/compositor/nodes/COM_CompositorNode.cc +++ b/source/blender/compositor/nodes/COM_CompositorNode.cc @@ -21,44 +21,44 @@ namespace blender::compositor { -CompositorNode::CompositorNode(bNode *editorNode) : Node(editorNode) +CompositorNode::CompositorNode(bNode *editor_node) : Node(editor_node) { /* pass */ } -void CompositorNode::convertToOperations(NodeConverter &converter, - const CompositorContext &context) const +void CompositorNode::convert_to_operations(NodeConverter &converter, + const CompositorContext &context) const { - bNode *editorNode = this->getbNode(); - bool is_active = (editorNode->flag & NODE_DO_OUTPUT_RECALC) || context.isRendering(); - bool ignore_alpha = (editorNode->custom2 & CMP_NODE_OUTPUT_IGNORE_ALPHA) != 0; + bNode *editor_node = this->get_bnode(); + bool is_active = (editor_node->flag & NODE_DO_OUTPUT_RECALC) || context.is_rendering(); + bool ignore_alpha = (editor_node->custom2 & CMP_NODE_OUTPUT_IGNORE_ALPHA) != 0; - NodeInput *imageSocket = this->getInputSocket(0); - NodeInput *alphaSocket = this->getInputSocket(1); - NodeInput *depthSocket = this->getInputSocket(2); + NodeInput *image_socket = this->get_input_socket(0); + NodeInput *alpha_socket = this->get_input_socket(1); + NodeInput *depth_socket = this->get_input_socket(2); - CompositorOperation *compositorOperation = new CompositorOperation(); - compositorOperation->setScene(context.getScene()); - compositorOperation->setSceneName(context.getScene()->id.name); - compositorOperation->setRenderData(context.getRenderData()); - compositorOperation->setViewName(context.getViewName()); - compositorOperation->setbNodeTree(context.getbNodeTree()); + CompositorOperation *compositor_operation = new CompositorOperation(); + compositor_operation->set_scene(context.get_scene()); + compositor_operation->set_scene_name(context.get_scene()->id.name); + compositor_operation->set_render_data(context.get_render_data()); + compositor_operation->set_view_name(context.get_view_name()); + compositor_operation->set_bnodetree(context.get_bnodetree()); /* alpha socket gives either 1 or a custom alpha value if "use alpha" is enabled */ - compositorOperation->setUseAlphaInput(ignore_alpha || alphaSocket->isLinked()); - compositorOperation->setActive(is_active); + compositor_operation->set_use_alpha_input(ignore_alpha || alpha_socket->is_linked()); + compositor_operation->set_active(is_active); - converter.addOperation(compositorOperation); - converter.mapInputSocket(imageSocket, compositorOperation->getInputSocket(0)); + converter.add_operation(compositor_operation); + converter.map_input_socket(image_socket, compositor_operation->get_input_socket(0)); /* only use alpha link if "use alpha" is enabled */ if (ignore_alpha) { - converter.addInputValue(compositorOperation->getInputSocket(1), 1.0f); + converter.add_input_value(compositor_operation->get_input_socket(1), 1.0f); } else { - converter.mapInputSocket(alphaSocket, compositorOperation->getInputSocket(1)); + converter.map_input_socket(alpha_socket, compositor_operation->get_input_socket(1)); } - converter.mapInputSocket(depthSocket, compositorOperation->getInputSocket(2)); + converter.map_input_socket(depth_socket, compositor_operation->get_input_socket(2)); - converter.addNodeInputPreview(imageSocket); + converter.add_node_input_preview(image_socket); } } // namespace blender::compositor |