Notifications
Clear all

[Closed] how to select just created SkinData mesh

I extracted the skin data with the line below:

skinUtils.ExtractSkinData $

but how to put this SkinData_ mesh into variable to use it later?

this how it works for copy command:

o = copy $
select o

thanks.

6 Replies

skinUtils.ExtractSkinData $Box
data = (getNodeByName "SkinData_Box")
select data

1 Reply
(@tosyk)
Joined: 10 months ago

Posts: 0

thanks for your reply. Is it work only for actual name? Since I use maxscript I want to use it for several times, and for different names.

As far as I know you can only do it by name since the function to create skinData does not return the object. You can still use it however you want so not sure what you mean…

you can rename it to fit whatever you want just make sure you know how skinData works through script.

agrr, that’s what I wanted. to use it in the script after creation.
ex: I wanna choose SkinData and skinned object with same geometry and Import weigths with script.

You could make a temporary callback to grab it like this:

fn skinUtilsWrapper o =
(
	callbacks.removeScripts id:#getSkinDataObj
	fn f_getSkinDataObj = ( global gSkinDataObj = (callbacks.notificationParam()); gSkinDataObj )
	callbacks.addScript #sceneNodeAdded "f_getSkinDataObj()" id:#getSkinDataObj
	skinUtils.ExtractSkinData o
	callbacks.removeScripts id:#getSkinDataObj
	global gSkinDataObj
	local lSkinDataObj = gSkinDataObj
	gSkinDataObj = undefined
	lSkinDataObj
)


rich

1 Reply
(@tosyk)
Joined: 10 months ago

Posts: 0

oh, man. it looks nice, but too complex for me. can you explain how to use it?
i’m trying this with no luck:

for o in selection do
	(
		skinUtilsWrapper
	)