I need to spray-paint a number of clones inside a group using an object outside the group as a template. Because spray-painting using a template that is outside the group always places the clones outside the group, I need a way to add them to the group after I create them. How do I do this? There doesn't seem to be a menu option for it and I would rather not edit the svg file's text to move the clones into the group manually, as this can create all sorts of problems.
Alternatively, can I somehow spray-paint the clones directly into the group if the template stays outside the group?
The spray can creates clones at the same group level as the template. You must temporarily move the template into the target group or a new group.
Select the target group and the template and create a new group [shift+g]. Open this new group [double click], select the template and start spraying. All the clones will be part of the new group. When you're finished, go back to the Select tool [s or spacebar]. Right-click the template and [Pop selection out of group].
This won't work. The problem is that this will create two groups, the original group being inside the new group. However, I explicitly need to use clones of the old group in my work, which will not contain anything spray-painted into the new group if I use this method.
I've just tested this and I can bring the template into the group using the XML editor, spray-paint while it's in the group and then take it out of the group, either via the XML editor or by popping it out of the group. The clones remain clones after the procedure.
It's ugly, but it works (barely). Still, for something as basic as adding objects to a group, I feel Inkscape should provide a straightforward solution. Should I submit this as a feature request?
Select the target group and the template and create a new group [shift+g]. Open this new group [double click], select the template and start spraying. All the clones will be part of the new group. When you're finished, go back to the Select tool [s or spacebar]. Right-click the template and [Pop selection out of group].
In the new group select all the clones then cut and paste them into the target subgroup. Finally select the "new group" that you created and ungroup [shift+ctrl+g]. The initial group structure is restored.
Select the source object. Create a group of one [ctrl+g]. Open this new group [double-click]. Select the source object again. Pick up the spray can [a] and have at it. Back to the select tool [s] and invert selection [shift+1] or [!] to select all the sprayed clones. Cut [ctrl+x]. Open the target group and paste in place [ctrl+alt+v]. Now select the "group of one" and ungroup [shift+ctrl+g].
Open the target group. Select the source object using [ctrl+click] to select outside the active group. Start spraying! The clones appear in the active target group.
(I edited my first comment based on this method.)
I'm confused today. Please ignore this. This doesn't work at all!
Select the source object. Create a group of one [ctrl+g]. Open this new group [double-click]. Select the source object again. Pick up the spray can [a] and have at it. Back to the select tool [s] and invert selection [shift+1] or [!] to select all the sprayed clones. Cut [ctrl+x]. Open the target group and paste in place [ctrl+alt+v]. Now select the "group of one" and ungroup [shift+ctrl+g].
I need to spray-paint a number of clones inside a group using an object outside the group as a template. Because spray-painting using a template that is outside the group always places the clones outside the group, I need a way to add them to the group after I create them. How do I do this? There doesn't seem to be a menu option for it and I would rather not edit the svg file's text to move the clones into the group manually, as this can create all sorts of problems.
Alternatively, can I somehow spray-paint the clones directly into the group if the template stays outside the group?
The spray can creates clones at the same group level as the template. You must temporarily move the template into the target group or a new group.
Select the target group and the template and create a new group [shift+g]. Open this new group [double click], select the template and start spraying. All the clones will be part of the new group. When you're finished, go back to the Select tool [s or spacebar]. Right-click the template and [Pop selection out of group].
This won't work. The problem is that this will create two groups, the original group being inside the new group. However, I explicitly need to use clones of the old group in my work, which will not contain anything spray-painted into the new group if I use this method.
I tried a couple of tricks, convert layer>group and back again.
It seems that as soon as you move the original pattern out of the layer / group it all gets converted to shapes instead of clones.
Interesting.
I've just tested this and I can bring the template into the group using the XML editor, spray-paint while it's in the group and then take it out of the group, either via the XML editor or by popping it out of the group. The clones remain clones after the procedure.
It's ugly, but it works (barely). Still, for something as basic as adding objects to a group, I feel Inkscape should provide a straightforward solution. Should I submit this as a feature request?
Yes, you can do at the gitlab inkscape site.
https://gitlab.com/inkscape/inbox
I omitted the finishing steps in the workflow above:
In the new group select all the clones then cut and paste them into the target subgroup. Finally select the "new group" that you created and ungroup [shift+ctrl+g]. The initial group structure is restored.
As I wrote that I worked out a simpler method.
Select the source object. Create a group of one [ctrl+g]. Open this new group [double-click].
Select the source object again. Pick up the spray can [a] and have at it.
Back to the select tool [s] and invert selection [shift+1] or [!] to select all the sprayed clones. Cut [ctrl+x].
Open the target group and paste in place [ctrl+alt+v].
Now select the "group of one" and ungroup [shift+ctrl+g].
I'm inspired today.Open the target group. Select the source object using [ctrl+click] to select outside the active group. Start spraying! The clones appear in the active target group.(I edited my first comment based on this method.)I'm confused today. Please ignore this. This doesn't work at all!
This worked perfectly! Thank you.