[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22500] branches/blender2.5/blender/source /blender: missing args for rna funciton.

Campbell Barton ideasman42 at gmail.com
Sun Aug 16 06:59:12 CEST 2009


Revision: 22500
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22500
Author:   campbellbarton
Date:     2009-08-16 06:59:11 +0200 (Sun, 16 Aug 2009)

Log Message:
-----------
missing args for rna funciton. comment on rna leak with type registering that I haven't been able to fix yet.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_material.c
    branches/blender2.5/blender/source/blender/python/intern/bpy_rna.c

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_material.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_material.c	2009-08-16 03:59:39 UTC (rev 22499)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_material.c	2009-08-16 04:59:11 UTC (rev 22500)
@@ -1209,7 +1209,7 @@
 
 	prop= RNA_def_property(srna, "emit", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_range(prop, 0, FLT_MAX);
-	RNA_def_property_ui_range(prop, 0, 2.0f);
+	RNA_def_property_ui_range(prop, 0, 2.0f, 10, 2);
 	RNA_def_property_ui_text(prop, "Emit", "Amount of light to emit.");
 	RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
 

Modified: branches/blender2.5/blender/source/blender/python/intern/bpy_rna.c
===================================================================
--- branches/blender2.5/blender/source/blender/python/intern/bpy_rna.c	2009-08-16 03:59:39 UTC (rev 22499)
+++ branches/blender2.5/blender/source/blender/python/intern/bpy_rna.c	2009-08-16 04:59:11 UTC (rev 22500)
@@ -3085,6 +3085,16 @@
 	RNA_PROP_END;
 }
 
+/* Note! MemLeak XXX
+ *
+ * There is currently a bug where moving registering a python class does
+ * not properly manage refcounts from the python class, since the srna owns
+ * the python class this should not be so tricky but changing the references as
+ * youd 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)
+ * - Should still be fixed - Campbell
+ * */
+
 PyObject *pyrna_basetype_register(PyObject *self, PyObject *py_class)
 {
 	bContext *C= NULL;





More information about the Bf-blender-cvs mailing list