# How to access relative nodes

**URL:** https://forum.highend3d.com/t/how-to-access-relative-nodes/48726
**Category:** Maya
**Tags:** python
**Created:** [October 30, 2009, 10:22am UTC](https://forum.highend3d.com/t/how-to-access-relative-nodes/48726 "2009-10-30T10:22:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sravan-kumar--2](https://forum.highend3d.com/user_avatar/forum.highend3d.com/sravan-kumar--2/32/145_2.png) [@sravan-kumar--2](https://forum.highend3d.com/u/sravan-kumar--2)
#### Post date: [October 30, 2009, 10:22am UTC](https://forum.highend3d.com/t/how-to-access-relative-nodes/48726/1 "2009-10-30T10:22:38Z")

</div>

hifrens.,

im trying to change the number of sections of a circle that is selected.

step 1: i stored the selected circle in in a variable ‘selectedCircle’.

import maya.cmds as mc  
selectedCircle=mc.ls(select=True)

but it is accessing the transform node only.

how can we access the relative nodes( means if I have the transform node say 'nurbsSphere1, i have to access the ‘nurbsSphereShape1’ and ‘makeNurbsSphere1’)

and tell me how to access the parent/child nodes.

thanks in advance.

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [November 4, 2009, 12:39pm UTC](https://forum.highend3d.com/t/how-to-access-relative-nodes/48726/2 "2009-11-04T12:39:41Z")

</div>

shape=mc.listRelatives(selectedCircle[0], children=True)  
historyarray=mc.listHistory(shape)

---

<div class="post-metadata">

### Author: ![sravan-kumar--2](https://forum.highend3d.com/user_avatar/forum.highend3d.com/sravan-kumar--2/32/145_2.png) [@sravan-kumar--2](https://forum.highend3d.com/u/sravan-kumar--2)
#### Post date: [November 10, 2009, 1:50pm UTC](https://forum.highend3d.com/t/how-to-access-relative-nodes/48726/3 "2009-11-10T13:50:42Z")

</div>

thanQ.I got It.
