nodeType fails for -inherited flag

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
Old 06 June 2013   #1
nodeType fails for -inherited flag

edit: oops, actually this should have been posted in the "programming" section...


I tried to use the "-inherited" flag of the "nodeType" command.
It works when I use it for something like "camera".
But when I try to use it for "mesh", or "lattice", the command gives an empty return string.

Could anybody please verify my result?

Here`s the script for the test:

1. List all derived nodeTypes for the "shape" type:
string $derivedFrom[] = nodeType( "-derived", "-isTypeName", "shape" );

Here you can see that "mesh" is listed as a derived type ( which should actually be obvious ).

2. Do a positive inherited test for "camera":
string $inheritedBy[] = nodeType( "-inherited", "-isTypeName", "camera" );

This should give you the list of all nodes where "camera" inherits from.

2. Do the test for "mesh":
string $inheritedBy[] = nodeType( "-inherited", "-isTypeName", "mesh" );

So, here my return string is empty. What is yours?


Last edited by sciLoop : 06 June 2013 at 02:13 PM.
Old 07 July 2013   #2
string $derivedFrom[] = `nodeType -derived -isTypeName -shape`;
Nothing last forever
Old 07 July 2013   #3
Originally Posted by f3rry: string $derivedFrom[] = `nodeType -derived -isTypeName -shape`;

I guess you ment "shape" instead of "-shape".
Moreover, the "shape" wasn`t the problem. It was the "mesh" with the "inherited" flag.

Anyway it doesn`t matter if I choose the mel command style or the function style.
For both types, I get an emtpy return string.
Old 07 July 2013   #4
Hey, its not that difficult.
Could someone please simple execute that little mel:
string $inheritedBy[] = nodeType( "-inherited", "-isTypeName", "mesh" );

and tell if he/she gets an empty return string or the node types which "mesh" inherits from?

Old 07 July 2013   #5
Yes I can verify but what is it you're trying to resolve. I think what you're seeing is that fact the 'mesh' is a base node and not inherited
Founder & CEO : Red9Consultancy
Red9 StudioPack : Red9 StudioPack GitHub
Author: Autodesk Masterclass 2011 - 'Live Animation Binding'
Old 07 July 2013   #6
Originally Posted by Mark-J: Yes I can verify but what is it you're trying to resolve. I think what you're seeing is that fact the 'mesh' is a base node and not inherited

Thank you very much, Mark!
'mesh' inherits from other nodes. Try this:
string $derivedFrom[] = nodeType( "-derived", "-isTypeName", "shape" );

You will easily see that 'mesh' inherits from 'shape' ( its in the resulting list, I thought thats obvious, but maybe I`m getting something toally wrong?!?? ).

Okay, in case I`m right this is just a bug, what do you think?

Originally Posted by Mark-J: what is it you're trying to resolve

I wanted to see whether a nodeType is also of type 'shape'.
Old 07 July 2013   #7
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

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
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 09:32 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.