Category: Maya

  • Add your new context in UV Texture Editor

    Well, it’s pretty easy to add a command into Maya, and I also believe most of our plugin developers know how to add a context/tool within Maya (Context is actually presented with the name “tool” in Maya), if you are not familiar with that, please refer the Command plug-ins section of help doc for the…

  • The trap while working with API MFnSet::isMember()

    While working with Maya, sometimes, we create a set to handle multiple elements as a whole. We can add DG nodes, DAG components or plugs to the set and MFnSet is used to operate with the set, but there is one trap with the API that you need to know. Most of time, the API…

  • Building SIP, and PyQt for Maya 2016.5

    This is an updated version for Maya 2016.5′ PyQt build instructions. This is an updated version of the Maya 2016 build instructions for PyQt and PySide (here). The very good news is that with Maya 2014 & onward, there is no more need to build PySide as it is coming by default in Maya :)  libxml,…

  • Light Draw Override in Viewport 2.0

    If you use MPxDrawOverride class to override the draw of your custom locator class, you will have to register the draw override as below: static MString drawdb(“drawdb/geometry/light/customLight”); static MString sDrawRegistrantId(“customLightDraw”); plugin.registerNode(“customLight”, customLightNode::m_id, customLightNode::creator, customLightNode::initialize, MPxNode::kLocatorNode, &drawdb); MHWRender::MDrawRegistry::registerDrawOverrideCreator(drawdb, sDrawRegistrantId, MCustomLightDrawOverride::Creator); However, if you want your locator to be classified as light with the same drawdb as…

  • World position and Object position in Shader Fragment

    table, th, td { border: 1px solid black; } When you write a Shader Fragment, you should use the right naming conventions. For example if you check parameters like “mayaUvCoordSemantic” the name should be “uvCoord”, for “tangent” the name should be “mayaTangentIn”. Even if you check the “Object Space Position” the name and the semantic…

  • How to get correct camera within multiple panes

    To get the current camera of the view pane, usually, we can use the API FBRenderer::CurrentCamera to get the camera. But when there are multiple view panes, the API does not work as you expected, it always return back the camera of the 1st view pane, this is a known issue of Motionbuilder. So how…

  • Drawing and Selection tips in VP2.0

    We have 2 options to draw the icon/geometry in VP2.0. The first one is using MUIDrawManager object, and another one is MRenderOverride. If you are developing a plugin using Maya node, both MUiDrawManager and MrenderOverride objects are available at any point in the implementation. One issue is that if you are trying to draw the…

  • How to build customized QT 5.6.1 for Maya 2017 on Windows

    I’ve written an article about how to build PySide2 earlier. Some partners were asking about how to build QT 5.6.1 This is a guide for building QT 5.6.1 on windows. Prerequisite: Visual Studio 2012 Update 4 or Update 5 QT 5.6.1 Ruby 2.1.7(32 bits) Perl for OpenSSL JOM (recommended)   Build Steps:   1. Download…

  • Make RenderTarget larger than 4k in Maya 2016 and 2016 Extension 2

    There is a restriction for Maya 2016 that doesn't allow Maya to use more than 4k textures. As a result, the size of Viewport 2 MRenderTarget is limited to 4096×4096. We've opened a back door to remove this restriction and allow users to use the maximum texture size supported by their graphics card. This is…

  • Setting up Maya Hardware 2.0 using MEl/Python

    Changing the render setting in Maya is straight forward, you can change the Hardware renderer very easily using Maya Render settings Window as you could see in the below image. But, how do you achieve the same thing using script code? If you execute the following code, you will see that Maya renders using "Maya…