04-28-2023, 06:47 AM
I'm still working on SVG images for plugins, this time specifically for panel dock icons. I found that when exporting SVG from Illustrator (File > Export for Screens), the art shows as black silhouettes only. I need to go to the gear icon for Format Settings, choose SVG from the list, and change the Styling to "Inline Style." That works for Mac, but In AI 2023 for Windows, panels won't even show, and if they were docked, they disappear from the dock.
I found that the .cpp file needs to explicitly #include "hdicoreSVGIDs.h" even though it copies and runs without doing so.
I define the panel dock images this way in declaring the panel:
hdi::core::SVGWithRolloverIDs(INSP_INSPECTORICON_SVG_RSRC_ID, INSP_INSPECTORICON_DARK_SVG_RSRC_ID)
and this way in the .rc file:
INSP_INSPECTORICON_SVG_RSRC_ID SVG_ INSP_INSPECTORICON_SVG_RSRC_FILE
INSP_INSPECTORICON_SVG_RSRC_NAME SVG_ INSP_INSPECTORICON_SVG_RSRC_FILE
INSP_INSPECTORICON_DARK_SVG_RSRC_ID SVG_ INSP_INSPECTORICON_DARK_SVG_RSRC_FILE
INSP_INSPECTORICON_DARK_SVG_RSRC_NAME SVG_ INSP_INSPECTORICON_DARK_SVG_RSRC_FILE
This works great for Mac, but the panel won't appear in Windows. I changed the panel declaration's SVGWithRolloverIDs to include all four IDs (light/dark plus repeating them for rollovers), but the panel still won't even show in Windows.
Any suggestions would be very much appreciated.
I found that the .cpp file needs to explicitly #include "hdicoreSVGIDs.h" even though it copies and runs without doing so.
I define the panel dock images this way in declaring the panel:
hdi::core::SVGWithRolloverIDs(INSP_INSPECTORICON_SVG_RSRC_ID, INSP_INSPECTORICON_DARK_SVG_RSRC_ID)
and this way in the .rc file:
INSP_INSPECTORICON_SVG_RSRC_ID SVG_ INSP_INSPECTORICON_SVG_RSRC_FILE
INSP_INSPECTORICON_SVG_RSRC_NAME SVG_ INSP_INSPECTORICON_SVG_RSRC_FILE
INSP_INSPECTORICON_DARK_SVG_RSRC_ID SVG_ INSP_INSPECTORICON_DARK_SVG_RSRC_FILE
INSP_INSPECTORICON_DARK_SVG_RSRC_NAME SVG_ INSP_INSPECTORICON_DARK_SVG_RSRC_FILE
This works great for Mac, but the panel won't appear in Windows. I changed the panel declaration's SVGWithRolloverIDs to include all four IDs (light/dark plus repeating them for rollovers), but the panel still won't even show in Windows.
Any suggestions would be very much appreciated.