[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40314] branches/soc-2011-radish/source/ blender/makesrna/intern/rna_scene.c: added back scene/ object update function, its needed for multipaint switching.
Campbell Barton
ideasman42 at gmail.com
Sun Sep 18 05:29:20 CEST 2011
Revision: 40314
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40314
Author: campbellbarton
Date: 2011-09-18 03:29:17 +0000 (Sun, 18 Sep 2011)
Log Message:
-----------
added back scene/object update function, its needed for multipaint switching.
Modified Paths:
--------------
branches/soc-2011-radish/source/blender/makesrna/intern/rna_scene.c
Modified: branches/soc-2011-radish/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- branches/soc-2011-radish/source/blender/makesrna/intern/rna_scene.c 2011-09-18 02:46:03 UTC (rev 40313)
+++ branches/soc-2011-radish/source/blender/makesrna/intern/rna_scene.c 2011-09-18 03:29:17 UTC (rev 40314)
@@ -1044,6 +1044,22 @@
}
}
+/* Jason */
+
+/* note: without this, when Multi-Paint is activated/deactivated, the colors
+ * will not change right away when multiple bones are selected, this function
+ * is not for general use and only for the few cases where changing scene
+ * settings and NOT for general purpose updates, possibly this should be
+ * given its own notifier. */
+static void rna_Scene_update_active_object_data(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ Object *ob= OBACT;
+ if(ob) {
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ WM_main_add_notifier(NC_OBJECT|ND_DRAW, &ob->id);
+ }
+}
+
#else
static void rna_def_transform_orientation(BlenderRNA *brna)
@@ -1124,10 +1140,10 @@
prop = RNA_def_property(srna, "use_multipaint", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "multipaint", 1);
- RNA_def_property_ui_text(prop, "WPaint Multi-Paint",
- "Paint across all selected bones while "
- "weight painting");
- RNA_def_property_update(prop, NC_GEOM|ND_DATA, 0);
+ RNA_def_property_ui_text(prop, "WPaint Multi-Paint",
+ "Paint across all selected bones while "
+ "weight painting");
+ RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
prop= RNA_def_property(srna, "vertex_paint", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "vpaint");
More information about the Bf-blender-cvs
mailing list