Mattrne
12-05-2008, 02:05 PM
Im trying to run a loop using 2 arrays, one is a list of bones and the other is a list of control object names. I firstly declare my 2 arrays as follows;
faceBones = #(
$Face_Jaw,
$Face_LR_LIP_out,
$Face_LR_LIP_mid,
$Face_LL_LIP_mid
)
contName = #(
"Jaw",
"Jaw_Out",
"Upper_Lip",
"Upper_Lip_Curl"
)
Then I have the for loop declared as follows;
function renameControllers =
(
for i =1 to contName.count do
(
for b in faceBones do
(
b.pos.controller.Zero_Pos_XYZ.controller.X_Position.controller.setName i (contName[i] +"_Pos_X")
b.pos.controller.Zero_Pos_XYZ.controller.Y_Position.controller.setName i (contName[i] +"_Pos_Y")
)
)
)
When this runs I get an error saying;
Attempt to access deleted scene object
I have tried to just print b to see whats happening and I get told its a deleted scene object, but the objects are still there in my scene! Does anyone understand what I'm doing wrong?
faceBones = #(
$Face_Jaw,
$Face_LR_LIP_out,
$Face_LR_LIP_mid,
$Face_LL_LIP_mid
)
contName = #(
"Jaw",
"Jaw_Out",
"Upper_Lip",
"Upper_Lip_Curl"
)
Then I have the for loop declared as follows;
function renameControllers =
(
for i =1 to contName.count do
(
for b in faceBones do
(
b.pos.controller.Zero_Pos_XYZ.controller.X_Position.controller.setName i (contName[i] +"_Pos_X")
b.pos.controller.Zero_Pos_XYZ.controller.Y_Position.controller.setName i (contName[i] +"_Pos_Y")
)
)
)
When this runs I get an error saying;
Attempt to access deleted scene object
I have tried to just print b to see whats happening and I get told its a deleted scene object, but the objects are still there in my scene! Does anyone understand what I'm doing wrong?
