Is there a way i can get the radius of a sphere, in oop way?
This is a simple example which doesn’t work for me:
#######################
import pymel.core as pm
pm.newFile(f=1);
x = pm.polySphere(n=“MyFirstSphere”,r=5);
y = x[0];
z=y.name();
print z;
r = pm.polySphere( ‘MyFirstSphere’, q=True, r=True );
print r;
a = y.radius.get()
print a;
#######################
In the above,
a)r = pm.polySphere(‘MyFirstSphere’, q=True, r = True);
works just fine.
b)“y.radius.get()” doesn’t seem to work.
And what i want, is to get the radius in an oop way…
What should i do?
What am i doing wrong?