fix [#30925] successful import of keyconfig dependant on current object context?
authorCampbell Barton <ideasman42@gmail.com>
Fri, 13 Apr 2012 09:25:50 +0000 (09:25 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 13 Apr 2012 09:25:50 +0000 (09:25 +0000)
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.

source/blender/python/intern/bpy_rna.c

index aea22b3a1b416e61e3c77065080c32998f9bdb70..7259ea8e2f57a436021d5d49ea34c0f5e8d64f78 100644 (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,