misc py/rna changes
- running a script from a file now uses the PyRun_File(FILE *, ...) rather then PyRun_String("exec(open(r'/somepath.py').read())"...), aparently FILE struct on windows could not ensured to be the same between blender and python, since we use our own python on windows now it should be ok.
- generating docs works again (operator update for py style syntax broke them)
- python operator doc strings was being overwritten
- added rna property attribute "default" to get the default value of a property, not working on arrays currently because variable length arrays are not supported.
This commit is contained in:
@@ -265,8 +265,8 @@ void PYTHON_OT_wrapper(wmOperatorType *ot, void *userdata)
|
||||
}
|
||||
|
||||
item= PyObject_GetAttrString(py_class, PYOP_ATTR_DESCRIPTION);
|
||||
ot->description= (item && PyUnicode_Check(item)) ? _PyUnicode_AsString(item):"";
|
||||
Py_DECREF(item);
|
||||
ot->description= (item && PyUnicode_Check(item)) ? _PyUnicode_AsString(item):"undocumented python operator";
|
||||
Py_XDECREF(item);
|
||||
|
||||
/* api callbacks, detailed checks dont on adding */
|
||||
if (PyObject_HasAttrString(py_class, "invoke"))
|
||||
|
||||
Reference in New Issue
Block a user