A quick way to switch between modify cage and standard mode

Carramone

I often need to adjust the size of the cage after I’ve done an operation, and it would be nice not having to jump to the n-panel settings for this. I also think that an alternative way to reach “modify cage” would be if it was possible to use for example “alt” and drag on the control points of the box directly. And when alt is not pressed, then the control points work just as normal. That would be a vey efficient way to manipulate the cage on the fly when needed.

I tried to add my own shortcut, but it only worked to turn the option on, not turning it off again.
Imported from Discord

AlexZhornyak

Hi, I understood the task, I will think how to make a toogle mode as more user friendly as possible. For now, I would offer to have 2 shortcuts, like Alt+F6 - Enable Cage Modification, Alt+F7 - Disable Cage Modification

Regarding to usage Alt - unfortunately it is forbidden to use in Gizmo in Blender. I will think how could we change cage state by clicking its wireframe
Imported from Discord

Carramone

I wonder if there is something weird with my version (1.0.2.0), there are no titles for the different sections. I tried to uninstall, restart blender and install again, but it’s the same. I’m in Blender 5.1.0.

Having shortcuts for the switch between the two modes will make it much more convenient than going to the n-panel.


Imported from Discord

AlexZhornyak

It’s not clear for me about "no titles fot the different sections. If you mean “Context Set Enum” operator, it never shows values in title, you need to expand it to see. I understand that it is not convinient but unfortunately it is the standard behaviour of Blender


Imported from Discord

Carramone

Hi, it might be that I misunderstand. Sorry in that case. But I was not talking about values, I was talking about titles. For example, there is a title for “Capture Mouse Position” and “set cursor 3D to Cage”. But then the rest have the same title “Context Set Enum”.

And now, I think I understand what you mean. Since the value of each of these is variable, it is not possible to display that Value. Whereas for those with a title, the value is fixed. And to give it a fixed title name would be counter-intuitive, since the value isn’t static.

But that leads to a new question. Why is the value of these not static? Even if I can change them, when would I actually want that? Having the option to add more, to expose custom operators is of course powerful, but as it stands now, that means I would lose key-bindings of core functionality. I’m clearly missing something here.


Imported from Discord

AlexZhornyak

I think I need to explain some basics of keymaps to you:

  1. Every keymap is a Blender operator that executes an action.
  2. An action can be individual, that executes some special function, and can be a global.
  3. Example of global action is a change of some scene, object property etc.
    For such global actions there are Blender native operators: Context Set Enum, Context Toggle etc.

In our case there is Scene Property:
bpy.data.scenes["Scene"].zen_cage.transform_mode

it has fixed values: ALIGN, FIT, DISTRIBUTE, ARRAY, CLAMP, SCALE, ROTATE

So, for every type of transform_mode hotkey is arranged as is shown in image:


Imported from Discord

Carramone

Thank you. Much appreciated.
I’m probably just too dumb to understand. But in the preferences it looks like this (attached image):

You say that the values are fixed, but under preferences they can be changed here.

That they are fixed makes sense to me. What I was wondering about is why they can be changed? That is the part that don’t make sense to me. Especially if that is the reason why they can’t have a proper title.

But I understand that there is a reason behind all this. And while I would love to understand it, I don’t want to waste your time further. This has no negative implications what-so-ever for the usability of the addon.


Imported from Discord

AlexZhornyak

I appoligize for my English, I am not a native speaker, so maybe my explanations are not so correct.

Let me explain in a simple words: there is a scene ENUM property with 6 values. If I want in Blender to set 1 of that property via hotkey, I use Blender operator Context Set Enum, where I set the path of the property and I set the value, which will be set
Path = scene.zen_cage.transform_mode
Value = ARRAY
Imported from Discord

Carramone

I think I understand, thank you.

While I was going through the source code, trying to understand the context set operator I came across two typos in the file “utils.py” row 1129 "raise RuntimeError(“No vewport view (region_data is None)”). There is a missing “i” in “viewport” And in row 1400. There is a missing “t” in “property”. And perhaps it should say “Property IS not AN …”

While minuscule in importance, I thought I should report them anyway.
Imported from Discord