Aeoll / ae_SVG

SVG Importer and Exporter for Houdini
GNU Lesser General Public License v3.0
101 stars 10 forks source link

Does this import the color from svg? #6

Open aforestsociety opened 3 years ago

aforestsociety commented 3 years ago

Im wondering if this svg importer is able to import a color attribute based on the color assigned to the svg. As of now it seems everything gets imported with a white Cd attribute, no matter how you color it. It has a class attribute based on the groups in Affinity Designer, but isnt exactly what I'm looking for. Is there something im doing wrong or is it not possible at the moment. Thank you.

bfgdebello commented 2 months ago

The original setup is most likely used for Adobe Illustrator. I am using Inkscape for creating an SVG and I needed to change this line inside the Python node "SVG_IMPORT_UPDATED" for the colour attribute. Line 100 has this: f = path.get("stroke").replace('#', ''), which is setup for Illustrator files. This was changed to this to get the Color Attribute on Stroke f = path.get("style").split(';')[1].replace('stroke:#', '')

In the Geometry Spreadsheet in Primitives, you should see the proper Colour attributes on the stroke if they are set correctly.