Fix #122491: DOF pick in context menu grayed out
Caused by 7f8d4df410
Changes in poll function had excluded the case of context menu button.
Fix this by returning true if operator identifier is `UI_OT_eyedropper_depth`
Pull Request: https://projects.blender.org/blender/blender/pulls/122532
This commit is contained in:
committed by
Pratik Borhade
parent
f1bf9d366c
commit
ab5f8d9f3a
@@ -442,6 +442,11 @@ static bool depthdropper_poll(bContext *C)
|
||||
if (but->icon == ICON_EYEDROPPER) {
|
||||
return true;
|
||||
}
|
||||
/* Context menu button. */
|
||||
if (but->optype && STREQ(but->optype->idname, "UI_OT_eyedropper_depth")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((but->type == UI_BTYPE_NUM) && (prop != nullptr) &&
|
||||
(RNA_property_type(prop) == PROP_FLOAT) &&
|
||||
(RNA_property_subtype(prop) & PROP_UNIT_LENGTH) &&
|
||||
|
||||
Reference in New Issue
Block a user