Styles

 From:  Michael Gibson
2619.18 In reply to 2619.13 
Hi Patrick,

> My main concern now is that you can get a lot of things
> messed up by accident. Selecting geometry and then
> accidentally changing them to another layer.

I'm not quite sure if I follow this one - the geometry is only changed to another layer/style if you specifically click on the little color swatch rather than on the eye.

I tried to make sure the eye area was not too narrow in size to help prevent mistaken clicks. Also the part that your mouse is over (the eye part, or swatch part, or name label part) will highlight with visual feedback so you know which one of those controls is active before you click.

I think I may need some more specific information on this particular problem, I mean is it happening because you are clicking on the swatch when you were intending to click on something else instead?


> So an undo would be great. Although i can imagine that for
> some users the extra undo steps will be a disadvantage (like
> zoom and pan operations are included in autocad's undo...)
> Maybe ctrl-shift-z shortcut for undo with styles operation and
> ctrl-z for normal undo? Or the other way around?

Actually, this shouldn't be much of a problem, because it uses the special "selection undo" mechanism.

That works currently in other places in MoI - for example if you're just selecting objects normally before running a command and you click somewhere off of an object and accidentally deselect everything, you can right then do a Ctrl+z to recover your previous selection.

But it is a special kind of undo - it won't store a history of all selection actions that you have previously done, otherwise it would be painful and get in the way a lot just like the AutoCAD zooming that you mention. So it only stores just a single "selection undo", and only when it is the "topmost" item in the undo stack. So that lets you recover from a "oops, I just clicked the wrong thing" kind of a problem but not get in your way when going through numerous geometry changes.

However, at the moment it actually doesn't restore the hidden state, just the selection state, so it actually is not 100% correct for solving what you are talking about. But I think it should be possible to extend it to handle hidden/showing state as well.


> Would be great! I would use that rather than hiding inside
> the style itself. H as a shortcut to hide geometry to a
> construction layer that is turned of by default. And
> accessible when you need it.

I think I should be able to cook this script up for you now actually, I will give it a try after posting this.

But here you wrote: "... to a construction layer that is turned of by default." - just remember that in MoI the main difference is that a layer is not "on" or "off" by itself, it is only objects that are on or off. In MoI the "style" just shows what state all the objects that belong to it currently have - either all displayed (full eye shown), all off (nothing shown), or some displayed and some hidden (half eye shown).

But it should not be difficult for a script to hide the objects at the same time that it is assigning a style to them.


> Default behaviour should probably be a bit more dummy
> proof with a lot of advanced behaviour implemented with
> shift clicking - ctrl - alt clicking.

Yup, that's generally the idea for why it is set up as it currently is! :)

For example with selection, if I didn't show all the objects with the default "selection action", it could for example be possible that doing a selection would actually do nothing if all objects were hidden. That's not very straightforward.

Right now the selection action is much more predictable - if you click it, the result will be all objects of that category (like "All curves" if you click on Types/Curves, or "All things with style=red" if you use Styles/Red) will result in being selected. It is the same selection result every time no matter what happens to be currently visible or hidden. That seems to be more simple behavior.

Especially when groups are around, it seems like it would be kind of strange if the default action did not guarantee that the whole group was selected, which is what would happen if it did not also show all the objects that were in that group as well.

But there will be an option in the next beta for you to switch to that other behavior of not showing objects when doing the selection action, if that makes more sense to you.

- Michael