Help select object
Good evening, I'm trying to put a personal selection shortly after instance to understand that the script is the selected object. How can I do this?
local objPos = (intersectRay $ground treeRay).pos,
objScale = [1,1,1] * random fromScale.value toScale.value
instance ?????????? pos:objPos scale:objScale name:"Objeto copia"
Comments
Staff will try to explain
Staff will try to explain again.
In my intance if I leave it at $'ll be picking up my box Box I want to create an object that understands that the object I want is selected. How can I do this?
local objPos = (intersectRay $ground treeRay).pos,
objScale = [1,1,1] * random fromScale.value toScale.value
instance $box pos:objPos scale:objScale name:"Objeto copia
.
If I understand you correctly you want to create an instance of currently selected object. In this case use this:
Code works with multiple objects that are selected. instancesArr holds all created instances, so you can select them with select instancesArr.
Tools and Scripts for Autodesk 3dsMax
.
I don't understand exactly what you want to acheive, but
1 - if you want to create an instance of some object and you want this instance to be selected after it is created then use this
The Teapot001 is the object that will be instanced.
isSelected:true
will select the created instancenewObj
will hold the created instance, so later you can use neObj to access any of the properties of the created instance.Tools and Scripts for Autodesk 3dsMax