[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36462] trunk/blender/source/blender/ makesrna/intern/rna_space.c: fix [#27268] 2. 57b Global Pivot Option not functional.
Campbell Barton
ideasman42 at gmail.com
Tue May 3 14:37:16 CEST 2011
Revision: 36462
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36462
Author: campbellbarton
Date: 2011-05-03 12:37:15 +0000 (Tue, 03 May 2011)
Log Message:
-----------
fix [#27268] 2.57b Global Pivot Option not functional.
Modified Paths:
--------------
trunk/blender/source/blender/makesrna/intern/rna_space.c
Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_space.c 2011-05-03 08:45:40 UTC (rev 36461)
+++ trunk/blender/source/blender/makesrna/intern/rna_space.c 2011-05-03 12:37:15 UTC (rev 36462)
@@ -319,6 +319,32 @@
DAG_on_visible_update(bmain, FALSE);
}
+static void rna_SpaceView3D_pivot_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
+{
+ if (U.uiflag & USER_LOCKAROUND) {
+ View3D *v3d_act= (View3D*)(ptr->data);
+
+ /* TODO, space looper */
+ bScreen *screen;
+ for(screen= bmain->screen.first; screen; screen= screen->id.next) {
+ ScrArea *sa;
+ for(sa= screen->areabase.first; sa; sa= sa->next) {
+ SpaceLink *sl;
+ for(sl= sa->spacedata.first; sl ;sl= sl->next) {
+ if(sl->spacetype==SPACE_VIEW3D) {
+ View3D *v3d= (View3D *)sl;
+ if (v3d != v3d_act) {
+ v3d->around= v3d_act->around;
+ v3d->flag= (v3d->flag & ~V3D_ALIGN) | (v3d_act->flag & V3D_ALIGN);
+ ED_area_tag_redraw_regiontype(sa, RGN_TYPE_HEADER);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
static PointerRNA rna_SpaceView3D_region_3d_get(PointerRNA *ptr)
{
View3D *v3d= (View3D*)(ptr->data);
@@ -1277,13 +1303,13 @@
RNA_def_property_enum_sdna(prop, NULL, "around");
RNA_def_property_enum_items(prop, pivot_items);
RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_pivot_update");
prop= RNA_def_property(srna, "use_pivot_point_align", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_ALIGN);
RNA_def_property_ui_text(prop, "Align", "Manipulate object centers only");
RNA_def_property_ui_icon(prop, ICON_ALIGN, 0);
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_pivot_update");
prop= RNA_def_property(srna, "show_manipulator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "twflag", V3D_USE_MANIPULATOR);
More information about the Bf-blender-cvs
mailing list