Share
 
 

Sample Skin Modifier macro

You can't change bone selection during skin painting, but this sample macro script shows you how to bind a macro to a hotkey to improve your skin weight painting workflow.

MacroScript SkinPaintModeToggle
	ButtonText:"Skin Paint Mode Toggle"
	Category:"Skin"
	internalCategory:"Skin" 
	Tooltip:"Toggle the current skin modifier"
	SilentErrors:(Debug != false)

(
	on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
	on isEnabled return ( (classof(modPanel.GetcurrentObject())) == Skin)
	on execute do 
	(
		skinmod = modPanel.GetcurrentObject()
		if (skinops.GetNumberBones skinmod) != 0 then
		(
			if subObjectLevel == 0 then
			(
				subObjectLevel = 1
			)
			skinOps.paintWeightsButton skinmod
			if skinOps.isInPaintWeightsMode skinmod then
			(
				skinmod.filter_vertices = on
			)
			else
			(
				skinmod.filter_vertices = off
			)
		)
	)	
)

Was this information helpful?