forked from bartvdbraak/blender
bugfix [#24697]
Proper fix: change the poll function to reflect actual operator requirements.
This commit is contained in:
parent
bc7903c858
commit
7f0877f0dc
@ -171,7 +171,7 @@ void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot)
|
||||
/* 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");
|
||||
|
@ -342,17 +342,15 @@ void BIF_removeTransformOrientationIndex(bContext *C, int index) {
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user