Mar
07

Local Meetups

For quite a while I have been on a search for local groups or chapters of organizations where fellow animation professionals can meet one another and share experiences, knowledge, and maybe a laugh or two. Thus far I have come up with very little outside of the local siggraph which doesn’t meet as often as I would like. This lead me into thinking maybe its just best to form my own. I would be very interested in setting up monthly gathering of like minded cg artists to strengthen the local community.

If anybody here is also a local to the Greater Orlando area and interested in getting to know your fellow artist I would love to hear from you. If you know of or can provide a venue to host a small crowd, preferably with open seating, open internet/WiFi access and plenty of outlets for laptops or PCs already setup, then I most defiantly want to hear from you. After all in a field that revolves around computers, its kind of hard to share with out some at the handy.

Right now these are just thoughts and ideas I am contemplating, so this is more of a fact finding mission to see if there is enough of a demand and how doable it would be. But with how many creative minds are in this area alone, I see no problem in making these dreams a reality.

Please contact me at OrlandoCGArtists@gmail.com and let me know what you think of the idea. Feel free to give some feedback and options. If you feel like opening up a little, I love to hear more about you. What animation or other creative talents you have and why you are as excited about meeting your fellow artist as much as I am.

I look forward to hearing from you all and I hope one day meeting you face to face.

Feb
14

The Flying Circus comes to town

So after years of admittedly putting it off, I have finally taken the plunge into learning some python for Maya. Sure I have looked at it, and even tried to use it before. However I had gotten so experienced with MEL that I didn’t want to waste time learning a new language when I wanted to write a script “right now”. So I put it of and put it off till I ran across this book at Barnes and Noble. Maya Python for Games and Film, a recent published book covering all the ins and outs of Mayas Python API. It inspired me to finally give python a good hard look, and see what I could do with it.

I decided to start out by rewriting an old script of mine, one of my first “big” scripts from years ago. Now being I had previous experience with C++ before MEL I knew, and admittedly forgot some of, the advantages of a class based Object Oriented Language. Not to mention how to properly use it, so none of that will be in the next example. However it will be soon.

'''----------------------------------------------------------------------

    maya python script

    Curve to Joints
    pyV:1.0

    python rewrite of Curve to Joints Mel script

    Feb 11 2012 By Jeremy Hagan : JHagan@xupsetup.com

----------------------------------------------------------------------'''

import maya.cmds as cmds

# user gui
def jhJointsOnCurve(jocWindow = 'jocWindow', sizeW=220, sizeH=285):

# Check for and delete existing windows of same name
    if (cmds.window(str(jocWindow), exists=True)):
        cmds.deleteUI(str(jocWindow))

# Window Create
    shWindow = cmds.window(str(jocWindow), title='Joints on Curve', \
                            resizeToFitChildren=False, \
                            widthHeight=(sizeW, sizeH))
# Layout
    cmds.columnLayout( adjustableColumn=True, rowSpacing=5, columnAlign = 'center', \
                      columnAttach = ('both', 5))

# Controls
    cmds.separator ( height = 5, style ='none')
    cmds.text('jocNameCurve', label = 'Curve Name')
    curveText = cmds.textField ('jocCurveInput', text='curve name here')
    cmds.text('jocNameJoints', label='Name of Joint Chain')
    #useCurveCheck = cmds.checkBox('jocUseCurve', label='Use Curve Name') # to emp later
    nameText = cmds.textField ( 'jocSetName' , text='CurveNameHere')
    cmds.separator ( height = 10, style = 'single' )
    numberSlide = cmds.intSliderGrp('jocNumJoints', field = True, label='Number of Joints', value = 5)
    cmds.separator ( height = 20, style = 'in' )

# Execute button
    createButton = cmds.button( label='Create Chain', \
                                command=lambda x:jhConnectJointsOnCurve( \
                                cmds.textField(curveText, query = True, text = True),\
                                cmds.textField(nameText, query = True, text = True) , \
                                cmds.intSliderGrp(numberSlide, query = True, value = True) ) )
    cmds.setParent( '..' )
    cmds.showWindow(shWindow)

# def for creating joints along curve
def jhConnectJointsOnCurve (curve, name, number, spline = False, strech = False):

    cmds.undoInfo(openChunk=True)

# grab some data
    degree = cmds.getAttr(str(curve) + ".degree")
    cvspans = cmds.getAttr(str(curve) + ".spans")

    post = 0
    spans = 1.0/number

# Set some var for keeping track
    jointsInChain = []
    jLocate = []
    sLocate = cmds.group(empty = True, name = 'temLoc')

    newSpans = number
    tmpPath = cmds.pathAnimation(sLocate, curve = str(curve), fractionMode = True, name = 'PathTemp')

# move tmpPath along curve to locations for joints and place temp groups
    for grp in range(0, number + 1):

        if(grp > 0):
            post = spans * grp

        cmds.setAttr((str(tmpPath) + ".uValue"), post)

        jLocate.append(cmds.group(empty = True, name = ("Loc" + str(grp))))

        cmds.xform(jLocate[grp], translation = cmds.xform(sLocate, query = True, translation = True))

# make new joints at postions of temp grp locators.
    cmds.select(deselect = True)

    for joints in range(0, newSpans + 1):
        jointsInChain.append( cmds.joint( name = (str(name) + '_' + str(joints)), \
                            position = cmds.xform(jLocate[joints], query = True, translation = True)) )

# Quick orient
    cmds.joint(jointsInChain, edit = True , \
                zeroScaleOrient = True, orientJoint = 'xyz', secondaryAxisOrient = 'yup')

    cmds.joint(jointsInChain[number], edit = True, orientation = (0, 0, 0))

# cleanup

    cmds.delete(str(sLocate))
    for trash in jLocate:
        cmds.delete(str(trash))

    cmds.undoInfo(closeChunk=True)

# Pass on list of joints created
    return jointsInChain

So nothing to wild just yet, and honestly not much different then the MEL counter part other then being a tad bit more efficient. But of course the next step is to play around with some class structures and see where it takes me. Feel free to point out any tips and advice as to what to do differently with this. Just remember I am still thinking “MEL” and its way of doing things, so it will take a bit for me to relearn my coding structures.

Dec
12

Online

Currently in the process of transferring my domain to the new host for all to see. Xupsetup.com will rise again!

Nov
22

Work in Progress and Progress being made.

Time for the first official post of xupsetup.com V5.0…. or is it 6.0… 5.56? Well whatever version we are on, its a new and improved design. After having my last version deleted with my previous hosting site I figured it was a good time for a rework. So if you have come across this page despite not yet being live, there is more coming soon. So please come again and comments are always welcome.