Zaxxon21
03-09-2005, 03:18 PM
In mel there is a type and an exact type.
I want to create a class hierarchy of MPxNodes, call them classes A, and B, such that a query of ls -type A, or ls -type B, both return objects of type B.
So essentially B inherits the attributes of A, has an exact type of B, and a type of A.
How can I create classes in the API so that these queries work?
I have tried to do the following:
1. I registered both the A and B nodes
2. In A I added the following method: virtual bool isAbstractClass () const{ return true; };
3. In B I added the following method: virtual bool isAbstractClass () const{ return false; };
4. In B's initialize method I called: inheritAttributesFrom( "A" );
Steps 1-4 did not seem to work, what am I missing?
Thanks!
I want to create a class hierarchy of MPxNodes, call them classes A, and B, such that a query of ls -type A, or ls -type B, both return objects of type B.
So essentially B inherits the attributes of A, has an exact type of B, and a type of A.
How can I create classes in the API so that these queries work?
I have tried to do the following:
1. I registered both the A and B nodes
2. In A I added the following method: virtual bool isAbstractClass () const{ return true; };
3. In B I added the following method: virtual bool isAbstractClass () const{ return false; };
4. In B's initialize method I called: inheritAttributesFrom( "A" );
Steps 1-4 did not seem to work, what am I missing?
Thanks!
