Skip to content

Commit b6c756d

Browse files
committed
Openlime viewer code for casting and saving.
1 parent c0f69f2 commit b6c756d

File tree

5 files changed

+26
-3
lines changed

5 files changed

+26
-3
lines changed

relightlab/res.qrc

+5
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,10 @@
8585
<file>icons/light/scalable/chevrons-down.svg</file>
8686
<file>icons/light/scalable/chevrons-up.svg</file>
8787
<file alias="relight.png">../build_scripts/relight.png</file>
88+
<file alias="demo/index.html">../demo/index.html</file>
89+
<file alias="demo/openlime.min.js">../demo/openlime.min.js</file>
90+
<file alias="demo/skin.svg">../demo/skin.svg</file>
91+
<file alias="demo/skin.css">../demo/skin.css</file>
92+
8893
</qresource>
8994
</RCC>

relightlab/roadmap.md

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
* dark theme on windows conflicts
3838
* Accessing the crop tab before loading the project causes it to stop working.
39-
* ptm and hsh number of planes cannot be changed.
4039
* check for invalid inner circle when creating a sphere.
4140
* test pause/stop/play in queue.
4241
* deal with #lights different from #images

relightlab/rtiplan.cpp

+16-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RtiPlanRow::RtiPlanRow(RtiParameters &param, QFrame *parent): QFrame(parent), pa
2828

2929
layout->addStretch(1);
3030

31-
QFrame *buttonsFrame = new QFrame;
31+
buttonsFrame = new QFrame;
3232
buttonsFrame->setMinimumWidth(860);
3333
buttonsFrame->setFrameStyle(QFrame::Box);
3434

@@ -290,7 +290,16 @@ void RtiQualityRow::allowLossless(bool allow) {
290290
losslessbox->setEnabled(allow);
291291
}
292292

293-
RtiWebLayoutRow::RtiWebLayoutRow(RtiParameters &parameters, QFrame *parent): RtiPlanRow(parameters, parent) {
293+
RtiWebLayoutRow::RtiWebLayoutRow(RtiParameters &parameters, QFrame *parent):
294+
RtiPlanRow(parameters, parent) {
295+
//reparent buttons to make space for export openlime viewer checkbox
296+
QVBoxLayout *content = new QVBoxLayout;
297+
delete buttons;
298+
299+
buttonsFrame->setLayout(content);
300+
buttons = new QHBoxLayout;
301+
content->addLayout(buttons);
302+
294303
label->label->setText("Web layout:");
295304
label->help->setId("rti/web_layout");
296305

@@ -316,6 +325,11 @@ RtiWebLayoutRow::RtiWebLayoutRow(RtiParameters &parameters, QFrame *parent): Rti
316325
group->addButton(deepzoom);
317326
group->addButton(tarzoom);
318327
group->addButton(itarzoom);
328+
329+
QCheckBox *openlime = new QCheckBox("Add openlime viewer code.");
330+
openlime->setChecked(parameters.openlime);
331+
connect(openlime, &QCheckBox::stateChanged, [this](int state) { this->parameters.openlime = state > 0; });
332+
content->addWidget(openlime);
319333
}
320334

321335
void RtiWebLayoutRow::setWebLayout(RtiParameters::WebLayout layout, bool emitting) {

relightlab/rtiplan.h

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class QSpinBox;
1111
class QLabelButton;
1212
class HelpLabel;
1313
class QHBoxLayout;
14+
class QVBoxLayout;
1415
class QLineEdit;
1516

1617
class RtiPlanRow: public QFrame {
@@ -21,6 +22,7 @@ class RtiPlanRow: public QFrame {
2122
RtiParameters &parameters;
2223
HelpLabel *label = nullptr;
2324
QHBoxLayout *buttons = nullptr;
25+
QFrame *buttonsFrame = nullptr;
2426
};
2527

2628

relightlab/rtitask.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ void RtiTask::run() {
8686
} else
8787
builder->save(output.toStdString(), parameters.quality);
8888

89+
if(parameters.openlime)
90+
openlime();
91+
8992
} catch(std::string e) {
9093
error = e.c_str();
9194
status = STOPPED;

0 commit comments

Comments
 (0)