View Full Version : skinOps.addBone trouble!
CyHiSo 01-14-2010, 11:08 AM Hi everyione!
I need a script that will assign bones and vertex weights to the merged model..
Ive gor merged model, add skin on it..and when i try to addBone..ive got "** system exception **" message..
and even when i made test scene with 1 box and 1 bone..and tried to add it ive got the same..
script:
skinOps.addBone $.modifiers[#Skin] $Bone01 1
result:
** system exception **
what am i doing wrong?
|
|
CyHiSo
01-14-2010, 12:07 PM
and even when i try to load evelope:
obj=$
skin_mod=obj.modifiers[#Skin]
max modify mode
modPanel.setCurrentObject skin_mod
sk_destination="D:\scripts\MY_OWN_SCRIPTS\skin copy\shared_vest_np.env"
skinOps.LoadEnvelope skin_mod sk_destination
i get -- Runtime error: Skin need to be selected and in the modifier panel Skin:Skin
i try this in 2010 max...
labbejason
01-14-2010, 04:55 PM
I believe you actually need the skin modifier selected in the modifier panel :S
Sigmao
01-14-2010, 10:32 PM
Hi CyHiSo.
SkinOps have some limitations and can be used only on certain conditions:
. The object must be selected.
. The skin should be the active modifier and visible.
Here a function that can help you, I use it all the time.
Function PrepareMaxForSkinOps _pNode =
(
-- Select @_pNode if needed.
if not _pNode.IsSelected do
(
Select _pNode
)
-- Unfreeze @_pNode if needed.
if _pNode.IsFrozen do
(
Unfreeze _pNode DoLayer:true
)
-- Set Modify Panel active if needed.
if GetCommandPanelTaskMode() != #modify do
(
SetCommandPanelTaskMode mode:modify
)
-- Set @_pNode skin modifier as current object in modpanel if needed.
if ModPanel.GetCurrentObject() != _pNode.skin do
(
ModPanel.SetCurrentObject _pNode.skin
)
)
CyHiSo
01-15-2010, 07:09 AM
thanks to all of you. but i solved the problem. in our company we have our variation of skin modifier..and it ovelays standart skin in maxscript) so i should write proper name for modificator name)
CGTalk Moderation
01-15-2010, 07:09 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.