Merge branch 'master' into blender2.8
[blender.git] / source / blender / makesrna / intern / rna_nodetree.c
index 99ec0c00ac6790854fe91cbb855f8199c1d97016..55ac8a32d807ec83757a696a9b503f054a31f99e 100644 (file)
@@ -75,6 +75,13 @@ EnumPropertyItem rna_enum_node_socket_in_out_items[] = {
 };
 
 #ifndef RNA_RUNTIME
+static EnumPropertyItem rna_enum_node_socket_draw_shape_items[] = {
+       {SOCK_DRAW_SHAPE_CIRCLE, "CIRCLE", 0, "Circle", ""},
+       {SOCK_DRAW_SHAPE_SQUARE, "SQUARE", 0, "Square", ""},
+       {SOCK_DRAW_SHAPE_DIAMOND, "DIAMOND", 0, "Diamond", ""},
+       {0, NULL, 0, NULL, NULL }
+};
+
 static EnumPropertyItem node_socket_type_items[] = {
        {SOCK_CUSTOM,  "CUSTOM",    0,    "Custom",    ""},
        {SOCK_FLOAT,   "VALUE",     0,    "Value",     ""},
@@ -7009,6 +7016,13 @@ static void rna_def_node_socket(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Type", "Data type");
        RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeSocket_update");
 
+       prop = RNA_def_property(srna, "draw_shape", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_sdna(prop, NULL, "draw_shape");
+       RNA_def_property_enum_items(prop, rna_enum_node_socket_draw_shape_items);
+       RNA_def_property_enum_default(prop, SOCK_DRAW_SHAPE_CIRCLE);
+       RNA_def_property_ui_text(prop, "Shape", "Socket shape");
+       RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_NodeSocket_update");
+
        /* registration */
        prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
        RNA_def_property_string_sdna(prop, NULL, "typeinfo->idname");