[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33060] trunk/blender/source/blender/ editors/transform: bugfix [#24697]
Martin Poirier
theeth at yahoo.com
Sun Nov 14 19:27:26 CET 2010
Revision: 33060
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33060
Author: theeth
Date: 2010-11-14 19:27:25 +0100 (Sun, 14 Nov 2010)
Log Message:
-----------
bugfix [#24697]
Proper fix: change the poll function to reflect actual operator requirements.
Modified Paths:
--------------
trunk/blender/source/blender/editors/transform/transform_ops.c
trunk/blender/source/blender/editors/transform/transform_orientations.c
Modified: trunk/blender/source/blender/editors/transform/transform_ops.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_ops.c 2010-11-14 16:31:06 UTC (rev 33059)
+++ trunk/blender/source/blender/editors/transform/transform_ops.c 2010-11-14 18:27:25 UTC (rev 33060)
@@ -171,7 +171,7 @@
/* api callbacks */
ot->invoke = select_orientation_invoke;
ot->exec = select_orientation_exec;
- ot->poll = ED_operator_areaactive;
+ ot->poll = ED_operator_view3d_active;
prop= RNA_def_property(ot->srna, "orientation", PROP_ENUM, PROP_NONE);
RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation");
Modified: trunk/blender/source/blender/editors/transform/transform_orientations.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_orientations.c 2010-11-14 16:31:06 UTC (rev 33059)
+++ trunk/blender/source/blender/editors/transform/transform_orientations.c 2010-11-14 18:27:25 UTC (rev 33060)
@@ -342,17 +342,15 @@
}
void BIF_selectTransformOrientation(bContext *C, TransformOrientation *target) {
+ ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
View3D *v3d = CTX_wm_view3d(C);
- if(v3d) {
- ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
- TransformOrientation *ts = transform_spaces->first;
- int i;
-
- for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) {
- if (ts == target) {
- v3d->twmode = V3D_MANIP_CUSTOM + i;
- break;
- }
+ TransformOrientation *ts = transform_spaces->first;
+ int i;
+
+ for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) {
+ if (ts == target) {
+ v3d->twmode = V3D_MANIP_CUSTOM + i;
+ break;
}
}
}
More information about the Bf-blender-cvs
mailing list