Pages

Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Saturday, 29 December 2018

global hotkey in Maya

Here is some nice work with Maya UI environment and python scripting. Forward this useful tutorial from bindpose.com here:

https://bindpose.com/custom-global-hotkey-maya/


Thursday, 29 June 2017

Qt Creator IDE - Qt Designer for Windows

In case you need to use Qt Designer for Windows and you just use it occasionaly or cannot invest too much, you can use Open Source version. This can be downloaded from here (choose OpenSource):
https://info.qt.io/download-qt-for-application-development
or here:
http://download.cnet.com/Qt-Creator-IDE/3000-2212_4-75300653.html
Then if you are just starting to learn this tool and Design tab is greyed out, make sure that you select the *.ui file from the files dropdown in Edit mode, usualy its mainwindow.ui. Then the Design mode should become active and you can start easy visual creation of the GUI.



Thursday, 18 May 2017

Maya python UI passing argument in command

Here is example of Maya UI code in case you need to build in a command to UI element which passes an argument.
More about this technique here:
http://download.autodesk.com/us/maya/2011help/pymel/ui.html

Note - this is all one function myUI(), where buttonPressed is function defined inside that function. It doesn`t have to be, but this way it is localised and only visible to the UI function.

import maya.cmds as mc

def myUI():

    def buttonPressed(name):
        print "pressed %s!" % name

    win = mc.window(title="My Window")
    layout = mc.columnLayout()
    btn = mc.button( command = lambda *args: buttonPressed('chad') )

    showWindow()



Monday, 9 May 2016

Maya shortest edge path command

In case you wondered which command will give you shortest edge path from 2 selected vertices, here is the example:

cmds.polySelect( 'pPlane1', shortestEdgePath=(10, 100) )


I was just solving one task involving search for centre vertex on arbitraty component of mesh and this edge path realled helped to add more topology constraints.

Sunday, 24 April 2016

Eclipse installation

For users of Eclipse or those who are thinking about using Eclipse. I just tested new Eclipse installer and it just works great. No Error Code 13 and such things with Java. Saying that I had JVM (Java Virtual Machine) already installed. But this is the most simple installation. Tested on Windows 7 64 bit. Just follow this link:
https://wiki.eclipse.org/Eclipse/Installation

For those programming with Python choose C/C++ build and then once running Eclipse, go to Help / Install New Software to add PyDev extension. More about that here:
http://www.pydev.org/download.html
 

Sunday, 10 April 2016

Maya.env tips

Since I had to fix something with my Maya.env file I thought it would be good to also share some example for Maya users who want to make their own Maya library in a specific place on disk or network.

Below is example of Maya.env file with custom path to MEL scripts, python scripts and plugins.
Note that plugins contain both path to python scripted plugins as well as C++ compiled plugins. Also plugins unlike scripts are stored under Maya version specific folder. Should be done for scripts too, but usually it`s not needed.

TIP: you can also use USER_SCRIPT_PATH in your Maya MEL script sourcing function. If you recursively source every subfolder from here, you have all MEL scripts available after Maya starts. This is done from a userSetup.mel which is special Maya file you can define. And as long as it is found in MAYA_SCRIPT_PATH it will be executed first after Maya starts.

TIP: By defining USER_SCRIPT_PATH you get this relative root folder and if you move your library to different place or computer, you just change this one and your library can be found by Maya again.

More about userSetup.mel here:
https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Maya/files/PC-Run-MEL-commands-whenever-Maya-starts-up-htm.html

Autodesk documentation about defining Maya.env variables:
https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/Maya/files/GUID-DB30AAB7-4639-4C3B-A479-7F26D953E0F2-htm.html

Example Maya.env file content on Windows OS:

USER_SCRIPT_PATH = C:\Users\syntetik\Documents\maya_tools

MAYA_SCRIPT_PATH = %USER_SCRIPT_PATH%\mel\mystuff;%USER_SCRIPT_PATH%\mel\thirdparty;%USER_SCRIPT_PATH%\mel\startup
PYTHONPATH = %USER_SCRIPT_PATH%\python\

