Compositor: Remove left over code from tile based compositor #121176
|
@ -29,8 +29,6 @@ void ViewerNode::convert_to_operations(NodeConverter &converter,
|
|||
viewer_operation->set_bnodetree(context.get_bnodetree());
|
||||
viewer_operation->set_image(image);
|
||||
viewer_operation->set_image_user(image_user);
|
||||
viewer_operation->setCenterX(editor_node->custom3);
|
||||
viewer_operation->setCenterY(editor_node->custom4);
|
||||
/* alpha socket gives either 1 or a custom alpha value if "use alpha" is enabled */
|
||||
viewer_operation->set_use_alpha_input(ignore_alpha || alpha_socket->is_linked());
|
||||
viewer_operation->set_render_data(context.get_render_data());
|
||||
|
|
|
@ -19,8 +19,6 @@ class ViewerOperation : public MultiThreadedOperation {
|
|||
Image *image_;
|
||||
ImageUser *image_user_;
|
||||
bool active_;
|
||||
float center_x_;
|
||||
float center_y_;
|
||||
ImBuf *ibuf_;
|
||||
bool use_alpha_input_;
|
||||
const RenderData *rd_;
|
||||
|
@ -57,22 +55,6 @@ class ViewerOperation : public MultiThreadedOperation {
|
|||
{
|
||||
active_ = active;
|
||||
}
|
||||
void setCenterX(float centerX)
|
||||
{
|
||||
center_x_ = centerX;
|
||||
}
|
||||
void setCenterY(float centerY)
|
||||
{
|
||||
center_y_ = centerY;
|
||||
}
|
||||
float getCenterX() const
|
||||
{
|
||||
return center_x_;
|
||||
}
|
||||
float getCenterY() const
|
||||
{
|
||||
return center_y_;
|
||||
}
|
||||
eCompositorPriority get_render_priority() const override;
|
||||
void set_use_alpha_input(bool value)
|
||||
{
|
||||
|
|
|
@ -8217,33 +8217,6 @@ static void def_cmp_colorcorrection(StructRNA *srna)
|
|||
static void def_cmp_viewer(StructRNA *srna)
|
||||
{
|
||||
PropertyRNA *prop;
|
||||
Blendify marked this conversation as resolved
Outdated
|
||||
static const EnumPropertyItem tileorder_items[] = {
|
||||
{0, "CENTEROUT", 0, "Center", "Expand from center"},
|
||||
{1, "RANDOM", 0, "Random", "Random tiles"},
|
||||
{2, "BOTTOMUP", 0, "Bottom Up", "Expand from bottom"},
|
||||
{3, "RULE_OF_THIRDS", 0, "Rule of Thirds", "Expand from 9 places"},
|
||||
{0, nullptr, 0, nullptr, nullptr},
|
||||
};
|
||||
|
||||
prop = RNA_def_property(srna, "tile_order", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_sdna(prop, nullptr, "custom1");
|
||||
RNA_def_property_enum_items(prop, tileorder_items);
|
||||
RNA_def_property_ui_text(prop, "Tile Order", "Tile order");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
prop = RNA_def_property(srna, "center_x", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "custom3");
|
||||
RNA_def_property_float_default(prop, 0.5f);
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_ui_text(prop, "X", "");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
prop = RNA_def_property(srna, "center_y", PROP_FLOAT, PROP_NONE);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "custom4");
|
||||
RNA_def_property_float_default(prop, 0.5f);
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_ui_text(prop, "Y", "");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
prop = RNA_def_property(srna, "use_alpha", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, nullptr, "custom2", CMP_NODE_OUTPUT_IGNORE_ALPHA);
|
||||
|
|
|
@ -39,8 +39,6 @@ static void node_composit_init_viewer(bNodeTree * /*ntree*/, bNode *node)
|
|||
ImageUser *iuser = MEM_cnew<ImageUser>(__func__);
|
||||
node->storage = iuser;
|
||||
iuser->sfra = 1;
|
||||
node->custom3 = 0.5f;
|
||||
node->custom4 = 0.5f;
|
||||
|
||||
node->id = (ID *)BKE_image_ensure_viewer(G.main, IMA_TYPE_COMPOSITE, "Viewer Node");
|
||||
}
|
||||
|
@ -50,19 +48,6 @@ static void node_composit_buts_viewer(uiLayout *layout, bContext * /*C*/, Pointe
|
|||
uiItemR(layout, ptr, "use_alpha", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
|
||||
}
|
||||
|
||||
static void node_composit_buts_viewer_ex(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
|
||||
{
|
||||
uiLayout *col;
|
||||
|
||||
uiItemR(layout, ptr, "use_alpha", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
|
||||
uiItemR(layout, ptr, "tile_order", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
|
||||
if (RNA_enum_get(ptr, "tile_order") == 0) {
|
||||
col = uiLayoutColumn(layout, true);
|
||||
uiItemR(col, ptr, "center_x", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
|
||||
uiItemR(col, ptr, "center_y", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
using namespace blender::realtime_compositor;
|
||||
|
||||
class ViewerOperation : public NodeOperation {
|
||||
|
@ -276,7 +261,6 @@ void register_node_type_cmp_viewer()
|
|||
cmp_node_type_base(&ntype, CMP_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT);
|
||||
ntype.declare = file_ns::cmp_node_viewer_declare;
|
||||
ntype.draw_buttons = file_ns::node_composit_buts_viewer;
|
||||
ntype.draw_buttons_ex = file_ns::node_composit_buts_viewer_ex;
|
||||
ntype.flag |= NODE_PREVIEW;
|
||||
ntype.initfunc = file_ns::node_composit_init_viewer;
|
||||
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
|
||||
|
|
Loading…
Reference in New Issue
This fails to compile due to missing
prop
declaration.