Join our discord community

Forum breadcrumbs - You are here:ForumPrism: Feature RequestsMaya ZshotMask Plugin
Please or Register to create posts and topics.

Maya ZshotMask Plugin

Hi there! I was wondering if someone already made some custom plugin for Prism that would support ZShotMask VP2 from Zubrigg. I saw some changes in prism API that would make a plugin easier to make.

I'm not used to write code, I've been trying to make something work a couple of months ago but I was missing some Shot infos from prism (those are now available from latest prism update). If someone has some spare time to help me with this?

The goal would be to create beautiful playblasts with shots infos burned in. So when we click on "playblast" in the State Manager, a script would create the Mask with infos (artist name, shot name, frame stamp, workflow step) and delete everything when back to maya sothat the artist doesn't have to deal with the mask inside the scene.

 

Hi back!

I'm almost getting what I want here ! Yes, as I'm really not into code, I'm really happy with what I've done so far. But I need help for some small little things now ^^

 

I manage to find the right code to use ZShotMask API sothat when I publish a Playblast, a shotmask is created and when the playblast is done, this shotmask is deleted.

I also manage to get the artist name (with "pcore.username"), I also get the project name (with "pcore.projectName").

How can I get the shot name, version and the step (anim, blocking, modeling etc...)? It seems I can get the global project infos, like global path etc, but I cannot find a way to access the actual scene info.

Last thing, it seems that the scene is saved on publish, not after the playblast. If I don't save the scene after the playblast, I can see the shotmask. Maybe I can write a routine on file opening that would kill any existing shotmask object in the scene.

 

Thanks for your help !

If I end up with something working right, I'll share the code here 😉

Hey there! I did some progress! Now I have something working quite fine. When creating a playblast in maya, the script creates the shotmask on the camera (selected in States Manager). It takes the Project Name, the username and the maya scene file name and add those infos on the mask!

 

I still want to get access to the shotname, step and sequenceName , didn't succeed at the moment. I also need to find a way to tell prism to run my script only if I'm creating a playblast from maya and to not run on other DCC apps.

Uploaded files:
  • You need to login to have access to uploads.

Hey @onlyquads,

thanks for putting the effort into the development of this.

In recent Prism versions you can get information about your current scene context from environment variables. For example:

import os
os.environ["PRISM_SHOT"]

Other available variables are PRISM_SEQUENCE,  PRISM_ASSET, PRISM_ASSETPATH, PRISM_STEP, PRISM_CATEGORY, PRISM_USER, PRISM_FILE_VERSION

Another way would be to use this:

filename = self.getCurrentFileName()
data = self.getScenefileData(filename)

This will give you a dict with all the information.

If you want to execute your code only for Maya playblasts you can put your code into an if clause like this:

if pcore.appPlugin.pluginName == "Maya":

Cheers,

Richard

Wow that's the answer I needed! Neat 🙂

 

So here's the prism plugin if someone want it (attached to this post).

  1. You can add it to into Prism/Plugins/Custom and load it through PrismSettings. I tried to comment a bit the code if you want to tweak it for your specific needs.
  2. You'll also need Zurbrigg's ZShotMask VP2 scripts (into maya's plugin and script directories or into your prism project directory under CustomModules/Maya).

When publishing a playblast through Prism State Manager, it will output the shotmask with shot infos and frame counter on the active camera (usually the one you use in the state manager).

 

Uploaded files:
  • You need to login to have access to uploads.

Awesome, thanks for sharing.

Hello everyone!

I recently saw that Chris Zurbrigg updated his ShotMaskVP2 to a new version called "Zurbrigg Advanced Playblast". So the old ShotMaskVP2 is not available anymore. The new shotmask plugin is now a paid plugin and he added some cool features.

We now can have multiple lines of text and even a logo in it.

So I updated the prism integration and added some features too.

With my new integration plugin, the shotmask benefits of several small tweaks:

  • Assets and Shot will have different infos. If you playblast an asset, you'll get the asset name and step. If you playblast a shot you'll get the Sequence name and shot name.
  • You can have your company logo in the playblast

Script installation:

  1. You'll need the new "Zurbrigg Advanced Playblast" available here: https://zurbrigg.com/maya-scripts/zurbrigg-advanced-playblast
  2. Copy the files in "C:\Prism\ProjectFiles\CustomModules\Maya" into "scripts" and "plug-ins" folders so it will be available in all your new prism projects. If you already have your project setup, you can add these in "YOUR_PRISM_PROJECT\00_Pipeline\CustomModules\Maya"
  3. Download and unzip my integration folder to "C:\Prism\Plugins\Custom" and restart maya.
  4. Create your playblast using prism state manager and enjoy

 

Setup for your Logo

In order to have the logo showing up, you need to have a file called "logo.png" here in your project directory: "00_Pipeline\CustomModules\Maya\icons\Logo.png". If there's no "logo.png", well nothing is displayed. If you want to automatically have this logo file on every new project created, simply add it in the main prism installation directory. Mine is located here "C:\Prism\ProjectFiles\CustomModules\Maya\icons"

Shotmask

Uploaded files:
  • You need to login to have access to uploads.

Hello there!

I recently made some improvements to my shotmask integration script.

Here are the changes:

  • Logo path now works for windows/mac/linux
  • Automatic viewport visibility setup from presets using Zurbrigg's preset file (in your maya/script folder):
    • The script will first try to find a "Playblast" preset. You need to create it in the preset file. All the preset options are listed there, you just need to setup a new one that suits your needs. You may have to restart maya when you make changes to the preset file.
    • If the script doesn't find your custom "Playblast" preset, it will use the "Geo" one, as it exist by default when you install zurbrigg's files.
  • Some camera options could mess up the shotmask final look, in order to solve this, these feature will automatically be reset:
    • displayGateMask
    • displayFilmGate
    • displayResolution
    • overscan
  • Added the opacity/color of the shotmask border, by default it's now at 70%. Thanks you @SanderJoon for the clever idea ?
  • The scene is saved again after the shotmask is deleted so it never comes back if you open a playblast scene
  • I cleaned a bit some part of the code, sorry if there are some "ugly/useless" parts in my code, I'm just doing this for fun and learning ?

 

Uploaded files:
  • You need to login to have access to uploads.

Hello, I am unable to install it for Maya 2020. Could you please provide me with detailed instructions on how to install it?