'Limit Location' constraint does not work when added via script #119945

Open
opened 2024-03-27 02:07:20 +01:00 by Adam Earle · 4 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.42

Blender Version
Broken: version: 4.1.0, branch: blender-v4.1-release, commit date: 2024-03-25 20:42, hash: 40a5e739e270
Worked: (newest version of Blender that worked as expected)

Short description of error
Python script fails to "completely enable" limit location constraint.

Exact steps for others to reproduce the error

  • Open attached .blend file
  • Delete the Limit Location constraint
  • Run script

After the script is run the user then needs to Alt+G to reset the object back to 0 manually. Clear Deltas must be checked. Only then will the limit location constraint work as intended.

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 537.42 **Blender Version** Broken: version: 4.1.0, branch: blender-v4.1-release, commit date: 2024-03-25 20:42, hash: `40a5e739e270` Worked: (newest version of Blender that worked as expected) **Short description of error** Python script fails to "completely enable" limit location constraint. ![](https://projects.blender.org/attachments/6e27270f-8f8a-4292-93b3-e88e2cf44945) <video src="/attachments/c1738f00-475d-4bc1-99d4-265073714303" controls></video> **Exact steps for others to reproduce the error** - Open attached .blend file - Delete the `Limit Location` constraint - Run script After the script is run the user then needs to Alt+G to reset the object back to 0 manually. Clear Deltas must be checked. Only then will the limit location constraint work as intended.
Adam Earle added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2024-03-27 02:07:20 +01:00
Germano Cavalcante changed title from Limit Location script not fully applied to 'Limit Location' constraint does not work when added via script 2024-03-27 03:27:18 +01:00

I can confirm the issue. Thank you for reporting it. I will forward this bug report to the developers for further investigation.

I can confirm the issue. Thank you for reporting it. I will forward this bug report to the developers for further investigation.
Member

This seems to be somewhat related to keyframe/animation system.

If you do such step, the script-added constraint will be effective:

  • Open attached file on the post.
  • Delete that location key frame.
  • Delete the existing constraint.
  • Run script.
  • Constraint works.
This seems to be somewhat related to keyframe/animation system. If you do such step, the script-added constraint will be effective: - Open attached file on the post. - Delete that location key frame. - Delete the existing constraint. - Run script. - Constraint works.
Author

This seems to be somewhat related to keyframe/animation system.

If you do such step, the script-added constraint will be effective:

  • Open attached file on the post.
  • Delete that location key frame.
  • Delete the existing constraint.
  • Run script.
  • Constraint works.

Your current well-spotted.

With auto key turned on shouldn't this update the current keyframe? or even more so add another key since the actual object will move? not to sure what would be the right behavior. Perhaps leave as is and close?

> This seems to be somewhat related to keyframe/animation system. > > If you do such step, the script-added constraint will be effective: > > - Open attached file on the post. > - Delete that location key frame. > - Delete the existing constraint. > - Run script. > - Constraint works. Your current well-spotted. With auto key turned on shouldn't this update the current keyframe? or even more so add another key since the actual object will move? not to sure what would be the right behavior. Perhaps leave as is and close?
Member

No I think the current behaviour is still wrong, at least when the constraint is in place the object should not move outside the specified range.

No I think the current behaviour is still wrong, at least when the constraint is in place the object should not move outside the specified range.
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
3 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#119945
No description provided.