Locking one object in a group
-
enjoymoreradio
- Posts: 2
- Joined: Wed Jul 25, 2012 6:32 pm
Locking one object in a group
Haven't been using Inkscape long, and have run up against a problem. I've put together a soccer shirt template, which is comprised of a bunch of separate objects, so I can include stripes, different colored sleeves, etc., without dealing with the pain that is pattern creation. Unfortunately, in order to make this work, I have another part that outlines the whole thing, but which has no fill. This works very well. Unfortunately, if I want to change the color of the whole shirt, and I select the group and change the fill color, the fill of the outline object also changes. I tried locking the outline object, and then putting in the group, but that doesn't seem to work. Any alternatives, or things I have overlooked?
Re: Locking one object in a group
You probably want to use the clip effect, which uses an object's shape to hide everything in its 'clip group' that falls outside the clipping shape but the clipping shape remains invisible. Your preferences select either top or bottom clipping, but basically you just select everything you want clipped, put the clipping path in the right place, and go to object menu>clip>set. clips can be adjusted with the
without undoing the clip.
without undoing the clip.Your mind is what you think it is.
- flamingolady
- Posts: 687
- Joined: Wed Jun 10, 2009 1:40 pm
Re: Locking one object in a group
Another method that I use - I would keep the outline (that has no fill), on a separate layer below the others, then, when you want to change the color, just hide that outline layer, change the colors, then re-open it.
What I do when using this method is to then select all objects when done editing, duplicate (ctrl +D), then group it, and move just the grouped item to a new layer (I could call the layer something like grouped orange tee shirt), if you do this, it's best to create the 'grouped orange tee shirt' layer first, just to make it easy.
What I do when using this method is to then select all objects when done editing, duplicate (ctrl +D), then group it, and move just the grouped item to a new layer (I could call the layer something like grouped orange tee shirt), if you do this, it's best to create the 'grouped orange tee shirt' layer first, just to make it easy.
Re: Locking one object in a group
I'm not clear about the problem. What is the purpose of the outline path that has no fill?
You could simply leave the outline path out of the group. Or you could group everything else in one group, then group that group with the outline path. Then when you want to change the color, ungroup once, deselect everything, select the one group, change the color, and regroup with outline path.
But I'm still wondering about the purpose of the outline path, and how the other objects work together. If you select the group, and change the color, doesn't that change the color of everything in the group (stripes, sleeves, etc.)? If you want to change the shirt color only, it seems to me it would be easier to just select that one object. I just recently learned about Ctrl + click, which will select the top object in a group (without entering the group or ungrouping). Then you can do Ctrl + Alt + click to select the next object down in the group, and continue until the object you want is selected.
You could simply leave the outline path out of the group. Or you could group everything else in one group, then group that group with the outline path. Then when you want to change the color, ungroup once, deselect everything, select the one group, change the color, and regroup with outline path.
But I'm still wondering about the purpose of the outline path, and how the other objects work together. If you select the group, and change the color, doesn't that change the color of everything in the group (stripes, sleeves, etc.)? If you want to change the shirt color only, it seems to me it would be easier to just select that one object. I just recently learned about Ctrl + click, which will select the top object in a group (without entering the group or ungrouping). Then you can do Ctrl + Alt + click to select the next object down in the group, and continue until the object you want is selected.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
-
enjoymoreradio
- Posts: 2
- Joined: Wed Jul 25, 2012 6:32 pm
Re: Locking one object in a group
The reason I preferred to have the whole thing in a group is because I'm using 22 of these in each image I do, and I have to move them around a huge amount.
What I've done to try to remedy this is apply a mask to the "outline", so that when I change the fill of the group, the "outline's" fill is also changed, but it can't be seen, because everything but the stroke is masked. Now I'm noticing a separate problem. While my rejiggered template looks identical to the original version when zoomed in, zooming out to 100% makes the outline on the new version much smaller. Is there anything that can be done to remedy this?
What I've done to try to remedy this is apply a mask to the "outline", so that when I change the fill of the group, the "outline's" fill is also changed, but it can't be seen, because everything but the stroke is masked. Now I'm noticing a separate problem. While my rejiggered template looks identical to the original version when zoomed in, zooming out to 100% makes the outline on the new version much smaller. Is there anything that can be done to remedy this?
Re: Locking one object in a group
EDIT: SEE THE NEXT POST. THIS ONE HAS BEEN LEFT HERE FOR EDUCATIONAL PURPOSES ONLY 
It sounds like you can (potentially) make good use of clones. Here's an approach that is closest to what you're trying to do right now.
1) Create your shirt design. Whatever object carries the "base" colour, set its fill to "unset".
2) Add your outline and group everything.
3) Create 22 clones (if they all need to be different colours)
4) Select your 22 clones and set the fill colour. Each can be a different colour if you want. Only objects in the group with an "unset" fill colour will be changed.
(You might want to hide the original group off-page, or on a non-visible layer once you've done this)
Although I don't have any football (erm... soccer) shirt drawings handy, I do have some rather nice aliens that I can use to demonstrate the technique. In the attached file the top-left character has his shirt fill "unset". The top row of characters are all cloned from that original and given different fill colours - but note that it's only the shirt colour that actually changes, everything else stays the same. This is the approach I would use if you want 22 different colours.
On the second row I have another original, but this time with my chosen colour already set. The remaining 8 characters are all clones of that original. To change all of them at once, you just have to double-click on the original (to enter the group it's in), then select the shirt and change its fill colour. All the others will change as well, as they're cloned from the original. This is the best approach if all 22 shirts are the same colour.
enjoymoreradio wrote:The reason I preferred to have the whole thing in a group is because I'm using 22 of these in each image I do, and I have to move them around a huge amount.
It sounds like you can (potentially) make good use of clones. Here's an approach that is closest to what you're trying to do right now.
1) Create your shirt design. Whatever object carries the "base" colour, set its fill to "unset".
2) Add your outline and group everything.
3) Create 22 clones (if they all need to be different colours)
4) Select your 22 clones and set the fill colour. Each can be a different colour if you want. Only objects in the group with an "unset" fill colour will be changed.
(You might want to hide the original group off-page, or on a non-visible layer once you've done this)
Although I don't have any football (erm... soccer) shirt drawings handy, I do have some rather nice aliens that I can use to demonstrate the technique. In the attached file the top-left character has his shirt fill "unset". The top row of characters are all cloned from that original and given different fill colours - but note that it's only the shirt colour that actually changes, everything else stays the same. This is the approach I would use if you want 22 different colours.
On the second row I have another original, but this time with my chosen colour already set. The remaining 8 characters are all clones of that original. To change all of them at once, you just have to double-click on the original (to enter the group it's in), then select the shirt and change its fill colour. All the others will change as well, as they're cloned from the original. This is the best approach if all 22 shirts are the same colour.
- Attachments
-
- clone_army.svg
- (28.27 KiB) Downloaded 193 times
Last edited by Xav on Thu Jul 26, 2012 5:06 pm, edited 1 time in total.
Re: Locking one object in a group
Ignore my previous post. Now that I've stopped to think about what I think you actually want to achieve, rather than trying to solve the specific question you asked, I suspect that this approach is the simplest:
You want 22 shirts - 11 in one colour, 11 in another, right?
1) Draw your first shirt, and group it. This will be your "master" shirt for team 1 (M1).
2) Duplicate it. This will be the "master" for team 2 (M2).
3) Double-click on M2 to enter the group. Select the object with your base colour and change it. You can also make any other changes you need to while you're in there (such as removing stripes).
4) Select M1 and clone it (Edit > Clone).
5) Drag the clone around the screen, pressing the SPACE bar 9 times as you do so. You should now have 1 original (M1) and 10 clones.
6) Repeat 4 & 5 for M2.
7) You can now position your 22 shirts as you see fit.
Then later, when you need to change the shirt colours:
1) Select a shirt from team 1 and press SHIFT-D to find the original (M1)
2) Double click on M1 to enter the group and change the base colour. All the clones should automatically update to the new colour.
3) Repeat steps 1 & 2 for a shirt from the second team.
You want 22 shirts - 11 in one colour, 11 in another, right?
1) Draw your first shirt, and group it. This will be your "master" shirt for team 1 (M1).
2) Duplicate it. This will be the "master" for team 2 (M2).
3) Double-click on M2 to enter the group. Select the object with your base colour and change it. You can also make any other changes you need to while you're in there (such as removing stripes).
4) Select M1 and clone it (Edit > Clone).
5) Drag the clone around the screen, pressing the SPACE bar 9 times as you do so. You should now have 1 original (M1) and 10 clones.
6) Repeat 4 & 5 for M2.
7) You can now position your 22 shirts as you see fit.
Then later, when you need to change the shirt colours:
1) Select a shirt from team 1 and press SHIFT-D to find the original (M1)
2) Double click on M1 to enter the group and change the base colour. All the clones should automatically update to the new colour.
3) Repeat steps 1 & 2 for a shirt from the second team.


