fix [#30925] successful import of keyconfig dependant on current object context?

revert r34885,

The hack was to fix poselib UI but is REALLY BAD - don't modify properties when accessing them.

This bug must be fixed some other way.
This commit is contained in:
2012-04-13 09:25:50 +00:00
parent 5b55934c79
commit 1add07821b

View File

@@ -1152,10 +1152,6 @@ static int pyrna_string_to_enum(PyObject *item, PointerRNA *ptr, PropertyRNA *pr
return -1;
}
else {
/* hack so that dynamic enums used for operator properties will be able to be built (i.e. context will be supplied to itemf)
* and thus running defining operator buttons for such operators in UI will work */
RNA_def_property_clear_flag(prop, PROP_ENUM_NO_CONTEXT);
if (!RNA_property_enum_value(BPy_GetContext(), ptr, prop, param, val)) {
const char *enum_str = pyrna_enum_as_string(ptr, prop);
PyErr_Format(PyExc_TypeError,