Add child visible support for layers
This commit is contained in:
parent
1e2f9ac79e
commit
f12f23e8a3
@ -29,6 +29,8 @@ unless they have the following names:
|
|||||||
|
|
||||||
* (visible): The layer is always visible, regardless if it's specified in `#active_layers`
|
* (visible): The layer is always visible, regardless if it's specified in `#active_layers`
|
||||||
* (protect): The layer will not be deleted if it is hidden. Good for clone sources.
|
* (protect): The layer will not be deleted if it is hidden. Good for clone sources.
|
||||||
|
* (child visible): The layer will be visible if its parent layer is also made visible. Good if you
|
||||||
|
break artwork up into multiple layers (inks, colors, shading, etc.)
|
||||||
|
|
||||||
Hiding/showing layers is the way that you make certain card elements appear/disappear on
|
Hiding/showing layers is the way that you make certain card elements appear/disappear on
|
||||||
different types of cards with with different properties. You can also replace the text in
|
different types of cards with with different properties. You can also replace the text in
|
||||||
|
@ -32,6 +32,18 @@ module SVGGVS
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
loop do
|
||||||
|
any_changed = false
|
||||||
|
css("g[inkscape|groupmode='layer']").each do |layer|
|
||||||
|
if layer['inkscape:label'].include?('(child visible)') && layer['style'] != '' && layer.parent['style'] == ''
|
||||||
|
layer['style'] = ''
|
||||||
|
|
||||||
|
any_changed = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
break if !any_changed
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def replacements=(replacements)
|
def replacements=(replacements)
|
||||||
|
Loading…
Reference in New Issue
Block a user