GPv3: Expose Shader FX in the UI
Enables GPv3 in the UI poll functions for shader FX.
This commit is contained in:
@@ -61,7 +61,7 @@ ShaderFxData *shaderfx_add(
|
||||
ShaderFxData *new_fx = nullptr;
|
||||
const ShaderFxTypeInfo *fxi = BKE_shaderfx_get_info(ShaderFxType(type));
|
||||
|
||||
if (ob->type != OB_GPENCIL_LEGACY) {
|
||||
if (!ELEM(ob->type, OB_GPENCIL_LEGACY, OB_GREASE_PENCIL)) {
|
||||
BKE_reportf(reports, RPT_WARNING, "Effect cannot be added to object '%s'", ob->id.name + 2);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ static bool buttons_context_path_shaderfx(ButsContextPath *path)
|
||||
if (buttons_context_path_object(path)) {
|
||||
Object *ob = static_cast<Object *>(path->ptr[path->len - 1].data);
|
||||
|
||||
if (ob && ELEM(ob->type, OB_GPENCIL_LEGACY)) {
|
||||
if (ob && ELEM(ob->type, OB_GPENCIL_LEGACY, OB_GREASE_PENCIL)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ static bool shaderfx_ui_poll(const bContext *C, PanelType * /*pt*/)
|
||||
{
|
||||
Object *ob = blender::ed::object::context_active_object(C);
|
||||
|
||||
return (ob != nullptr) && (ob->type == OB_GPENCIL_LEGACY);
|
||||
return (ob != nullptr) && (ELEM(ob->type, OB_GPENCIL_LEGACY, OB_GREASE_PENCIL));
|
||||
}
|
||||
|
||||
PanelType *shaderfx_panel_register(ARegionType *region_type, ShaderFxType type, PanelDrawFn draw)
|
||||
|
||||
Reference in New Issue
Block a user