Lock an object to prevent it from change, but still move

Post questions on how to use or achieve an effect in Inkscape.
pelle
Posts: 53
Joined: Wed Mar 05, 2008 8:23 am

Lock an object to prevent it from change, but still move

Postby pelle » Sat May 23, 2015 12:27 am

I want to make many objects "read-only" so I can still drag them around, but not accidentally resize or otherwise modify them. Is there som trick to achieve that? I read that there is a way to lock objects, but that seems to also prevent moving them around?

Alternatively if there is some way to completely disable the resize/rotate arrows so I can select objects that would work in this case because there is currently no object (in an unlocked layer) that I want to be able to modify (except for moving around).

User avatar
brynn
Posts: 10308
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Lock an object to prevent it from change, but still move

Postby brynn » Sat May 23, 2015 1:48 am

Hhm, I'm not completely clear what your problem is. But I think a couple of questions or a little more discussion should clear it up.

First of all, when something is locked (object, group, layer, etc.) it essentially "deactivates it" so that it cannot be selected by any means. There is no way to have an object selectable for some actions, but not for others.

It sounds like you are having a problem where you accidentally scale an object when you are trying to move it. That implies to me that the objects must be very small, so that it's hard to grab it with the mouse. Have you discovered Inkscape's zoom capabilities?

When I work with Inkscape, I'm constantly zooming in, out and "around". Most of the time, with Inkscape, I like to use the icons/buttons and menus, rather than key shortcuts. (because of bad memory :shock: ) But for zooming, since I use it so extensively, I do use key shortcuts. (You can find all the key shortcuts from Help menu > Key and Mouse Reference.) I also use my mouse to zoom. For traditional mice, I think the wheel controls the zoom. (I use a touchpad mouse, which of course is entirely different, but there still is a way to zoom.)

And there's also the Zoom tool :tool_zoom: which aside from it's on-canvas action (click to zoom in, Shift + click to zoom out) also provides several convenient icon/buttons on its control bar. And finally, in the bottom-right corner of the window, you can both see the current zoom value, as well as edit the text which changes the zoom (type in the value you want and press Enter key).

I hope this info will be helpful for you, but if I didn't get the right idea, please clarify a little more what you need :D

User avatar
brynn
Posts: 10308
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Lock an object to prevent it from change, but still move

Postby brynn » Sat May 23, 2015 1:58 am

Oh wow! After a 2nd thought, I was looking through Inkscape Preferences (Edit menu, I think now) and found this Inkscape Preferences > Behavior > Selecting > Ignore locked objects and layers. The tool tip says "Uncheck this to be able to select objects that are locked".

It sounds like just what you need. However, I can't seem to make it work yet.....

Edit
I checked the manual (http://tavmjong.free.fr/INKSCAPE/MANUAL ... elect.html), but it doesn't addresss that option.

After further experiments, it does seem to work if I use Ctrl A (select all) or Tab (cycles through document, selecting 1 object after another) or Shift + Tab (cycles the other way). But I still can't select by clicking on the canvas.

It sounds like you might have a lot of objects on the canvas, and if that's the case, it might be hard to select the locked object, after you lock it (after unchecking that option in Inks Prefs).

:oops: Oh, I should have thought of this earlier! :oops: You could use the arrow keys to move the object after you select it. See Help menu > Key and Mouse Ref, to learn about the arrow keys (also Shift and Alt). So once you select the object, there would not be any dragging -- the keyboard does the movement. But zooming is still good to know about :D

Lazur
Posts: 4705
Joined: Tue Jun 14, 2016 10:38 am

Re: Lock an object to prevent it from change, but still move

Postby Lazur » Sat May 23, 2015 6:19 am

Not sure what this is all about, seeing the bigger picture may result in a more handy drawing.


My first thought was to convert object to a marker, then set a two noded path to have no fill, 1 px wide stroke, with 0 alpha, and that custom marker as a starting/end marker.
After that, if you untoggle the scale stroke proportionally with object, you can stransform your path, the marker will only move and rotate, but not resize and skew.
Also you can use the node tool then to move object around -there you can disable bounding box and other handles.


Hmm, second thought, you can make 1-noded closed paths, even easier to edit with the node tool.
Still, probably it wouldn't render right through a browser.

pelle
Posts: 53
Joined: Wed Mar 05, 2008 8:23 am

Re: Lock an object to prevent it from change, but still move

Postby pelle » Sun May 24, 2015 9:24 am

I know that locking is not the correct term, because it is indeed used to completely lock something. It was the closest word I could come up with.

Pressing the mouse-button on an object that is not selected and immediately moving it and then releasing works, because then the resize-arrows never show up. But that does not work when first drag-selecting to move multiple pieces and that is mostly when I end up accidentally resizing them instead.

The ideal would be some key to quickly toggle if resize/rotate arrows appear at all. They are kind of in the way sometimes when trying to see what you are doing anyway, so I can see that feature being used for many.

I can imagine this only comes up in a few cases, yes. This is the particular thing I am doing now:
I have drawn a boardgame board and all the pieces. Now I am just in the process of re-arranging things, sort of "posing" them to export different images. The pieces are rather small compared to the whole board. If I zoom in so much that I can easily select and move pieces without accidents I just don't see enough of the board to know where to move things easily.

It might be that I ought to export everything from Inkscape into some other application, but it can be really handy to be able to edit things in various layers even while doing this. It's just some parts of the drawing are completed and fixed (except for their position) while other parts are still nice to modify, plus having the ability to add more content. Think for instance if I pose things for an example and I want to add some text and arrows. But I know I will never ever modify what the game pieces look like while doing that.

User avatar
Maestral
Posts: 952
Joined: Sat Aug 27, 2011 7:10 am

Re: Lock an object to prevent it from change, but still move

Postby Maestral » Mon May 25, 2015 6:13 am

Select desired elements and than try with Edith paths tool (check the options on toolbar for this tool / especially the one about the transformation handles).
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: No registered users and 7 guests