Notifications
Clear all

[Closed] cloth scripting problem introduced in 3DS Max 2013 and 2014?

Hi,

I’ve narrowed down a piece of code that represents a system exception problem I am experiencing in 3ds max 2013 and 3ds max 2014 64 bit on win 8 64 bit with cloth related scripting. This code works in 3ds max 2012 without a system exception error.


cur_obj=sphere()
addmodifier cur_obj (Cloth())
cur_obj.modifiers[#Cloth].makepointGroup #{1..cur_obj.verts.count} cur_obj (cur_obj.name+"_all")
cur_obj.modifiers[#Cloth].getGroupParamBlock(cur_obj.name+"_all")

Run the above code. It will create a sphere, add the cloth modifier and then create a group. That last line that tries to assign the group to a variable so that the script can access its properties. It gives a system exception.

I tried the other method for accessing a cloth group via maxscript:


cur_obj.cloth.group01.Active

That also returns a system exception.
Due to this, I can’t change group properties via maxscript anymore. I want to run these two lines:


theGroupRT.Strength=100
theGroupRT.Is_Soft=true

I could really use help with this issue. It seems to be a new problem in 3DS Max 2013 which was not in 2012. Can people please try running the code to see if the results are consistent?
Thanks,
Adnan Hussain

3 Replies

Ya, looks like a bug.

Try:

cur_obj.cloth[3].Active

Thanks Frank. That does give me access to constraint properties. Hopefully they will fix this, as it used to work in previous versions. I did submit a bug report. The cloth tools are really powerful in Max.

Adnan

The step that still can’t be scripted is creating the actual constraint. I can use makepointgroup and create an unassigned group of points, but as soon as I try makeconstraint, I get the system exception error. I can’t find a way to makeconstraint with the current bug.

Adnan