Revision: 38850
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38850
Author:   campbellbarton
Date:     2011-07-30 13:18:04 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
bpy fix for crash/assert on running dir() on a non collection property + some 
other minor corrections.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/transform/transform.c
    trunk/blender/source/blender/makesrna/intern/rna_wm_api.c
    trunk/blender/source/blender/python/intern/bpy_rna.c

Modified: trunk/blender/source/blender/editors/transform/transform.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform.c  2011-07-30 
11:03:18 UTC (rev 38849)
+++ trunk/blender/source/blender/editors/transform/transform.c  2011-07-30 
13:18:04 UTC (rev 38850)
@@ -4659,7 +4659,7 @@
 #define EDGE_SLIDE_MIN 30
        if (len_squared_v2v2(start, end) < (EDGE_SLIDE_MIN * EDGE_SLIDE_MIN)) {
                if(ABS(start[0]-end[0]) + ABS(start[1]-end[1]) < 4.0f) {
-                       /* even more exceptional case, points are ontop of 
eachother */
+                       /* even more exceptional case, points are ontop of each 
other */
                        end[0]= start[0];
                        end[1]= start[1] + EDGE_SLIDE_MIN;
                }

Modified: trunk/blender/source/blender/makesrna/intern/rna_wm_api.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_wm_api.c   2011-07-30 
11:03:18 UTC (rev 38849)
+++ trunk/blender/source/blender/makesrna/intern/rna_wm_api.c   2011-07-30 
13:18:04 UTC (rev 38850)
@@ -205,7 +205,7 @@
 
        /* check */
        func= RNA_def_function(srna, "check", NULL);
-       RNA_def_function_ui_description(func, "Check the operator settings.");
+       RNA_def_function_ui_description(func, "Check the operator settings, 
return True to signal a change to redraw.");
        RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
        parm= RNA_def_pointer(func, "context", "Context", "", "");
        RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);

Modified: trunk/blender/source/blender/python/intern/bpy_rna.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_rna.c        2011-07-30 
11:03:18 UTC (rev 38849)
+++ trunk/blender/source/blender/python/intern/bpy_rna.c        2011-07-30 
13:18:04 UTC (rev 38850)
@@ -3262,11 +3262,15 @@
         * */
        ret= PyList_New(0);
 
-       if (!BPy_PropertyRNA_CheckExact(self))
+       if (!BPy_PropertyRNA_CheckExact(self)) {
                pyrna_dir_members_py(ret, (PyObject *)self);
+       }
 
-       if(RNA_property_collection_type_get(&self->ptr, self->prop, &r_ptr))
-               pyrna_dir_members_rna(ret, &r_ptr);
+       if(RNA_property_type(prop) == PROP_COLLECTION) {
+               if(RNA_property_collection_type_get(&self->ptr, self->prop, 
&r_ptr)) {
+                       pyrna_dir_members_rna(ret, &r_ptr);
+               }
+       }
 
        return ret;
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to