Shrink/Fatten "Offset Even" can not be used as default #54325
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#54325
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The "Offset Even" option is turned on by default for the Shrink/Fatten (Alt-S) tool. You can see this by opening user preferences, selecting the input tab and opening the Shrink/Fatten menu under the Mesh menu. However, if you use the tool, you'll see checking or unchecking this default option makes no difference. The tool always defaults to off.
It doesn't seem currently possible, even with custom coding, to have this option on by default. I disabled all transform modal map keys just to be sure they weren't interfering. They are not. I also tried changing the default key to something else (Ctrl-K). It seems nothing can be done to have this tool use "Offset Even" (i.e. even thickness) by default.
Added subscriber: @sicutunum
#66600 was marked as duplicate of this issue
Added subscribers: @ideasman42, @lichtwerk
Confirming on first sight, but need to have a closer look later
See here and note that it finds the property, but
RNA_property_is_set
is not True [it is on redo though]. Like I said: will have a closer look later (and maybe pass on to @ideasman42 if that doesnt succeed)OK, so did a bit more reading code here.
Sorry if this blathering is a bit of a detour, but I'm keeping this as a reference (for myself, but maybe for others as well...)
And: please correct me if I'm wrong!
Regarding my last comment (RNA_property_is_set is not True):
Seems like operator properties start off being an
PROP_IDPROPERTY
(not a DNA one) and are flaggedIDP_FLAG_GHOST
This happens when you do
RNA_def_boolean(ot->srna, "use_even_offset", true, "Offset Even", "Scale the offset to give more even thickness");
If a property is flagged
IDP_FLAG_GHOST
the property is set but RNA will return false when checkingRNA_property_is_set()
.This way code can distigush between defaults and something that was explicitly set.
When redoing an operator the properties wont be flagged
IDP_FLAG_GHOST
anymore (because they have all been explicitly set)So whenever you call
RNA_boolean_set()
, it will most likely end up inrna_idproperty_touch
which unsetsIDP_FLAG_GHOST
.If we wanted the keymap to actually have an effect in initTransInfo , we would simply have to do something like D3388
But more problems arise with above diff
So
initTransInfo
would go fine (it would pick up the prop and set transform flag accordingly)But now comes
transformEvent
(called fromtransform_modal
).This toggles the transform flag according to pressing
S
(defined in transform modal keymap) or pressing/releasingALT
(hardcoded).So releasing
ALT
will setOffset Even
to OFF.If you invoke the tool with ALT+S then you probably release the keys shortly after. Hm. This was not a problem before D3388 (it was OFF anyways), but now it will be.
So as long as you hold the ALT key, D3388 should work.
We could of course disable ALT for Shrink/Fatten (see P688), or move to other keys? (Note this will unfortunately need update in translations, because of header text...)
What about 2.8?
This should still aplly there, too right?
@ideasman42 : any thoughts?
If it means anything, my main concern with this as an addon developer is being able to use the functionality of even offset fat/shrinking within custom modal operators. The fact that there is currently no way to invoke even offset fat/shrinking kills the potential of more useful tools (without having to result to emulating this operator via custom coding adding significant unnecessary overhead). Probably on a larger scale, modal operators should follow a protocol where-in this kind of thing could not become an issue.
@sicutunum : wasnt aware this is about usage from python as well...
from python you can actually invoke it like this, no?
bpy.ops.transform.shrink_fatten('INVOKE_DEFAULT', use_even_offset=True)
So quickly putting this into a custom modal op like this seems to do it (unless I am misunderstanding something...)
Keymap is for invoking the tool via... well keys, that's not defining the default for python behavior to my knowledge.
If you wanted to pick this preference up from python you could also get it with the following I think:
bpy.context.window_manager.keyconfigs.default.keymaps['Mesh'].keymap_items['transform.shrink_fatten'].properties.use_even_offset
Hope this helps
@lichtwerk Hi. This is strange. I reported this bug because similar code I was using wasn't allowing for even offset. I was invoking it and using the same option as your code above and it kept defaulting to off. It's working now. Not sure why. Thanks though. I'm confused about your statement above "So as long as you hold the ALT key should work". This doesn't seem to be the case. It's always off even if I never release the Alt or S keys. Actually if I release Alt and keep holding S the option starts rapidly blinking. As far as there needing to be a protocol for this sort of thing, what I meant was that all 3D View modal operators released from blender.org should use mappable modal keymaps like with translate. There shouldn't be any 3D View modal operators (official ones from blender.org) that have any hard coded modifiers such as "Alt". Is there some reason they should?
That's relevant only with the D3388 patch applied to the current code. Have you tried the patch?
yep, thats expected.
ALT
is enabling temporarily (while keeping pressed),S
toggles (all the time)Havent checked that in depth, I guess some modifierskeys just havent been converted from ancient past (but there might be reasons these are still hardcoded which I havent investigated yet)
Added subscriber: @BillySmith-1
Wow it working if you keep holding down Alt or assign it to a not use the Alt modifier in the hotkey is the weirdest bug.
Holding feels so bad and counter intuitive vs all the other tools in Blender and now that I know I can have it work by avoiding the Alt key in the hotkey I will, but at the same time I like the Alt + S hotkey so that's both a nice discovery and a bummer.
Added subscriber: @IihT2cWA9xiP30BsYphz3EiEISNoScoe
I'm having the same issue, changing away from "Alt" fixes it but is a hassle to remember the new hotkey
Added subscriber: @Floatharr
@lichtwerk hi
Guys, the point is:
The tool is launched with the ALT + S hotkey, which has an ALT hold option.
You run ALT + S and immediately ALT gets processed by overwriting the state "Offset Even" (use_even_offset).
That is, the "Offset Even" parameter does not make sense until either the hotkey is changed, where there is no Alt, or the behavior of the tool itself, for example: