@@ -26,8 +26,7 @@ static PyObject *py_ue_edgraphpin_make_link_to(ue_PyEdGraphPin *self, PyObject *
2626 FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified (bp);
2727 }
2828
29- Py_INCREF (Py_None);
30- return Py_None;
29+ Py_RETURN_NONE;
3130}
3231
3332static PyObject *py_ue_edgraphpin_connect (ue_PyEdGraphPin *self, PyObject * args)
@@ -54,8 +53,7 @@ static PyObject *py_ue_edgraphpin_connect(ue_PyEdGraphPin *self, PyObject * args
5453 FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified (bp);
5554 }
5655
57- Py_INCREF (Py_None);
58- return Py_None;
56+ Py_RETURN_NONE;
5957}
6058
6159static PyObject *py_ue_edgraphpin_break_link_to (ue_PyEdGraphPin *self, PyObject * args)
@@ -79,8 +77,7 @@ static PyObject *py_ue_edgraphpin_break_link_to(ue_PyEdGraphPin *self, PyObject
7977 FBlueprintEditorUtils::MarkBlueprintAsStructurallyModified (bp);
8078 }
8179
82- Py_INCREF (Py_None);
83- return Py_None;
80+ Py_RETURN_NONE;
8481}
8582
8683static PyMethodDef ue_PyEdGraphPin_methods[] = {
@@ -124,7 +121,7 @@ static PyObject *py_ue_edgraphpin_get_default_value(ue_PyEdGraphPin *self, void
124121
125122static int py_ue_edgraphpin_set_default_value (ue_PyEdGraphPin *self, PyObject *value, void *closure)
126123{
127- if (value && PyUnicode_Check (value))
124+ if (value && PyUnicodeOrString_Check (value))
128125 {
129126 const char *str = UEPyUnicode_AsUTF8 (value);
130127 self->pin ->DefaultValue = UTF8_TO_TCHAR (str);
@@ -141,7 +138,7 @@ static PyObject *py_ue_edgraphpin_get_default_text_value(ue_PyEdGraphPin *self,
141138
142139static int py_ue_edgraphpin_set_default_text_value (ue_PyEdGraphPin *self, PyObject *value, void *closure)
143140{
144- if (value && PyUnicode_Check (value))
141+ if (value && PyUnicodeOrString_Check (value))
145142 {
146143 const char *str = UEPyUnicode_AsUTF8 (value);
147144 self->pin ->DefaultTextValue = FText::FromString (UTF8_TO_TCHAR (str));
@@ -175,10 +172,51 @@ static int py_ue_edgraphpin_set_default_object(ue_PyEdGraphPin *self, PyObject *
175172 return -1 ;
176173}
177174
175+ static int py_ue_edgraphpin_set_category (ue_PyEdGraphPin *self, PyObject *value, void *closure)
176+ {
177+ if (value && PyUnicodeOrString_Check (value))
178+ {
179+ const char *str = UEPyUnicode_AsUTF8 (value);
180+ #if ENGINE_MINOR_VERSION > 18
181+ self->pin ->PinType .PinCategory = FName (UTF8_TO_TCHAR (str));
182+ #else
183+ self->pin ->PinType .PinCategory = FString (UTF8_TO_TCHAR (str));
184+ #endif
185+ return 0 ;
186+ }
187+ PyErr_SetString (PyExc_TypeError, " value is not a string" );
188+ return -1 ;
189+ }
190+
191+ static int py_ue_edgraphpin_set_sub_category (ue_PyEdGraphPin *self, PyObject *value, void *closure)
192+ {
193+ if (value)
194+ {
195+ if (ue_is_pyuobject (value))
196+ {
197+ ue_PyUObject *py_obj = (ue_PyUObject *)value;
198+ self->pin ->PinType .PinSubCategoryObject = py_obj->ue_object ;
199+ return 0 ;
200+ }
201+ if (PyUnicodeOrString_Check (value))
202+ {
203+ const char *str = UEPyUnicode_AsUTF8 (value);
204+ #if ENGINE_MINOR_VERSION > 18
205+ self->pin ->PinType .PinSubCategory = FName (UTF8_TO_TCHAR (str));
206+ #else
207+ self->pin ->PinType .PinSubCategory = FString (UTF8_TO_TCHAR (str));
208+ #endif
209+ return 0 ;
210+ }
211+ }
212+ PyErr_SetString (PyExc_TypeError, " value is not a UObject" );
213+ return -1 ;
214+ }
215+
178216static PyGetSetDef ue_PyEdGraphPin_getseters[] = {
179217 { (char *)" name" , (getter)py_ue_edgraphpin_get_name, NULL , (char *)" " , NULL },
180- { (char *)" category" , (getter)py_ue_edgraphpin_get_category, NULL , (char *)" " , NULL },
181- { (char *)" sub_category" , (getter)py_ue_edgraphpin_get_sub_category, NULL , (char *)" " , NULL },
218+ { (char *)" category" , (getter)py_ue_edgraphpin_get_category, (setter)py_ue_edgraphpin_set_category , (char *)" " , NULL },
219+ { (char *)" sub_category" , (getter)py_ue_edgraphpin_get_sub_category, (setter)py_ue_edgraphpin_set_sub_category , (char *)" " , NULL },
182220 { (char *)" default_value" , (getter)py_ue_edgraphpin_get_default_value, (setter)py_ue_edgraphpin_set_default_value, (char *)" " , NULL },
183221 { (char *)" default_text_value" , (getter)py_ue_edgraphpin_get_default_text_value, (setter)py_ue_edgraphpin_set_default_text_value, (char *)" " , NULL },
184222 { (char *)" default_object" , (getter)py_ue_edgraphpin_get_default_object, (setter)py_ue_edgraphpin_set_default_object, (char *)" " , NULL },
0 commit comments