[Closed] Maxscript wiring
hey, ive gotton confused on scripting a series of wiring. i want to wire the newly created bones (newBones) to a controller. Ive copyed the code from wiring from max listener but even more confused.
below is what im working on:
fn createBones BArray=
(
newBones=#()
for i = 1 to BArray.count do
(
b=boneSys.createBone BArray[i][1] BArray[i][2] BArray[i][3]
append newBones b
)
SomeController = circle()
SomeController .transform=newBones[newBones.count].transform
)
–copyed code from max listener:
paramWire.connect $SomeController.modifiers[#Attribute_Holder].rigControls[#armRight_IK_FK] newBones.transform.controller[#Position] “armRight_IK_FK”
Hope that question makes senese. thanks in advance!
I have it now where its not erroring but its only wiring one way, im lost on the math with getting it wired both ways on the shp circle, can anyone help?
Heres part of the code im working on:
fn createBones BArray=
(
f = selection[i]
newBones=#()
for i = 1 to BArray.count do
(
b=boneSys.createBone BArray[i][1] BArray[i][2] BArray[i][3]
append newBones b
)
shp = circle()
shp.transform=newBones[newBones.count].transform
)
for obj in f do
(
paramWire.connect shp.modifiers[#Attribute_Holder].rigControls[#armRight_IK_FK] obj.rotation.controller[#Orientation_Weight_0] “armRight_IK_FK”
paramWire.connect shp.modifiers[#Attribute_Holder].rigControls[#armRight_IK_FK] obj.rotation.controller[#Orientation_Weight_0] “100-armRight_IK_FK”
)