Fix #113505: Scale strips in nla with snap active seems broken #113554

Merged
Germano Cavalcante merged 7 commits from mano-wii/blender:fix_113505 into blender-v4.0-release 2023-10-20 14:24:57 +02:00

Possibly caused by bd305c8d18

snap_transform_data adds an offset to each element being transformed.

But this seems to only apply to Move or Extend transformations.

This solution makes the NLA transform scheme more generic.

The advantages are:

  • Greater compatibility with transformation modes
  • Header shows the value actually being transformed.

Need testing with all transformation modes supported in NLA

Possibly caused by bd305c8d18 `snap_transform_data` adds an offset to each element being transformed. But this seems to only apply to Move or Extend transformations. This solution makes the NLA transform scheme more generic. The advantages are: - Greater compatibility with transformation modes - Header shows the value actually being transformed. --- Need testing with all transformation modes supported in NLA
Germano Cavalcante added the
Module
Animation & Rigging
label 2023-10-11 18:14:21 +02:00
Germano Cavalcante added 1 commit 2023-10-11 18:14:33 +02:00
c27e18729a Fix #113505: Scale strips in nla with snap active seems broken
Possibly caused by bd305c8d18

`snap_transform_data` adds an offset to each element being transformed.

But this seems to only apply to Move or Extend transformations.

This solution makes the NLA transform scheme more generic.

The advantages are:
- Greater compatibility with transformation modes
- Header shows the value actually being transformed.
Germano Cavalcante requested review from Christoph Lendenfeld 2023-10-11 18:16:16 +02:00
Contributor

can't move strips between nlatracks

can't move strips between nlatracks <video src="/attachments/2db94c65-ceeb-4899-8ebb-7a4825462c55" title="2023-10-11 11-23-00.mp4" controls></video>
Germano Cavalcante added 1 commit 2023-10-11 20:15:02 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
b5c4984a68
Fix movement with snap in the Y direction
Author
Member

Well observed @guishe, fixed now

Well observed @guishe, fixed now
Christoph Lendenfeld requested changes 2023-10-12 10:23:52 +02:00
Christoph Lendenfeld left a comment
Member

thanks for the fix, and also thanks for moving the code to the new system
I didn't want to do it for 4.0 since I wasn't sure how the system worked. But since you are familiar with it, it should be fine.

Vertical reordering is still a bit broken. When you have snapping set to Seconds, and you try to move a strip down a layer, it takes ~240 units. With snapping set to frames it only takes 24. Before the patch both settings took 24 units

thanks for the fix, and also thanks for moving the code to the new system I didn't want to do it for 4.0 since I wasn't sure how the system worked. But since you are familiar with it, it should be fine. Vertical reordering is still a bit broken. When you have snapping set to Seconds, and you try to move a strip down a layer, it takes ~240 units. With snapping set to frames it only takes 24. Before the patch both settings took 24 units
Author
Member

Vertical reordering is still a bit broken. When you have snapping set to Seconds, and you try to move a strip down a layer, it takes ~240 units. With snapping set to frames it only takes 24. Before the patch both settings took 24 units

I can't replicate this problem.
Could you provide a file where we can observe this?

@blender-bot package

> Vertical reordering is still a bit broken. When you have snapping set to Seconds, and you try to move a strip down a layer, it takes ~240 units. With snapping set to frames it only takes 24. Before the patch both settings took 24 units I can't replicate this problem. Could you provide a file where we can observe this? @blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR113554) when ready.

example file attached
snapping is set to seconds already

  • with the nla track selected
  • do G + Y
  • drag down and notice it taking forever to switch track
example file attached snapping is set to seconds already * with the nla track selected * do G + Y * drag down and notice it taking forever to switch track
Germano Cavalcante added 3 commits 2023-10-17 16:24:14 +02:00
Author
Member

Oh, I could detect the problem!
Fixed now :)

@blender-bot package

Oh, I could detect the problem! Fixed now :) @blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR113554) when ready.
Christoph Lendenfeld approved these changes 2023-10-19 09:21:08 +02:00
Christoph Lendenfeld left a comment
Member

just a few comments about const correctness. But you can do those just before landing. No need to re-review.

just a few comments about const correctness. But you can do those just before landing. No need to re-review.
@ -36,0 +37,4 @@
{
float point[3];
getSnapPoint(t, point);
float fac = (point[0] - t->center_global[0]) / (t->tsnap.snap_source[0] - t->center_global[0]);

can be const

can be const
@ -96,1 +107,4 @@
static void timescale_transform_matrix_fn(TransInfo *t, float mat_xform[4][4])
{
float i_loc = mat_xform[3][0];

those too can all be const

those too can all be const
@ -99,0 +159,4 @@
float2 snap_target = nla_transform_apply(t, vec, snap_source);
transform_snap_anim_flush_data_ex(t, td, snap_target[0], snap_mode, &snap_target[0]);
int dist = abs(snap_target[0] - snap_source[0]);

const

const
Germano Cavalcante added 2 commits 2023-10-20 14:21:48 +02:00
Germano Cavalcante merged commit 6ce31d173d into blender-v4.0-release 2023-10-20 14:24:57 +02:00
Germano Cavalcante deleted branch fix_113505 2023-10-20 14:25:02 +02:00
Sign in to join this conversation.
No reviewers
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
4 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#113554
No description provided.