[Node tools] Using a default value that's computed by the node tree itself

Hi folks,

little conundrum. I have a node tool that resizes a selection to specific dimensions. It looks like this.

I made it for someone who moved from C4D to Blender and was missing this feature. It’s pretty basic, it works in object space, in local orientation. The user sets a new length for the chosen axis, and the operator applies the same scaling ratio to all axes, to keep uniformity.

The issue is : the operator runs with a default value, and it systematically transforms the selection before the user has had a chance to change that value to what they want. Not unusable, but a bit jarring.

Ideally, I’d like to set the default value to the current value of the bounding box, so that when the operator runs, it doesn’t change anything visually. But I don’t think it’s possible to set a default value that’s dynamic like that ?

Thank you,

Hadrien

Satellite questions : look like I can’t use gizmos in geonode tools. Do we know when that might be coming ?
And also, gizmos in geonode modifiers apparently can’t snap, that’s a bummer. Not really a question, just complaining

Hi Hadrien, if I understand well, this might work. Red is the selection and blue are the min/max points.

to have the default sel BB size as default value I have no idea, but you can set the “0” means unchanged so it shows original size before user sets his own.

ble5.0
scale.blend (116.9 KB)

Hi, thanks ! that’s a good idea, comparing with zero to toggle the new size. I like how it feels. It’s rather close to an ideal solution if the field were somehow pre-set to the original size. I’d be surprised we can get even closer. I might bring this up with the geonodes team, see what they think. Cheers !!

I would disable the axes switch as well and for each axis would use that zero comparison instead, with this they should get selected automaticaly.

Update, I remembered this proposal by Jacques : https://devtalk.blender.org/t/group-defaults-node-proposal/40231
which I think would perfectly solve my issue

For now @filanek your idea is the closest

I have a single “new size” parameter to control all axes so this isn’t possible (if I’m understanding you correctly…) But in the case of separately scaled axes this would be ideal yes