[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23726] trunk/blender/source/blender/ python/intern/bpy_rna.c: Partial revert of rev 23723
Brecht Van Lommel
brecht at blender.org
Fri Oct 9 11:06:18 CEST 2009
Hi Martin,
This is indeed the right fix. I made this change as a test locally but
decided it was not a good idea, and forgot to revert this file.
Thanks,
Brecht.
On Fri, Oct 9, 2009 at 3:34 AM, Martin Poirier <theeth at yahoo.com> wrote:
> Revision: 23726
> http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23726
> Author: theeth
> Date: 2009-10-09 03:34:46 +0200 (Fri, 09 Oct 2009)
>
> Log Message:
> -----------
> Partial revert of rev 23723
>
> BRECHT, CHECK THIS
>
> The change made it return RNA python properties with null data pointer instead of None.
>
> That would make the particles and physics properties crash like this:
>
> 1. A valid property instead of None makes is seem like smoke (or other) modifier data is in context when it is Null.
> 2. UI code would try to access RNA properties of the (Null) modifier, which would crash
>
> Revision Links:
> --------------
> http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23723
>
> Modified Paths:
> --------------
> trunk/blender/source/blender/python/intern/bpy_rna.c
>
> Modified: trunk/blender/source/blender/python/intern/bpy_rna.c
> ===================================================================
> --- trunk/blender/source/blender/python/intern/bpy_rna.c 2009-10-08 19:32:06 UTC (rev 23725)
> +++ trunk/blender/source/blender/python/intern/bpy_rna.c 2009-10-09 01:34:46 UTC (rev 23726)
> @@ -433,7 +433,7 @@
> {
> PointerRNA newptr;
> newptr= RNA_property_pointer_get(ptr, prop);
> - if (newptr.type) {
> + if (newptr.data) {
> ret = pyrna_struct_CreatePyObject(&newptr);
> } else {
> ret = Py_None;
> @@ -1297,7 +1297,7 @@
>
> CTX_data_get(self->ptr.data, name, &newptr, &newlb);
>
> - if (newptr.type) {
> + if (newptr.data) {
> ret = pyrna_struct_CreatePyObject(&newptr);
> }
> else if (newlb.first) {
>
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>
>
More information about the Bf-committers
mailing list