Hi, I'm coding with Illustrator SDK CC 2015 on Visual Studio 2013. I had a problem processing multiple strokes on a PathArt. When I try to hide one of the strokes, I found that the most appropriate function AIArtStyleParserSuite::SetPaintFieldVisible didn't take effect at all. It was not working on the SnippetRunner sample in the SDK either. Attached is the code. When I call GetPaintFieldVisible right after setting visible=false, the output of visible is true. Could anyone please tell me the possible reason?
AIBoolean visible = false; sAIArtStyleParser->SetPaintFieldVisible(artStyle, paintField, visible); sAIArtStyleParser->GetPaintFieldVisible(paintField, &visible); of << "visible " << i << " " << visible << endl;
Just fixed the problem myself... For single path, use SetParserPaintFieldVisible instead of SetPaintFieldVisible
Also need create new art style and apply to the pathart.
However, it seems GetPaintFieldVisible still don't work right after hiding the path. I guess it requires another call to get paintField from the new artStyle and parser.
AIBoolean visible = false;
error = sAIArtStyleParser->CreateNewStyle(parser, &artStyle);
error = sAIArtStyle->SetArtStyle(artHandle, artStyle);
of << "visible " << i << " " << visible << endl;