Skip to content

Bulk Edit Rotate: skip models whose type doesn't support that axis#6521

Merged
derwin12 merged 1 commit into
xLightsSequencer:masterfrom
heffneil:bulk-rotate-skip-unsupported
Jun 15, 2026
Merged

Bulk Edit Rotate: skip models whose type doesn't support that axis#6521
derwin12 merged 1 commit into
xLightsSequencer:masterfrom
heffneil:bulk-rotate-skip-unsupported

Conversation

@heffneil

@heffneil heffneil commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #6184. Bulk Edit → Rotate X / Y / Z applied the rotation unconditionally to every unlocked selected model, but several model types don't actually honor every axis:

  • BoxedScreenLocation (Matrix, Custom, Image, Cube, Sphere, Circle, Star, ModelGroup, etc.) — supports X, Y, Z.
  • ThreePointScreenLocation (Arches, CandyCane, Icicles) — only X has a visible effect.
  • TwoPoint / PolyPoint / MultiPoint (SingleLine, PolyLine, ChannelBlock, etc.) — orientation comes from endpoints; calling SetRotateX/Y/Z stores a value with no visible effect.

So a user could bulk-rotate a mixed selection and watch some models silently ignore the action.

Fix

BulkEditRotateAxis now classifies each selected (unlocked) model into "supported on this axis" or "unsupported", and:

  • If no selected model supports the axis, the value-entry dialog is skipped and an info box lists the model names with the reason.
  • If some models support and some don't, the supported ones are rotated normally and a follow-up info box lists the skipped names, one per line, capped at 20 with "… and N more" for huge selections.
  • If all selected models support the axis, behavior is unchanged (no extra dialog).

Includes are already pulled in transitively (the same dynamic_cast<ModelWithScreenLocation<BoxedScreenLocation>*> pattern is already used at LayoutPanel.cpp:1384). wx-platform-neutral — works on macOS, Windows, Linux.

Test plan

  • macOS Release build (Xcode 26.5)
  • Select a mix (e.g. Matrix + Arch + SingleLine), Bulk Edit → Rotate Y — Matrix rotates; follow-up dialog lists Arch and SingleLine as skipped
  • Select only Arches + Lines, Bulk Edit → Rotate Y — no value dialog appears; info box lists all of them as skipped
  • Select Matrix + Arch, Bulk Edit → Rotate X — both rotate; no extra dialog (Arch supports X)
  • Select only Matrix models, Bulk Edit → Rotate Z — unchanged behavior, no extra dialog
  • Lock one model in a mixed selection — locked model is silently skipped as before, no double-count in the "of N" total
  • Select 25 unsupported models — skipped list shows 20 names plus "… and 5 more"

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings June 9, 2026 19:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds user-facing handling for Bulk Edit Rotate when selected models don’t meaningfully support rotation on a given axis, preventing “no-op” edits and improving feedback.

Changes:

  • Introduces ModelSupportsRotationAxis() to filter eligible models by screen-location type and axis.
  • Tracks unsupported models separately and shows a summary dialog listing skipped models (with capped output).
  • Adds informative messaging when none of the eligible models support the requested rotation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +2434 to +2441
wxMessageBox(
wxString::Format(
"None of the selected models support rotation on the %c axis.\n\n"
"Skipped:\n%s\n"
"Arches/CandyCane/Icicles only support X; Lines/PolyLines derive orientation from their endpoints.",
axis,
formatSkippedNames(unsupportedModels)),
"Bulk Edit Rotate", wxOK | wxICON_INFORMATION, this);
Comment on lines +2506 to +2515
wxMessageBox(
wxString::Format(
"Rotated %zu of %zu selected models.\n\n"
"Skipped because their model type does not support rotation on the %c axis:\n%s\n"
"Arches/CandyCane/Icicles only support X; Lines/PolyLines derive orientation from their endpoints.",
editableModels.size(),
editableModels.size() + unsupportedModels.size(),
axis,
formatSkippedNames(unsupportedModels)),
"Bulk Edit Rotate", wxOK | wxICON_INFORMATION, this);
Comment on lines +2508 to +2512
"Rotated %zu of %zu selected models.\n\n"
"Skipped because their model type does not support rotation on the %c axis:\n%s\n"
"Arches/CandyCane/Icicles only support X; Lines/PolyLines derive orientation from their endpoints.",
editableModels.size(),
editableModels.size() + unsupportedModels.size(),
Comment on lines +2436 to +2438
"None of the selected models support rotation on the %c axis.\n\n"
"Skipped:\n%s\n"
"Arches/CandyCane/Icicles only support X; Lines/PolyLines derive orientation from their endpoints.",
Comment on lines +2509 to +2510
"Skipped because their model type does not support rotation on the %c axis:\n%s\n"
"Arches/CandyCane/Icicles only support X; Lines/PolyLines derive orientation from their endpoints.",
@heffneil

heffneil commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Some screenshots of the process and alerts now.

Screenshot 2026-06-09 at 3 51 09 PM Screenshot 2026-06-09 at 3 51 51 PM Screenshot 2026-06-09 at 3 51 55 PM

Rotate X / Y / Z under Bulk Edit was applied unconditionally to every
unlocked selected model, but ThreePointScreenLocation (Arches,
CandyCane, Icicles) only honors X rotation, and TwoPoint/PolyPoint
based models (Lines, PolyLines, etc.) derive their orientation from
their endpoints - calling SetRotateY/Z on them stored a value that
had no visible effect.

Now: each model in the selection is checked against the requested
axis. Supported models are rotated; unsupported models are listed
in a follow-up message so the user knows exactly what was and wasn't
touched.

- If no selected model supports the axis (e.g. user picked only
  Arches and chose Rotate Y), the value-entry dialog is skipped
  and an info box explains why with the offending model names.
- If some support and some don't (e.g. a Matrix + an Arch +
  Rotate Y), the supported models are rotated and a follow-up
  info box lists the skipped names, one per line, capped at 20
  with "and N more" for huge selections.
- If all selected models support the axis, behavior is unchanged
  (no extra dialog).

Includes are already present transitively (same dynamic_cast
pattern used at LayoutPanel.cpp:1384).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@heffneil heffneil force-pushed the bulk-rotate-skip-unsupported branch from 90a468c to a70f94d Compare June 15, 2026 14:51
@derwin12 derwin12 merged commit 1a537ee into xLightsSequencer:master Jun 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants