oglop
11-21-2007, 05:29 AM
how do i enter figure mode, if for some reason i can't select the bone manually or create a new biped object, If i have only physique controlled mesh selected, how do i enter figure mode.
in my script, it works on every selection set, but the first step is to enter figure mode, and then i do some other things.
I try to find a solution but failed, physique modifier doesn't provide any properties, and i try to work around this by saving my character in a seperate max file, and select all object(then i must have selected the bone), then loop through each of the objects, but when i run
-- rootBipedObj is supposed to be a biped object
rootBipedObj.transform.controller.figuremode = true
listener responds :
-- Runtime error: Attempt to access deleted Biped
How do i do that ?
-- first display all
actionMan.executeAction 0 "277" -- Tools: Unhide All
-- only show geometry and bone
hideByCategory.all()
hideByCategory.geometry = false
hideByCategory.bones = false
-- now select all
actionMan.executeAction 0 "40021" -- Selection: Select All
-- at least find a bipe_object
selObj = (for o in $ collect o)
mybipedObj
for o in seloBj do
(
if (classof o as string == "Biped_Object") then
(
-- we found a biped_object
mybipedObj = o
try(mybipedObj.transform.controller.figuremode = true)catch
(
print (mybipedObj.name + " is deleted")
continue
)
print (mybipedObj.name + " found")
exit
)
)
I used try()catch() but only to find that all biped_object is deleted , but why ?
in my script, it works on every selection set, but the first step is to enter figure mode, and then i do some other things.
I try to find a solution but failed, physique modifier doesn't provide any properties, and i try to work around this by saving my character in a seperate max file, and select all object(then i must have selected the bone), then loop through each of the objects, but when i run
-- rootBipedObj is supposed to be a biped object
rootBipedObj.transform.controller.figuremode = true
listener responds :
-- Runtime error: Attempt to access deleted Biped
How do i do that ?
-- first display all
actionMan.executeAction 0 "277" -- Tools: Unhide All
-- only show geometry and bone
hideByCategory.all()
hideByCategory.geometry = false
hideByCategory.bones = false
-- now select all
actionMan.executeAction 0 "40021" -- Selection: Select All
-- at least find a bipe_object
selObj = (for o in $ collect o)
mybipedObj
for o in seloBj do
(
if (classof o as string == "Biped_Object") then
(
-- we found a biped_object
mybipedObj = o
try(mybipedObj.transform.controller.figuremode = true)catch
(
print (mybipedObj.name + " is deleted")
continue
)
print (mybipedObj.name + " found")
exit
)
)
I used try()catch() but only to find that all biped_object is deleted , but why ?
