Maya Training

Creating characters In Maya and Zbrush

Maya Training

Creating character renders in Maya 2017 and Arnold

Maya Training

Spach-Alspaugh House the complete courseware
You are here > Home > SimplyMaya Community Forums

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 23-05-2003, 12:23 AM   #1
Registered User
Hugh's Avatar
Join Date: Nov 2002
Location: Bristol, UK
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default API issues - node attributes & accessing images

I posted this on the maya-dev list, but haven't had a reply yet, so I thought I'd try it on here too....

I've only just started using the Maya API, and as my 'learning' project, I'm doing a few shader nodes - putting some simple compositing features into the hypershader....

The two nodes that I've done so far work fine, but I am trying to make them easier to control...

Is there a way of creating custom attribute controls? I've currently got 4 float sliders that act independently. The ideal control for this would be four markers on the same slider, and some constraint that stops them passing each other. (If you're interested, this is a Luma Key node and the four are the upper and lower threshold and tolerance values)

Another area that I'm not entirely sure about (I'm working my way through David Gould's book, and regularly refer to the Maya docs) is accessing parts of a texture outside of the current point... (in that the shader nodes mainly work on a single point, and just use one pixel value at a time - I'm creating a 'blur' node that needs to be able to access pixel values around the current one...) - I'm also hoping to be able to create a histogram to be shown in the luma key attributes, and, to do that, I'd need to access the rest of the image/texture too...

The third part that is giving me troubles is arrays of attributes... I've used nAttr.setArray(true), which, when I link an element to it in the hypershader, adds [0] to the attribute name, but I can't add more elements - I can only replace the one I've already placed. I've tried using a MArrayDataBuilder - setting the grow size. I've just had a thought on this one, though - do I have to have my own code to expand the array when I place a link - I had assumed that it would do this for me...

Anyway, any help would be hugely appreciated!
Hugh Macdonald

UnFramed Productions
Goodnight Opus - TD Lead - Online Compositing Community - Admin
Hugh is offline   Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Problem - Unable to change attributes for multiple objects anthonysw3 Technical Issues 4 04-12-2010 11:56 PM

Thread Tools

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2017 SimplyMaya - vBulletin® Copyright © 2000-2017, Jelsoft Enterprises Ltd.