Notifications
Clear all

[Closed] Array of strings to MaxText

Hello. I’m trying to create a text from array of strings inside Max with few modifications but I’m stuck… I’m working with biped animations and poses and I’ve managed to get all of the saved poses from biped collection to array and now want to extract it to a text file inside max and make an icrement number and space before name and to go to next line (e.g. “01 pose1” (new line) “02 pose2” etc…)

Here’s the code:

--collection of 10 poses is created
--biped bone is selected

aPoseCollection = #()

iPoseNo = biped.numCopies $.controller #pose

aPoseCollection = for n in 1 to iPoseNo collect 
	(
		biped.getCopyName $.controller #pose n
	)--end aPoseCollection


tPoseName = text name: "ControlledText" size:10 wirecolor:orange position:[0,0,0] rotation:(angleaxis 90 [1,0,0])
tPoseName.text = aPoseCollection as string

	--instead of converting array to string I want do do a loop for each number in array and add an increment prefix
	--every pose should be in a new line in text

I know that’s not the way to do it by adding a converted array as string to text content but it’s close to what I need.
After each pose name in biped collection when collecting to array is added a new line (
) I suppose, and I want to add increment prefix in every string of array.

Would be very grateful if someone could help me out with this.

There’s a screenshot in attachment to describe what I want.
Thanks