SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Mel Scripts & Programming / API issues - node attributes & accessing images
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 22-05-2003, 11:23 PM   #1
Hugh
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

VFXTalk.com - Online Compositing Community - Admin
Hugh is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

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 10:56 PM

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.