Wednesday, August 27, 2014

Camera Projection and smoke creation in nuke


Custom Python Script For Rotomation ------------- by Arif Rahman

I started my carrier as a "Rotomation Artist" after few months of my joining i analyzed the we all are doing few file managing task that takes more than 20 each shot per artist. I came up with an idea to shorten this task to save time and i was assuming that it can be done using python script. I started working on it in my spare time and gradually i wrote a python script in Maya that was very helpful and after testing everyone started using it.

After that i wrote its second version with some another changes suggested by my colleagues. Here i want to share that script you all.

I will update a video showing the use of my script soon.

--------------------------------------------

#AutoMeshCombinerV2
import maya.cmds as cmds
if cmds.window ('arif', exists=1 ):
       cmds.deleteUI ('arif', window=1)
window = cmds.window('arif',title = "AutoMeshCombinerV2")
cmds.columnLayout(adjustableColumn = True)
getName = cmds.textFieldButtonGrp(adj = True, ed = False, l='Selected Object', text= 'Select Object', buttonLabel='Get Name', ann = '"Get the name of selected mesh" -A Tool By Arif Rahman', bc = "selObj()")
valStr = cmds.textFieldButtonGrp( label='Input Object Name',adj = True,text = 'Desired Name', buttonLabel='Change', bc = "log()", ann = '"Take out the mesh from the rig group and remane" - A Tool By Arif Rahman' )
button = cmds.button(l="close", c = "cmds.deleteUI('arif', window=0)", ann = 'Close the window')
cmds.frameLayout(labelAlign='center', borderStyle='out', h = 500, lv=0 )
panel = cmds.outlinerPanel()
outliner = cmds.outlinerPanel(panel, query=True,outlinerEditor=True, mbv = 0, up = 1)
cmds.outlinerEditor( outliner, edit=True, mainListConnection='worldList', selectionConnection='modelList', showShapes=False, showAttributes=False, showConnected=False, showAnimCurvesOnly=False, autoExpand=False, showDagOnly=True, ignoreDagHierarchy=False, expandConnections=False, showCompounds=True, showNumericAttrsOnly=False, highlightActive=True, autoSelectNewObjects=False, doNotSelectNewObjects=False, transmitFilters=False, showSetMembers=True, setFilter='defaultSetFilter' )
cmds.showWindow( window )
def log():
       doSel =  cmds.isTrue( 'SomethingSelected' )
       if doSel <= 0:
              cmds.headsUpMessage( 'select an object' )
       else:
              getStr = cmds.textFieldButtonGrp(valStr, query=True, text=True)
              list = cmds.ls(sl = True)
              size = len(list)
              if size >= 2:
                     cmds.polyUnite()
              verSel = cmds.ls(sl=True)
              refObj = cmds.polyPlane(sw = 1, sh = 1)
              print refObj
              cmds.polyUnite ( verSel[0], refObj[0] , name = getStr)
              cmds.delete (refObj[0])
def selObj():
       doSel =  cmds.isTrue( 'SomethingSelected' )
       if doSel <= 0:
              cmds.headsUpMessage( 'select an object' )
       else:
              sel = cmds.ls (sl = 1)
              cmds.textFieldButtonGrp (getName,edit= True, text=sel[0])

-------------------------------------------

How to run this script

1) open your script editor and add a python tab
2) copy and paste the script in python tab
3) select all the controllers (For Rotomation)
4) now select  the code and ctrl+enter (For Rotomation)
5) work is done check your outliner (For Rotomation)

you can add this script in your custom shelf just select the code from the script editor (python), drag and drop with MMB to your shelf.



enjoy........

Saturday, January 18, 2014

Wow My name is in the credit list.

Hi,

I am very much excited for this post because here i am going to update an image have my name in the credit list of a movie and for an artist this is the best reward of his work.

I contributed in this movie as a Vfx Paint artist.

and i will compile few of the shots that i did for this movie and i will update very soon.

Mr. Go 3d Credit List
Mr. Go 3D Credit List

Python script for Rigging.

Hi guyz,

Here is a python script that I have written for all who is interested in rigging. this script will save your time. It will make group of each controller and rename the new created group accordingly followed by the controller name. I hope it will be helpful for you all.

import maya.cmds as cmds
list = cmds.ls(sl = True)
size = len(list)
for i in range (0, size, 1):
    b = list[i] + '_grp'
    cmds.group(list[i], name=b)

i will tell you how to run this script

1) open your scrip editor and add a python tab
2) copy and paste the script in python tab
3) select all the controllers
4) now select  the code and ctrl+enter
5) work is done check ur outliner

you can add this script in your custom shelf just select the code from thescript editor (python), drag and drop with MMB to your custome shelf.

I will update one video to show you how to use it soon.

enjoy..


Regards
Arif Rahman..