Compositor: Turn Flip node options to inputs
This patch turns the Flip node options to inputs. Reference #137223. Pull Request: https://projects.blender.org/blender/blender/pulls/139722
This commit is contained in:
@@ -1146,6 +1146,22 @@ static void write_compositor_legacy_properties(bNodeTree &node_tree)
|
||||
storage->sizey = int(
|
||||
math::ceil(size_input->default_value_typed<bNodeSocketValueVector>()->value[1]));
|
||||
}
|
||||
|
||||
if (node->type_legacy == CMP_NODE_FLIP) {
|
||||
const bNodeSocket *x_input = blender::bke::node_find_socket(*node, SOCK_IN, "Flip X");
|
||||
const bNodeSocket *y_input = blender::bke::node_find_socket(*node, SOCK_IN, "Flip Y");
|
||||
const bool flip_x = x_input->default_value_typed<bNodeSocketValueBoolean>()->value;
|
||||
const bool flip_y = y_input->default_value_typed<bNodeSocketValueBoolean>()->value;
|
||||
if (flip_x && flip_y) {
|
||||
node->custom1 = 2;
|
||||
}
|
||||
else if (flip_y) {
|
||||
node->custom1 = 1;
|
||||
}
|
||||
else {
|
||||
node->custom1 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user