【问题标题】:Why Illustrator convert my paths into groups when exporting to SVG?为什么 Illustrator 在导出到 SVG 时将我的路径转换为组?
【发布时间】:2019-06-17 01:38:40
【问题描述】:

我正在使用 SVG 来配置网站中的头像。图层的 ID 用于更改填充、描边或显示等属性,因此必须明确定义 ID。

我对最后一个模型有疑问。当我将它从 Adob​​e Illustrator CC 导出到 SVG 1.1 时,一些路径会自动转换为包含路径的组。该组具有 ID 而不是路径。

这可能是 Illustrator 版本的问题,我对其他文件进行了相同的处理,并且它们导出得很好。

这是我期望导出的:

<?xml version="1.0" encoding="utf-8"?><!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="8 -9 640.6 640.6" enable-background="new 8 -9 640.6 640.6" xml:space="preserve">
    <g id="chica">
        <g id="peinados">
            <g id="pelo15">
                    <path id="colorpelo" fill="#895C38" d="M258.6,245.7c-..."/>
            </g>
        </g>
    </g>
</svg>

这就是发生的事情(Illustrator 将 ID 为“colorpelo_55_”的路径放在一个组内,并为该组提供 ID):

<?xml version="1.0" encoding="utf-8"?><!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="8 -9 640.6 640.6" enable-background="new 8 -9 640.6 640.6" xml:space="preserve">
    <g id="chica">
        <g id="peinados">
            <g id="pelo15">
                <g id="colorpelo_55_">
                    <path fill="#895C38" d="M258.6,245.7c-..."/>
                </g>
            </g>
        </g>
    </g>
</svg>

为什么会这样?如何在不手动进行的情况下修复它? (有数百个图层名称要更改)。

谢谢!

可下载的文件: https://drive.google.com/open?id=1ztkXVjbqvQmh77dLTAQM7NGwPfUHsUJd

【问题讨论】:

    标签: svg adobe-illustrator


    【解决方案1】:

    最后是关于应用了一个书法画笔(看不到,但它就在那里)。如果有人对完整答案感兴趣,请查看此链接: https://forums.adobe.com/message/10886713

    【讨论】:

      猜你喜欢
      • 2013-05-18
      • 2013-06-25
      • 1970-01-01
      • 2017-08-23
      • 1970-01-01
      • 1970-01-01
      • 2010-09-14
      • 2020-11-02
      • 2016-12-02
      相关资源
      最近更新 更多