Hi Guys!

The tutorial is about how to create subclass for nodes.
What if I want to inherit pymel.core.Attribute class for my subclass?

David

2012. június 21., csütörtök 4:09:40 UTC+2 időpontban elrond79 a következőt 
írta:
>
> Hi Yury - what you're looking for is pymel "virtual classes" - there's an 
> example here:
>
> https://raw.github.com/LumaPictures/pymel/master/examples/customClasses.py
>
> Or, Jason Parks has kindly written up a nice little tutorial:
>
> http://www.jason-parks.com/artoftech/?p=225
>
> Let me know if there's anything you have questions about!
>
>  - paul
>
> On Wed, Jun 20, 2012 at 3:30 PM, ynedelin <[email protected] <javascript:>
> > wrote:
>
>> hey Guys
>> I think I am totally thinking wrong about this, please explain.
>>
>> so I would like to inherit the nt.Transform and i am not sure how to do 
>> it.
>>
>> for example can I do this?
>>
>>
>>
>>
>>
>>
>>
>> *import pymel.core as pmclass MyTrans(pm.nt.Transform):   t = "test"n = 
>> MyTrans("pCube1")#does not work*
>> I am trying to do this:
>> Let say I have a rig control and it is a Maya transform but it also has a 
>> bunch of my rig specific info on it like custom attributes. 
>> I would like to make a class for this control that could be used to 
>> quickly get info about it or perform different functions on it.
>>
>> so i can do thinks like 
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *n = MyTrans("ctrl1")n.getRotation() #from nt.Transformandn.getBodypart() 
>> #added by methanksYury *
>>
>>
>>  -- 
>> view archives: http://groups.google.com/group/python_inside_maya
>> change your subscription settings: 
>> http://groups.google.com/group/python_inside_maya/subscribe
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/36de4df0-c08b-445f-ae71-c628541cb6b6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to