You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 16, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/components/addons/maya-extend/index.html
+20-11Lines changed: 20 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@
72
72
73
73
74
74
<li>
75
-
<ahref="../../..">v0.1.1-Alpha</a>
75
+
<ahref="../../..">v0.1.2-Alpha</a>
76
76
</li>
77
77
78
78
@@ -796,7 +796,7 @@
796
796
797
797
798
798
<li>
799
-
<ahref="../../../../../..">v0.1.1-Alpha</a>
799
+
<ahref="../../../../../..">v0.1.2-Alpha</a>
800
800
</li>
801
801
802
802
@@ -1328,7 +1328,7 @@ <h4 id="create-your-module">Create your module</h4>
1328
1328
</ul>
1329
1329
<p>In the new <code>your_new_module/__init__.py</code> file, you will import or code all the methods you want to expose and make available in Maya, for example to be used in a <em>shelf</em> or any other <em>Python</em> script. You can also register your <em>Ramses</em> callbacks there (read below for more information about <em>Ramses</em> callbacks).</p>
1330
1330
<p>Here is an example of such an <code>__init__.py</code> file, assuming you have two other files (<em>anotherFile.py</em> and <em>aSecondFile.py</em>) in the same folder, containing the actual code and methods to import:</p>
from .aSecondFile import aPublishMethod, anImportMethod
1333
1333
1334
1334
# Now, 'aPublicMethod' can be called from everyhwere in Maya
@@ -1343,13 +1343,15 @@ <h4 id="create-your-module">Create your module</h4>
1343
1343
# The import method
1344
1344
ramses.importScripts.append( anImportMethod )
1345
1345
</code></pre>
1346
+
1346
1347
<h4id="import-the-module">Import the module</h4>
1347
1348
<p>Finally, you just have to import your new module in the <code>ramses_maya</code> module: add a simple import at the end of the <code>ramses_maya/__init__.py</code> file, which should look like this:</p>
<p>Both the new module and the shelf will be automatically registered by the <em>Ramses Maya Add-On</em> when it’s loaded in <em>Maya</em>.</p>
1354
1356
<h4id="example">Example</h4>
1355
1357
<p>A complete and working example has been made available: it is the extension made for the school <ahref="http://rubika-edu.com"><em>Rubika Animation / Supinfocom</em></a>, for the production pipeline of the graduation movies of the students.</p>
<p>The file <code>plug-ins/your_new_module/otherMethods.py</code> creates a few other methods, for example to be used in a <em>Maya shelf</em>.</p>
1475
-
<pre><codeclass="language-py"># otherMethods.py
1481
+
<pre><codeclass="py"># otherMethods.py
1476
1482
1477
1483
def methodForAShelf():
1478
1484
doSomething()
1479
1485
1480
1486
</code></pre>
1487
+
1481
1488
<p>Finally, we just need to import these files in the <code>plug-ins/your_new_module/__init__.py</code> file of our custom module. We can register them here.</p>
1482
-
<pre><codeclass="language-py"># __init__.py
1489
+
<pre><codeclass="py"># __init__.py
1483
1490
from myImportCallbacks import importAsset
1484
1491
from myStatusCallbacks import updateAsset, updateShot
1485
1492
from myPublishCallbacks import publishAsset, publishShot
<p>Don’t change anything else in the file!</p>
1512
1521
<p>Now you can also use <code>methodForAShelf()</code> in an existing or new <em>shelf</em>, which can be stored in the <code>shelves</code> folder if you want it to be deployed with your extension.</p></div>
<p>The <em>Comment</em> command saves the current scene the same way as the <em>Save</em> command, and adds a comment associated with the current version.</p>
1445
1447
<p>This comment is displayed with the corresponding version in all version selection dialogs, both in the add-on itself and in the <em>Ramses Client Application</em>, as shown below.</p>
<p>The <em>Mel</em> and <em>Python</em> corresponding command is: <code>ramSave</code> with its two parameters <code>-sc</code> and <code>c</code>. Read the <ahref="#save"><em>Save</em></a> section for details.</p>
1457
-
<pre><codeclass="language-py"># Python
1459
+
<pre><codeclass="py"># Python
1458
1460
import maya.cmds as cmds
1459
1461
# Save the file with a custom comment
1460
1462
cmds.ramSave(sc = True, comment = "A new comment!")
<p>The <em>Incremental Save</em> runs the save command and forces it to increment to a new version.</p>
1464
1467
<p>The <em>Mel</em> and <em>Python</em> corresponding command is: <code>ramSaveVersion</code> with the parameter <code>updateStatus</code> set to <code>False</code>. Read the <ahref="#update-status-and-publish"><em>Update Status</em></a> section for details.</p>
1465
-
<pre><codeclass="language-py"># Python
1468
+
<pre><codeclass="py"># Python
1466
1469
import maya.cmds as cmds
1467
1470
# Incremental save
1468
1471
cmds.ramSaveVersion( updateStatus=False )
1469
1472
</code></pre>
1473
+
1470
1474
<h2id="update-status-and-publish"><imgalt="" src="../../../img/icons/savestatus.svg" style="width:32px" /> Update Status and Publish</h2>
1471
1475
<p>The <em>Update Status</em> runs the <em>Incremental Save</em> command and updates the current production status of the current Asset or Shot.</p>
1472
1476
<p>A dialog is shown with a few options ot update the status, and to choose to also publish the scene, and create a preview for it. This dialog may differ depending on the use of the <em>Ramses Client Application</em> or not.</p>
<p>The <em>Mel</em> and <em>Python</em> corresponding command is: <code>ramPreview</code>.</p>
1534
-
<pre><codeclass="language-py"># Python
1539
+
<pre><codeclass="py"># Python
1535
1540
import maya.cmds as cmds
1536
1541
1537
1542
# Shows the preview dialog
1538
1543
cmds.ramPreview()
1539
1544
</code></pre>
1545
+
1540
1546
<h3id="playblasts">Playblasts</h3>
1541
1547
<p>When rendering the playblasts, <em>Ramses</em> does not only renders them as usual <em>Maya</em> playblasts: you don’t need to install <em>Quicktime</em> on windows anymore to export videos. <em>Ramses</em> automatically renders the playblasts in a very lightweight <em>MP4</em> video, crafted especially for reviewing animations, with an intra-frame encoding setting which enables frame by frame playblack on every video player, with great performance.</p>
1542
1548
<p><em>Ramses</em> will also automatically play the video as soon as it’s encoded using <em>ffplay</em>, a very efficient and lightweight video player. It may seem complicated at first as it does not have any User Interface, but it is easily controlled with a few shortcuts:</p>
<p>When selecting <em>Other</em> as type, the file will be saved in the main folder of the corresponding step. Read the section about the <ahref="../../files/"><em>Ramses Tree</em></a> for more information.</p>
1561
1567
<p>The <em>Mel</em> and <em>Python</em> corresponding command is: <code>ramSaveAs</code>.</p>
<p>It is not needed to go down all the hierarchy to select a file to open; if you just select an item and a step, <em>Ramses</em> will automatically open or import the corresponding latest version of the main resource. It works the same way when importing items: you don’t need to go all the way down to select the files you want to import; by selecting just the main file, <em>Ramses</em> will import everything available, or, if you’re using an <ahref="../maya-extend/">extension</a> of the <em>Add-on</em> such as the <ahref="../maya-rubika/"><em>Rubika Flavor</em></a>, it will pass all the files to the extension so it can automatically manage the import for you.</p>
1597
1605
<p>When importing an item, <em>Ramses</em> will also trigger custom import scripts registered by the pipeline tools or an extension of the <em>Maya Add-on</em>, such as the <ahref="../maya-rubika/"><em>Rubika Flavor</em></a>. This is one way of automating your workflow, by just registering scripts to be called when publishing and importing items.</p>
1598
1606
<p>The <em>Mel</em> and <em>Python</em> corresponding command is: <code>ramOpen</code>.</p>
<li>The <strong><em>Auto-Increment</em></strong> option sets how many time can be spent before <em>Ramses</em> automatically increments the version of the file when saving. Use this option to be sure you can get back to an earlier version of your work even if you forget to increment the version.</li>
1620
1630
<li>the <strong><em>Save hotkey</em></strong> option replaces the default “<em>Save Scene</em>” <code>[Ctrl + S]</code> hotkey from <em>Maya</em> by the <em>Save</em> command from <em>Ramses</em>. This is recommended to enable all production tracking features of <em>Ramses</em> and ensure an automatic backup of your work. Note that checking this box <strong>does not replace the <code>File/Save</code> menu entry</strong> so you can still use the default <em>Maya Save</em> command.</li>
1621
1631
<li>the <strong><em>Save as hotkey</em></strong> option replaces the default “<em>Save Scene As</em>” <code>[Ctrl + Shift + S]</code> hotkey from <em>Maya</em> by the <em>Save As</em> command from <em>Ramses</em>. Note that checking this box <strong>does not replace the <code>File/Save as...</code> menu entry</strong> so you can still use the default <em>Maya Save as</em> command.</li>
1622
-
<li>the <strong>Open hotkey</strong><em> option replaces the default “</em>Open Scene…<em>” <code>[Ctrl + O]</code> hotkey from </em>Maya<em> by the </em>Open<em> command from </em>Ramses<em>. Note that checking this box </em><em>does not replace the <code>File/Open Scene...</code> menu entry</em><em> so you can still use the default </em>Maya Open* command.</li>
1632
+
<li>the <strong>Open hotkey<strong><em> option replaces the default “</em>Open Scene…<em>” <code>[Ctrl + O]</code> hotkey from </em>Maya<em> by the </em>Open<em> command from </em>Ramses*. Note that checking this box </strong>does not replace the <code>File/Open Scene...</code> menu entry</strong> so you can still use the default <em>Maya Open</em> command.</li>
0 commit comments