[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28489] branches/render25/source/blender: Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/ blender -r28485:28488
Campbell Barton
ideasman42 at gmail.com
Wed Apr 28 13:06:37 CEST 2010
Revision: 28489
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28489
Author: campbellbarton
Date: 2010-04-28 13:06:37 +0200 (Wed, 28 Apr 2010)
Log Message:
-----------
Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r28485:28488
Modified Paths:
--------------
branches/render25/source/blender/editors/interface/interface_templates.c
branches/render25/source/blender/makesrna/intern/rna_fcurve.c
branches/render25/source/blender/makesrna/intern/rna_space.c
Modified: branches/render25/source/blender/editors/interface/interface_templates.c
===================================================================
--- branches/render25/source/blender/editors/interface/interface_templates.c 2010-04-28 11:05:11 UTC (rev 28488)
+++ branches/render25/source/blender/editors/interface/interface_templates.c 2010-04-28 11:06:37 UTC (rev 28489)
@@ -39,6 +39,7 @@
#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
+#include "BKE_texture.h"
#include "BKE_utildefines.h"
#include "ED_screen.h"
@@ -1438,6 +1439,33 @@
{
ColorBand *coba= coba_v;
+ if(coba->tot > 0) {
+ CBData *xnew, *x1, *x2;
+ float col[4];
+
+ xnew= &coba->data[coba->tot];
+
+ if(coba->tot > 1) {
+ if(coba->cur > 0) {
+ x1= &coba->data[coba->cur-1];
+ x2= &coba->data[coba->cur];
+ }
+ else {
+ x1= &coba->data[coba->cur];
+ x2= &coba->data[coba->cur+1];
+ }
+
+ xnew->pos = x1->pos + ((x2->pos - x1->pos) / 2);
+ }
+
+ do_colorband(coba, xnew->pos, col);
+
+ xnew->r= col[0];
+ xnew->g= col[1];
+ xnew->b= col[2];
+ xnew->a= col[3];
+ }
+
if(coba->tot < MAXCOLORBAND-1) coba->tot++;
coba->cur= coba->tot-1;
Modified: branches/render25/source/blender/makesrna/intern/rna_fcurve.c
===================================================================
--- branches/render25/source/blender/makesrna/intern/rna_fcurve.c 2010-04-28 11:05:11 UTC (rev 28488)
+++ branches/render25/source/blender/makesrna/intern/rna_fcurve.c 2010-04-28 11:06:37 UTC (rev 28489)
@@ -155,6 +155,13 @@
/* ----------- */
+/* note: this function exists only to avoid id refcounting */
+static void rna_DriverTarget_id_set(PointerRNA *ptr, PointerRNA value)
+{
+ DriverTarget *dtar= (DriverTarget*)ptr->data;
+ dtar->id= value.data;
+}
+
static StructRNA *rna_DriverTarget_id_typef(PointerRNA *ptr)
{
DriverTarget *dtar= (DriverTarget*)ptr->data;
@@ -976,7 +983,8 @@
RNA_def_property_struct_type(prop, "ID");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_editable_func(prop, "rna_DriverTarget_id_editable");
- RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_DriverTarget_id_typef");
+ /* note: custom set function is ONLY to avoid rna setting a user for this. */
+ RNA_def_property_pointer_funcs(prop, NULL, "rna_DriverTarget_id_set", "rna_DriverTarget_id_typef");
RNA_def_property_ui_text(prop, "ID", "ID-block that the specific property used can be found from (id_type property must be set first)");
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
Modified: branches/render25/source/blender/makesrna/intern/rna_space.c
===================================================================
--- branches/render25/source/blender/makesrna/intern/rna_space.c 2010-04-28 11:05:11 UTC (rev 28488)
+++ branches/render25/source/blender/makesrna/intern/rna_space.c 2010-04-28 11:06:37 UTC (rev 28489)
@@ -492,6 +492,13 @@
/* Space Properties */
+/* note: this function exists only to avoid id refcounting */
+static void rna_SpaceProperties_pin_id_set(PointerRNA *ptr, PointerRNA value)
+{
+ SpaceButs *sbuts= (SpaceButs*)(ptr->data);
+ sbuts->pinid= value.data;
+}
+
static StructRNA *rna_SpaceProperties_pin_id_typef(PointerRNA *ptr)
{
SpaceButs *sbuts= (SpaceButs*)(ptr->data);
@@ -1193,7 +1200,8 @@
prop= RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pinid");
RNA_def_property_struct_type(prop, "ID");
- RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_SpaceProperties_pin_id_typef");
+ /* note: custom set function is ONLY to avoid rna setting a user for this. */
+ RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceProperties_pin_id_set", "rna_SpaceProperties_pin_id_typef");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, NULL);
More information about the Bf-blender-cvs
mailing list