Merge branch 'blender-v4.4-release'

This commit is contained in:
Campbell Barton
2025-03-06 15:54:08 +11:00
3 changed files with 9 additions and 0 deletions

View File

@@ -584,6 +584,8 @@ bool ED_operator_nla_active(bContext *C);
bool ED_operator_info_active(bContext *C);
bool ED_operator_console_active(bContext *C);
/** Only check there is an active object (no visibility check). */
bool ED_operator_object_active_only(bContext *C);
bool ED_operator_object_active(bContext *C);
bool ED_operator_object_active_editable_ex(bContext *C, const Object *ob);
bool ED_operator_object_active_editable(bContext *C);

View File

@@ -2566,6 +2566,7 @@ void OBJECT_OT_modifier_set_active(wmOperatorType *ot)
ot->invoke = modifier_set_active_invoke;
ot->exec = modifier_set_active_exec;
ot->poll = ED_operator_object_active_only;
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
edit_modifier_properties(ot);

View File

@@ -410,6 +410,12 @@ static bool ed_object_hidden(const Object *ob)
return ((ob->visibility_flag & OB_HIDE_VIEWPORT) && !(ob->mode & OB_MODE_EDIT));
}
bool ED_operator_object_active_only(bContext *C)
{
Object *ob = blender::ed::object::context_active_object(C);
return (ob != nullptr);
}
bool ED_operator_object_active(bContext *C)
{
Object *ob = blender::ed::object::context_active_object(C);