USER_PLUGIN_PATH = %USER_SCRIPT_PATH%\plugin\maya2016
MAYA_PLUG_IN_PATH = %USER_PLUGIN_PATH%\mystuff;%USER_PLUGIN_PATH%\my_scripted;%USER_PLUGIN_PATH%\thirdparty_scripted;%USER_PLUGIN_PATH%\thirdparty

Thursday, 5 November 2015

fStretch for Maya FREE and Open Source

So I found by accident that fStretch - cool stretch-driven blendShape deformer for Maya has been made open source and donation based.
http://www.cgaddict.com/

Versions up to Maya 2015 are also available at Autodesk Exchange Server:
https://apps.autodesk.com/MAYA/en/Detail/Index?id=appstore.exchange.autodesk.com%3afstretch%3aen

Here is link to source code and all plugin builds:
http://www.cgaddict.com/real-download.html


Sunday, 28 June 2015

Cg & programming keyboard

So this is my latest keyboard. Connect IT LED illuminated. Keys are classic layout, not too hard to press but still with feedback.
Feels very comfortable for typing. I've also added soft pad to reduce the noise which comes from the table when typing. I can recommended this one. As a nice bonus there is control for volume and other multimedia functions with Fn key combination.

Tuesday, 21 April 2015

Maya architecture overview

This is where I found that Maya has over 600 commands and 900 nodes.

http://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2015/ENU/Maya-SDK/files/GUID-F584322E-4A12-4995-9F4E-A38D4331808F-htm.html

I know lot of people are making function that are not needed, because there is already some command or flag, which can deal with it. Similar with API classes. It is really worth reading Maya docs, searching for a suitable command or googling it or wondering there and often something usefull can be found. Because lot of these "gems" are not advertised at all. But it has a lot of potential.

Sunday, 19 April 2015

PyQt for Maya on Windows platform

this definitely helped me to get PyQt working in Maya on Windows


Mainly people just need to run PyQt within Maya to build and use their UIs. These can be made previously in other enviornments, usually with Qt Designer or just coded.

Wednesday, 4 December 2013

MPC goes for site license of Fabric Engine : Splice

Leading VFX vendor Moving Picture Company recently went into full site license deal for 3d tools development platform from Fabric Engine. Software under name Splice API is a commercial solution for application independent development of tools like Real Time Renderer, Geometry Deformers, Animation Solvers, Procedural Geometry Generation, Crowd Simulation and others. Package offers python scripting and compilable yet simple language KL which allows developpers and TDs to focus on the algorithms and not worry about memory and compilation issues. Fabric Engine has developped its own compilers and aims to support seamless GPU support using the same code. Performance is one of the main focuses of this development platform. Ultimately Splice API can bring down costs of high end tools development which is either not viable for many studios or costly for others maintaining teams of programmers often developping the same tools in every studio only to get the basic libraries with profit in production as longer term goal. Fabric Engine developped a software which could change that. Press release is below:
http://fabricengine.com/2013/12/mpc-purchase-global-site-license-of-fabric-engine/


Fabric Engine & MPC Global Site License interview from Fabric Engine on Vimeo.

Tuesday, 22 October 2013

Computer Graphics Programming Techniques and Ray Tracing Tutorials » www.scratchapixel.com

Scratchapixel is the first complete interactive resource on the web for anyone (beginner or expert) who seeks to learn 2D and 3D computer graphics techniques from the ground up. Follow the link to find out more about who we are, what you will find here and why scratch-a-pixel is the right place for you to learn these techniques.

Computer Graphics Programming Techniques and Ray Tracing Tutorials » www.scratchapixel.com

Sunday, 8 September 2013

Michael Abrash Interview (Quake, Game Programming)

Michael Abrash is an icon in game programming. This is a nice short interview about his recent work at Valve, where he focused on Virtual Reality control programming, he mentiones his past work, beginnings and shares some advice for new game developpers.

Monday, 26 August 2013

Bloodshed download link

If you needed a free C++ compiler under Windows, Bloodshed is probably a common choice. But you could have a problem with missing GNU C compiler (GCC). This link has installation file which contains Mingw to simulate GCC on Windows, file size 8.9 mb.
http://sourceforge.net/projects/dev-cpp/files/Binaries/Dev-C%2B%2B%204.9.9.2/devcpp-4.9.9.2_setup.exe/download