Constraints: Scaling operator do not affected by min scale limits #107924

Open
opened 2023-05-14 16:45:15 +02:00 by Guilherme Emerich Setúbal · 9 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.61

Blender Version
Broken: Current master.
Worked: Never.

Short description of error
The scale limiter does not affect the operation of the scale operator.

Exact steps for others to reproduce the error

  1. Add Limit Scale constraints on object.
    a. Set some Minimum to ON.
  2. Try to scale object by pressing S.

scale bug.blend

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.61 **Blender Version** Broken: Current master. Worked: Never. **Short description of error** The scale limiter does not affect the operation of the scale operator. **Exact steps for others to reproduce the error** 1. Add `Limit Scale` constraints on object. a. Set some `Minimum` to ON. 2. Try to scale object by pressing `S`. [scale bug.blend](/attachments/eb038394-9ece-472b-8733-672f74d5afb0)
Guilherme Emerich Setúbal added the
Priority
Normal
Status
Needs Triage
Type
Report
labels 2023-05-14 16:45:16 +02:00
Iliya Katushenock added the
Interest
Modeling
Interest
User Interface
labels 2023-05-14 16:48:56 +02:00
Member

Can confirm.

Can confirm.
Pratik Borhade added
Module
Modeling
and removed
Interest
Modeling
labels 2023-05-14 17:48:37 +02:00
Iliya Katushenock added
Status
Needs Info from Developers
and removed
Status
Needs Triage
labels 2023-05-14 18:01:46 +02:00
Iliya Katushenock changed title from Limit scale constraint goes negative to Scaling operator is inverted if the model is not in the center of the object 2023-05-14 18:03:15 +02:00

This is reproduced without constraints, so I've edited the report. Still not sure if this is the expected behavior.

This is reproduced without constraints, so I've edited the report. Still not sure if this is the expected behavior.
Member

Right, need to check again. Will reset the status for now.

Right, need to check again. Will reset the status for now.
Pratik Borhade added
Status
Needs Triage
and removed
Status
Needs Info from Developers
labels 2023-05-14 18:13:01 +02:00

This is reproduced without constraints, so I've edited the report. Still not sure if this is the expected behavior.

I thought it was a normal behavior, but what got me is that the constraint is supposed to clamp the scale to 0, yet it doesn't.

> This is reproduced without constraints, so I've edited the report. Still not sure if this is the expected behavior. I thought it was a normal behavior, but what got me is that the constraint is supposed to clamp the scale to 0, yet it doesn't.
Iliya Katushenock changed title from Scaling operator is inverted if the model is not in the center of the object to Constraints: Scaling operator do not affected by scale limits 2023-05-14 18:32:19 +02:00
Iliya Katushenock removed the
Interest
User Interface
label 2023-05-14 18:35:11 +02:00
Iliya Katushenock changed title from Constraints: Scaling operator do not affected by scale limits to Constraints: Scaling operator do not affected by min scale limits 2023-05-14 18:36:00 +02:00
Iliya Katushenock added
Interest
Modeling
and removed
Module
Modeling
labels 2023-05-14 18:38:03 +02:00

Manual says: This constraint does not tolerate negative scale values (those you might use to mirror an object…)

So I would say, that this works as expected.

[Manual](https://docs.blender.org/manual/en/latest/animation/constraints/transform/limit_scale.html) says: This constraint does not tolerate negative scale values (those you might use to mirror an object…) So I would say, that this works as expected.

Would you mind explain what could this actually mean? I feel like it still wouldn't justify not clamping the scale values to the min/max range.

For some reason, instead of clamping the values, it turns the scale into negative, and takes the min/max to negative ( so instead of being min 0 to max 1, it turns into max 0 to min -1 )

However, as you just showed, the constraint doesn't tolerate negative values, yet inserting them into the fields is allowed image. The only issue is that it keeps units at 0m ( no scale at all ), which I find it to be an odd behavior to say at least.

My only issue really is about the clamping, if I set my scale range to be min 0 to max 1, I think it should at least try to keep it that way ( in a nutshell, thinking twice about it, it is working as the manual says, but is it really the way it should? )

Would you mind explain what could this actually mean? I feel like it still wouldn't justify not clamping the scale values to the min/max range. For some reason, instead of clamping the values, it turns the scale into negative, and takes the min/max to negative ( so instead of being **min 0 to max 1**, it turns into **max 0 to min -1** ) However, as you just showed, the constraint doesn't tolerate negative values, yet inserting them into the fields is allowed ![image](/attachments/1cc2cd3b-8aed-438a-a78c-81efa34d8831). The only issue is that it keeps units at 0m ( no scale at all ), which I find it to be an odd behavior to say at least. My only issue really is about the clamping, if I set my scale range to be **min 0 to max 1**, I think it should at least try to keep it that way ( in a nutshell, thinking twice about it, it is working as the manual says, but is it really the way it should? )
Member

I took a look at the code, it used mat4_to_size(obsize, cob->matrix); to determine object's original scale, and this will only give you positive values. So that's why you can scale objects in range (-1, 1) (even you don't have it at 0 as minimum, it can still go to the negative value if you transformed enough), I think we could address this by checking handedness of the matrix.

@mod_moder What do you mean reproduced without constraints?

I took a look at the code, it used `mat4_to_size(obsize, cob->matrix);` to determine object's original scale, and this will only give you positive values. So that's why you can scale objects in range (-1, 1) (even you don't have it at 0 as minimum, it can still go to the negative value if you transformed enough), I think we could address this by checking handedness of the matrix. @mod_moder What do you mean reproduced without constraints?

@ChengduLittleA Initially, I sat on the trail of a another behavior...

@ChengduLittleA Initially, I sat on the trail of a another behavior...
Member

@mod_moder ah ok. I just did a quick fix, seems to have resolved the negative scaling issue.

@mod_moder ah ok. I just did a quick fix, seems to have resolved the negative scaling issue.
Pratik Borhade added
Module
Modeling
Status
Confirmed
and removed
Status
Needs Triage
Interest
Modeling
labels 2023-05-15 10:38:31 +02:00
Sign in to join this conversation.
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
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#107924
No description provided.