Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/intern/bpy_rna.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 8,731 Lines • ▼ Show 20 Lines | #if 0 /* XXX - should be able to do this, but makes Python crash on exit. */ | ||||
| bpy_class_free(py_ptr); | bpy_class_free(py_ptr); | ||||
| #endif | #endif | ||||
| RNA_struct_py_type_set(srna, NULL); | RNA_struct_py_type_set(srna, NULL); | ||||
| } | } | ||||
| } | } | ||||
| RNA_PROP_END; | RNA_PROP_END; | ||||
| } | } | ||||
| /* Note! MemLeak XXX | /** | ||||
| * \warning memory leak! | |||||
| * | * | ||||
| * There is currently a bug where moving the registration of a Python class does | * There is currently a bug where moving the registration of a Python class does | ||||
| * not properly manage reference-counts from the Python class. As the srna owns | * not properly manage reference-counts from the Python class. As the `srna` owns | ||||
| * the Python class this should not be so tricky, but changing the references as | * the Python class this should not be so tricky, but changing the references as | ||||
| * you'd expect when changing ownership crashes blender on exit so I had to comment out | * you'd expect when changing ownership crashes blender on exit so I had to comment out | ||||
| * the decref. This is not so bad because the leak only happens when re-registering (hold F8) | * the #Py_DECREF. This is not so bad because the leak only happens when re-registering | ||||
| * (continuously running `SCRIPT_OT_reload`). | |||||
| * - Should still be fixed - Campbell | * - Should still be fixed - Campbell | ||||
| * */ | */ | ||||
| PyDoc_STRVAR(pyrna_register_class_doc, | PyDoc_STRVAR(pyrna_register_class_doc, | ||||
| ".. method:: register_class(cls)\n" | ".. method:: register_class(cls)\n" | ||||
| "\n" | "\n" | ||||
| " Register a subclass of a Blender type class.\n" | " Register a subclass of a Blender type class.\n" | ||||
| "\n" | "\n" | ||||
| " :arg cls: Blender type class in:\n" | " :arg cls: Blender type class in:\n" | ||||
| " :class:`bpy.types.Panel`, :class:`bpy.types.UIList`,\n" | " :class:`bpy.types.Panel`, :class:`bpy.types.UIList`,\n" | ||||
| " :class:`bpy.types.Menu`, :class:`bpy.types.Header`,\n" | " :class:`bpy.types.Menu`, :class:`bpy.types.Header`,\n" | ||||
| ▲ Show 20 Lines • Show All 389 Lines • Show Last 20 Lines | |||||