Skip to content

Commit

Permalink
Added saveOTIO to Python.
Browse files Browse the repository at this point in the history
Updated docs.
  • Loading branch information
ggarra13 committed Oct 9, 2023
1 parent 5bcd483 commit 6be8aeb
Show file tree
Hide file tree
Showing 13 changed files with 312 additions and 219 deletions.
2 changes: 2 additions & 0 deletions mrv2/docs/en/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,8 @@ <h2 id="S">S</h2>
</li>
</ul></li>
<li><a href="python_api/io.html#mrv2.io.SaveOptions">SaveOptions (class in mrv2.io)</a>
</li>
<li><a href="python_api/cmd.html#mrv2.cmd.saveOTIO">saveOTIO() (in module mrv2.cmd)</a>
</li>
<li><a href="python_api/cmd.html#mrv2.cmd.savePDF">savePDF() (in module mrv2.cmd)</a>
</li>
Expand Down
Binary file modified mrv2/docs/en/objects.inv
Binary file not shown.
7 changes: 7 additions & 0 deletions mrv2/docs/en/python_api/cmd.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<li class="toctree-l3"><a class="reference internal" href="#mrv2.cmd.prefsPath"><code class="docutils literal notranslate"><span class="pre">prefsPath()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#mrv2.cmd.rootPath"><code class="docutils literal notranslate"><span class="pre">rootPath()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#mrv2.cmd.save"><code class="docutils literal notranslate"><span class="pre">save()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#mrv2.cmd.saveOTIO"><code class="docutils literal notranslate"><span class="pre">saveOTIO()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#mrv2.cmd.savePDF"><code class="docutils literal notranslate"><span class="pre">savePDF()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#mrv2.cmd.saveSession"><code class="docutils literal notranslate"><span class="pre">saveSession()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#mrv2.cmd.saveSessionAs"><code class="docutils literal notranslate"><span class="pre">saveSessionAs()</span></code></a></li>
Expand Down Expand Up @@ -224,6 +225,12 @@
<dd><p>Save a movie or sequence from the front layer.</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="mrv2.cmd.saveOTIO">
<span class="sig-prename descclassname"><span class="pre">mrv2.cmd.</span></span><span class="sig-name descname"><span class="pre">saveOTIO</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#mrv2.cmd.saveOTIO" title="Link to this definition"></a></dt>
<dd><p>Save an .otio file from the current selected image.</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="mrv2.cmd.savePDF">
<span class="sig-prename descclassname"><span class="pre">mrv2.cmd.</span></span><span class="sig-name descname"><span class="pre">savePDF</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#mrv2.cmd.savePDF" title="Link to this definition"></a></dt>
Expand Down
1 change: 1 addition & 0 deletions mrv2/docs/en/python_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
<li class="toctree-l2"><a class="reference internal" href="cmd.html#mrv2.cmd.prefsPath"><code class="docutils literal notranslate"><span class="pre">prefsPath()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="cmd.html#mrv2.cmd.rootPath"><code class="docutils literal notranslate"><span class="pre">rootPath()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="cmd.html#mrv2.cmd.save"><code class="docutils literal notranslate"><span class="pre">save()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="cmd.html#mrv2.cmd.saveOTIO"><code class="docutils literal notranslate"><span class="pre">saveOTIO()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="cmd.html#mrv2.cmd.savePDF"><code class="docutils literal notranslate"><span class="pre">savePDF()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="cmd.html#mrv2.cmd.saveSession"><code class="docutils literal notranslate"><span class="pre">saveSession()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="cmd.html#mrv2.cmd.saveSessionAs"><code class="docutils literal notranslate"><span class="pre">saveSessionAs()</span></code></a></li>
Expand Down
2 changes: 1 addition & 1 deletion mrv2/docs/en/searchindex.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions mrv2/docs/es/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,8 @@ <h2 id="S">S</h2>
<li><a href="python_api/playlist.html#mrv2.playlist.save">(en el módulo mrv2.playlist)</a>
</li>
</ul></li>
<li><a href="python_api/cmd.html#mrv2.cmd.saveOTIO">saveOTIO() (en el módulo mrv2.cmd)</a>
</li>
<li><a href="python_api/cmd.html#mrv2.cmd.savePDF">savePDF() (en el módulo mrv2.cmd)</a>
</li>
<li><a href="python_api/cmd.html#mrv2.cmd.saveSession">saveSession() (en el módulo mrv2.cmd)</a>
Expand Down Expand Up @@ -674,11 +676,11 @@ <h2 id="S">S</h2>
<li><a href="python_api/media.html#mrv2.media.setLayer">setLayer() (en el módulo mrv2.media)</a>
</li>
<li><a href="python_api/timeline.html#mrv2.timeline.setLoop">setLoop() (en el módulo mrv2.timeline)</a>
</li>
<li><a href="python_api/cmd.html#mrv2.cmd.setLUTOptions">setLUTOptions() (en el módulo mrv2.cmd)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="python_api/cmd.html#mrv2.cmd.setLUTOptions">setLUTOptions() (en el módulo mrv2.cmd)</a>
</li>
<li><a href="python_api/settings.html#mrv2.settings.setMemory">setMemory() (en el módulo mrv2.settings)</a>
</li>
<li><a href="python_api/cmd.html#mrv2.cmd.setMute">setMute() (en el módulo mrv2.cmd)</a>
Expand Down
Binary file modified mrv2/docs/es/objects.inv
Binary file not shown.
7 changes: 7 additions & 0 deletions mrv2/docs/es/python_api/cmd.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
<li class="toctree-l3"><a class="reference internal" href="#mrv2.cmd.prefsPath"><code class="docutils literal notranslate"><span class="pre">prefsPath()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#mrv2.cmd.rootPath"><code class="docutils literal notranslate"><span class="pre">rootPath()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#mrv2.cmd.save"><code class="docutils literal notranslate"><span class="pre">save()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#mrv2.cmd.saveOTIO"><code class="docutils literal notranslate"><span class="pre">saveOTIO()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#mrv2.cmd.savePDF"><code class="docutils literal notranslate"><span class="pre">savePDF()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#mrv2.cmd.saveSession"><code class="docutils literal notranslate"><span class="pre">saveSession()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#mrv2.cmd.saveSessionAs"><code class="docutils literal notranslate"><span class="pre">saveSessionAs()</span></code></a></li>
Expand Down Expand Up @@ -224,6 +225,12 @@
<dd><p>Grabar una película o secuencia de la capa de frente.</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="mrv2.cmd.saveOTIO">
<span class="sig-prename descclassname"><span class="pre">mrv2.cmd.</span></span><span class="sig-name descname"><span class="pre">saveOTIO</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">None</span></span></span><a class="headerlink" href="#mrv2.cmd.saveOTIO" title="Link to this definition"></a></dt>
<dd><p>Crear una línea de tiempo desde el clip seleccionado.</p>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="mrv2.cmd.savePDF">
<span class="sig-prename descclassname"><span class="pre">mrv2.cmd.</span></span><span class="sig-name descname"><span class="pre">savePDF</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">bool</span></span></span><a class="headerlink" href="#mrv2.cmd.savePDF" title="Link to this definition"></a></dt>
Expand Down
1 change: 1 addition & 0 deletions mrv2/docs/es/python_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
<li class="toctree-l2"><a class="reference internal" href="cmd.html#mrv2.cmd.prefsPath"><code class="docutils literal notranslate"><span class="pre">prefsPath()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="cmd.html#mrv2.cmd.rootPath"><code class="docutils literal notranslate"><span class="pre">rootPath()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="cmd.html#mrv2.cmd.save"><code class="docutils literal notranslate"><span class="pre">save()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="cmd.html#mrv2.cmd.saveOTIO"><code class="docutils literal notranslate"><span class="pre">saveOTIO()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="cmd.html#mrv2.cmd.savePDF"><code class="docutils literal notranslate"><span class="pre">savePDF()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="cmd.html#mrv2.cmd.saveSession"><code class="docutils literal notranslate"><span class="pre">saveSession()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="cmd.html#mrv2.cmd.saveSessionAs"><code class="docutils literal notranslate"><span class="pre">saveSessionAs()</span></code></a></li>
Expand Down
2 changes: 1 addition & 1 deletion mrv2/docs/es/searchindex.js

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions mrv2/lib/mrvPy/Cmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,16 @@ namespace mrv2
save_movie(file, App::ui, opts);
}

