Notifications
Clear all

[Closed] object name in variable

Hello. I have got small problem.
I have got String variables(in future array) in which I have got object name.
I would like to change object pos,rot, scale.

S="Cone"
 posO= [8.43229,1.4664,0]
 rotO=[0.675206,0.516503,-0.51906,-0.0888711] 
scaO=[1,1,1]  

What Can I Observe when I write in Listener.

$Cone
 $Editable_Mesh:Cone @ [0.000000,0.000000,0.000000]//<-result
$S
 undefined//<-result

A litte bit problematic. I used something like:

fn zmianaobiektów S posO rotO scaO= 
(for obj in geometry do
 if(obj.name==S) do
 (obj.pos=posO obj.scale=scaO )

It was first solution I imaged.Stupid because I must do loop for many times. How I can make this without loop?

2 Replies
 lo1

look up

GetNodeByName

method

Thanks:)It is what I was searching for:)