Why is the copy function when performed by script is different than standard max copy?
I have a scene that contains a point helper and a rectangle. The width parameter of the rectangle is wired to the distance between the two objects through a simple expression: length(PanelPosition - PointPosition). When I copy or array the rectangle in max, the variables in the copied expressions get updated to point to the copied object. For example in rectangle01 the Panel Position variable points to rectangle01. In rectangle02 PanelPosition variable points to rectangle02. When I use max scripts to copy, align or distribute the panel this is not the case. The Panel Position variable in Rectangle25 still points to Rectangle01, (the original object). This destroy the parametric behavior I'm trying to build into my system because all the rectangles behave exactly the same rather than vary based on distance from point.
I cannot use the array function as my panels need to be distributed along an irregular surface. Ideally, I would use an align or replace maxscript to substitute faces on a sculpted surface with panels. Does anyone have any idea why max script copy would behave differently than a regular max copy?
One alternative is to make multiple copies and align each copy to each faces one at a time. Is there a script that could do a batch align? By that, I mean align 360 unique rectangles to 360 faces on a surface?
Sorry for the long post but its tough to explain. Any help would be greatly appreciated. A sample of the file is attached.
Sorry for the long post but its tough to explain. Any help would be greatly appreciated. A sample of the file is attached.
Attachment | Size |
---|---|
parapanel_help.max | 16.69 MB |
Comments
Hey, i hope i understand
Hey, i hope i understand your problem. The following code will create a copy of your selected objects and redirect the wiring "maxOps.CloneNodes &selection cloneType:#copy". Found at: 3ds MAXScript Help > Index: "maxops" > maxOps Interface > find "cloneNodes".