Cleanup: use node.is_type() instead of node.type_legacy
Pull Request: https://projects.blender.org/blender/blender/pulls/137136
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_image.hh"
|
||||
#include "BKE_node_legacy_types.hh"
|
||||
#include "BKE_node_runtime.hh"
|
||||
|
||||
#include "ED_gizmo_library.hh"
|
||||
#include "ED_screen.hh"
|
||||
@@ -106,7 +106,7 @@ static bool WIDGETGROUP_node_transform_poll(const bContext *C, wmGizmoGroupType
|
||||
if (snode && snode->edittree && snode->edittree->type == NTREE_COMPOSIT) {
|
||||
bNode *node = bke::node_get_active(*snode->edittree);
|
||||
|
||||
if (node && ELEM(node->type_legacy, CMP_NODE_VIEWER)) {
|
||||
if (node && node->is_type("CompositorNodeViewer")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -303,7 +303,7 @@ static bool WIDGETGROUP_node_crop_poll(const bContext *C, wmGizmoGroupType * /*g
|
||||
if (snode && snode->edittree && snode->edittree->type == NTREE_COMPOSIT) {
|
||||
bNode *node = bke::node_get_active(*snode->edittree);
|
||||
|
||||
if (node && ELEM(node->type_legacy, CMP_NODE_CROP)) {
|
||||
if (node && node->is_type("CompositorNodeCrop")) {
|
||||
/* ignore 'use_crop_size', we can't usefully edit the crop in this case. */
|
||||
if ((node->custom1 & (1 << 0)) == 0) {
|
||||
return true;
|
||||
@@ -485,7 +485,7 @@ static bool WIDGETGROUP_node_box_mask_poll(const bContext *C, wmGizmoGroupType *
|
||||
if (snode && snode->edittree && snode->edittree->type == NTREE_COMPOSIT) {
|
||||
bNode *node = bke::node_get_active(*snode->edittree);
|
||||
|
||||
if (node && ELEM(node->type_legacy, CMP_NODE_MASK_BOX)) {
|
||||
if (node && node->is_type("CompositorNodeBoxMask")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -599,7 +599,7 @@ static bool WIDGETGROUP_node_sbeam_poll(const bContext *C, wmGizmoGroupType * /*
|
||||
if (snode && snode->edittree && snode->edittree->type == NTREE_COMPOSIT) {
|
||||
bNode *node = bke::node_get_active(*snode->edittree);
|
||||
|
||||
if (node && ELEM(node->type_legacy, CMP_NODE_SUNBEAMS)) {
|
||||
if (node && node->is_type("CompositorNodeSunBeams")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -706,7 +706,7 @@ static bool WIDGETGROUP_node_corner_pin_poll(const bContext *C, wmGizmoGroupType
|
||||
if (snode && snode->edittree && snode->edittree->type == NTREE_COMPOSIT) {
|
||||
bNode *node = bke::node_get_active(*snode->edittree);
|
||||
|
||||
if (node && ELEM(node->type_legacy, CMP_NODE_CORNERPIN)) {
|
||||
if (node && node->is_type("CompositorNodeCornerPin")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user