/**
* \brief Save an .otio file with relative paths if possible.
*
* @param file The .otio file, like D:/movies/EDL.otio
*/
void saveOTIO(const std::string& file)
{
save_timeline_to_disk(file);
}

#ifdef MRV2_PDF
/**
* \brief Save a PDF document.
Expand Down Expand Up @@ -519,6 +529,11 @@ Used to run main commands and get and set the display, image, compare, LUT optio
_("Save a movie or sequence from the front layer."), py::arg("file"),
py::arg("options") = mrv::SaveOptions());

cmds.def(
"saveOTIO", &mrv2::cmd::saveOTIO,
_("Save an .otio file from the current selected image."),
py::arg("file"));

#ifdef MRV2_PDF
cmds.def(
"savePDF", &mrv2::cmd::savePDF,
Expand Down
32 changes: 31 additions & 1 deletion mrv2/po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mrv2 v0.7.7\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2023-10-09 11:31-0300\n"
"POT-Creation-Date: 2023-10-09 15:32-0300\n"
"PO-Revision-Date: 2023-02-11 13:42-0300\n"
"Last-Translator: Gonzalo Garramuño <[email protected]>\n"
"Language-Team: Spanish <[email protected]>\n"
Expand Down Expand Up @@ -1927,6 +1927,19 @@ msgstr "Atrapé excepción: "
msgid "Expanded OCIO config to:"
msgstr "Config OCIO expandida a:"

msgid ""
"Expected a handle to a Python function or to a tuple containing a Python "
"function and a string with menu options in it."
msgstr ""
"Se esperaba un identificador para una función de Python o para una tupla que contiene una función de Python y una cadena de texto con opciones de menú, como __divider__."

msgid ""
"Expected a tuple containing a Python function and a string with menu options "
"in it."
msgstr ""
"Se esperaba un tuple conteniendo una función de Python y ona cadena de texto "
"con opciones de menú, como __divider__"

msgid "Exposure Less"
msgstr "Menor Exposición"

Expand Down Expand Up @@ -2429,6 +2442,20 @@ msgstr "Imagen/Versión/Previa"
msgid "Images (*.{"
msgstr "Imagenes (*.{"

msgid ""
"In '{0}' expected a function a tuple containing a Python function and a "
"string with menu options in it."
msgstr ""
"En '{0}' experaba un tuple conteniendo una función de Python y una cadena "
"de texto con opciones de menú en ella."

msgid ""
"In '{0}' expected a function as a value or a tuple containing a Python "
"function and a string with menu options in it."
msgstr ""
"En '{0}' experaba una función como valor o un tuple conteniendo una función "
"de Python y una cadena de texto con opciones de menu en ella."

msgid "In High"
msgstr "In Alto"

Expand Down Expand Up @@ -3801,6 +3828,9 @@ msgstr "Grabar una película o secuencia de la capa de frente."
msgid "Save a session file."
msgstr "Grabar Sesión."

msgid "Save an .otio file from the current selected image."
msgstr "Crear una línea de tiempo desde el clip seleccionado."

msgid "Save annotations."
msgstr "Grabar Anotaciones."

Expand Down
Loading

0 comments on commit 6be8aeb

Please sign in to comment.