Notifications
Clear all

[Closed] Link/parent problem

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
 		  ) 
 	 )	
	
2 Replies

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

thanks for the help MerlinEl