Skip to content

Commit

Permalink
Fix xLightsSequencer#3260 - rotozoom order not being saved
Browse files Browse the repository at this point in the history
  • Loading branch information
keithsw1111 committed Jun 27, 2022
1 parent 670e667 commit f902af7
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 14 deletions.
14 changes: 14 additions & 0 deletions TipOfDay/00018.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<!--xlights>
<tip url="00018.html" title="Shift effects" category="Sequencing" level="Intermediate" exclude=""/>
</xlights-->
</head>
<body>
<h1>Shift effects</h1>
<p>Ever needed to just shift everything in a sequence slightly left or right … maybe because the audio file you have is slightly different to the sequence you imported.</p>
<p>The Edit Menu Shift Effects function is for you. It will allow you to shift everything in your sequence by a specified number of milliseconds. Use negative numbers to shift left and positive numbers to shift right.</p>
<p>To shift a subset of effects use the Shift Selected Effects option.</p>
</body>
</html>
31 changes: 31 additions & 0 deletions TipOfDay/00019.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<!--xlights>
<tip url="00019.html" title="Sequence statistics" category="Sequencing" level="Advanced" exclude=""/>
</xlights-->
</head>
<body>
<h1>Sequence statistics</h1>
<p>Sometimes you just need to see the stats … and the Tools menu Export Effects has a bunch of stats about your sequence including:</p>
<ul>
<li>A full effect by effect listing in table form including:
<ul>
<li>Start time</li>
<li>End time</li>
<li>Duration</li>
<li>Effect description – if you entered one</li>
<li>The model it is on</li>
<li>Files used by the effect</li>
</ul>
</li>
<li>At the end a summary of your sequence including:
<ul>
<li>How often you used each effect type</li>
<li>The total time each effect type is used</li>
<li>The full list of files your sequence depends upon … images, videos etc</li>
</ul>
</li>
</ul>
</body>
</html>
23 changes: 23 additions & 0 deletions TipOfDay/00020.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<!--xlights>
<tip url="00020.html" title="Sequencer navigation shortcuts" category="Sequencing" level="Advanced" exclude=""/>
</xlights-->
</head>
<body>
<h1>Sequencer navigation shortcuts</h1>
<p>Navigating quickly in the sequencer can save a lot of time:</p>
<ul>
<li>Scroll Wheel – scrolls models up and down</li>
<li>Shift + Scroll Wheel – scrolls time left and right</li>
<li>Ctrl + Scroll Wheel – zooms in and out</li>
<li>Page up/down – scrolls models up and down</li>
<li>Up/Down arrows – moves selected effects between layers/models</li>
<li>Home – jumps to start of sequence</li>
<li>End – jumps to end of sequence</li>
<li>Ctrl + . – remembers where you current at</li>
<li>Ctrl + / - jumps back to the location you just saved with Ctrl + .</li>
</ul>
</body>
</html>
3 changes: 3 additions & 0 deletions TipOfDay/tod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
<tip url="00015.html" title="Random effects" category="Sequencing" level="Beginner" exclude=""/>
<tip url="00016.html" title="Working on large sequences" category="Sequencing" level="Advanced" exclude=""/>
<tip url="00017.html" title="Rendering text across matrix groups" category="Sequencing" level="Intermediate" exclude=""/>
<tip url="00018.html" title="Shift effects" category="Sequencing" level="Intermediate" exclude=""/>
<tip url="00019.html" title="Sequence statistics" category="Sequencing" level="Advanced" exclude=""/>
<tip url="00020.html" title="Sequencer navigation shortcuts" category="Sequencing" level="Advanced" exclude=""/>
</tipofday>
24 changes: 17 additions & 7 deletions xLights/BufferPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,12 @@ BufferPanel::BufferPanel(wxWindow* parent, wxWindowID id, const wxPoint& pos, co
SubBufferPanelSizer->AddGrowableRow(0);
FullBufferSizer->Add(SubBufferPanelSizer, 1, wxALL|wxEXPAND, 0);
ScrolledWindow1->SetSizer(FullBufferSizer);
FullBufferSizer->Fit(ScrolledWindow1);
FullBufferSizer->SetSizeHints(ScrolledWindow1);
FlexGridSizer11->Add(ScrolledWindow1, 1, wxALL|wxEXPAND|wxFIXED_MINSIZE, 0);
Panel3->SetSizer(FlexGridSizer11);
FlexGridSizer11->Fit(Panel3);
FlexGridSizer11->SetSizeHints(Panel3);
Panel4 = new wxPanel(Notebook1, ID_PANEL4, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL4"));
FlexGridSizer15 = new wxFlexGridSizer(0, 1, 0, 0);
FlexGridSizer15->AddGrowableCol(0);
Expand Down Expand Up @@ -386,21 +390,27 @@ BufferPanel::BufferPanel(wxWindow* parent, wxWindowID id, const wxPoint& pos, co
StaticText15 = new wxStaticText(ScrolledWindow2, ID_STATICTEXT1, _("Application Order"), wxDefaultPosition, wxDefaultSize, 0, _T("ID_STATICTEXT1"));
RotoZoomSizer->Add(StaticText15, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 2);
ChoiceRotateOrder = new BulkEditChoice(ScrolledWindow2, ID_CHOICE_RZ_RotationOrder, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T("ID_CHOICE_RZ_RotationOrder"));
ChoiceRotateOrder->SetSelection( ChoiceRotateOrder->Append(_("X, Y, Z")) );
ChoiceRotateOrder->Append(_("X, Z, Y"));
ChoiceRotateOrder->Append(_("Y, X, Z"));
ChoiceRotateOrder->Append(_("Y, Z, X"));
ChoiceRotateOrder->Append(_("Z, X, Y"));
ChoiceRotateOrder->Append(_("Z, Y, X"));
ChoiceRotateOrder->SetSelection( ChoiceRotateOrder->Append(_("X-Y-Z")) );
ChoiceRotateOrder->Append(_("X-Z-Y"));
ChoiceRotateOrder->Append(_("Y-X-Z"));
ChoiceRotateOrder->Append(_("Y-Z-X"));
ChoiceRotateOrder->Append(_("Z-X-Y"));
ChoiceRotateOrder->Append(_("Z-Y-X"));
RotoZoomSizer->Add(ChoiceRotateOrder, 1, wxALL, 1);
RotoZoomSizer->Add(-1,-1,1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
ScrolledWindow2->SetSizer(RotoZoomSizer);
RotoZoomSizer->Fit(ScrolledWindow2);
RotoZoomSizer->SetSizeHints(ScrolledWindow2);
FlexGridSizer15->Add(ScrolledWindow2, 1, wxALL|wxEXPAND, 2);
Panel4->SetSizer(FlexGridSizer15);
FlexGridSizer15->Fit(Panel4);
FlexGridSizer15->SetSizeHints(Panel4);
Notebook1->AddPage(Panel3, _("Buffer"), false);
Notebook1->AddPage(Panel4, _("Roto-Zoom"), false);
FlexGridSizer1->Add(Notebook1, 1, wxALL|wxEXPAND, 2);
SetSizer(FlexGridSizer1);
FlexGridSizer1->Fit(this);
FlexGridSizer1->SetSizeHints(this);

Connect(ID_CHECKBOX_ResetBufferPanel,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&BufferPanel::OnCheckBox_ResetBufferPanelClick);
Connect(ID_CHOICE_BufferStyle,wxEVT_COMMAND_CHOICE_SELECTED,(wxObjectEventFunction)&BufferPanel::OnBufferStyleChoiceSelect);
Expand Down Expand Up @@ -627,7 +637,7 @@ wxString BufferPanel::GetBufferString() {
s += wxString::Format("B_SLIDER_PivotPointX=%d,", Slider_PivotPointX->GetValue());
}
}
if (ChoiceRotateOrder->GetStringSelection() != "X, Y, Z")
if (ChoiceRotateOrder->GetStringSelection() != "X-Y-Z")
{
s += "B_CHOICE_RZ_RotationOrder=";
s += ChoiceRotateOrder->GetStringSelection();
Expand Down
2 changes: 1 addition & 1 deletion xLights/PixelBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2253,7 +2253,7 @@ void PixelBufferClass::SetLayerSettings(int layer, const SettingsMap &settingsMa
inf->rotations = (float)settingsMap.GetInt(SLIDER_Rotations, 0) / 10.0f;
inf->zoom = (float)settingsMap.GetInt(SLIDER_Zoom, 10) / 10.0f;
inf->zoomquality = settingsMap.GetInt(SLIDER_ZoomQuality, 1);
inf->rotationorder = settingsMap.Get(CHOICE_RZ_RotationOrder, "X, Y, Z");
inf->rotationorder = settingsMap.Get(CHOICE_RZ_RotationOrder, "X-Y-Z");
inf->pivotpointx = settingsMap.GetInt(SLIDER_PivotPointX, 50);
inf->pivotpointy = settingsMap.GetInt(SLIDER_PivotPointY, 50);
inf->xpivot = settingsMap.GetInt(SLIDER_XPivot, 50);
Expand Down
12 changes: 6 additions & 6 deletions xLights/wxsmith/BufferPanel.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -813,12 +813,12 @@
<object class="sizeritem">
<object class="wxChoice" name="ID_CHOICE_RZ_RotationOrder" subclass="BulkEditChoice" variable="ChoiceRotateOrder" member="yes">
<content>
<item>X, Y, Z</item>
<item>X, Z, Y</item>
<item>Y, X, Z</item>
<item>Y, Z, X</item>
<item>Z, X, Y</item>
<item>Z, Y, X</item>
<item>X-Y-Z</item>
<item>X-Z-Y</item>
<item>Y-X-Z</item>
<item>Y-Z-X</item>
<item>Z-X-Y</item>
<item>Z-Y-X</item>
</content>
<selection>0</selection>
</object>
Expand Down

0 comments on commit f902af7

Please sign in to comment.