PDA

View Full Version : Link/parent problem


Deadalus
02-26-2007, 02:01 PM
hello all
i have some prob with a tool i'm creating.
i need to parent object to a dummy but i everytime i use my function it return "no such property .parent"
i know its simple but i cant see the mistake.

here my command
any help is appreciated

on But_LinktoRoot pressed do --make root_point parent of selection
(
A=$
if A.parent != undefined do --check if there already a parent
(
A.parent = root_point
)
)

MerlinEl
02-27-2007, 11:44 AM
fn linkToParent obj_childs obj_parent =
(
if obj_childs.count == 0 or not isValidNode obj_parent do return false
obj_childs.parent = obj_parent
)

obj_childs = selection as array
linkToParent obj_childs $sphere01

Deadalus
02-27-2007, 12:39 PM
thanks for the help MerlinEl

CGTalk Moderation
02-27-2007, 12:39 PM
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.