PDA

View Full Version : editable poly is non-editable??


noontz
04-05-2008, 08:12 PM
This is one of the more cryptic error messages. An editable poly thatīs a non-editable poly?

Does anyone know whatīs going on?

>> MAXScript MacroScript Error Exception: -- Runtime error: EPoly operation on non-Editable Poly: #($Editable_Poly:Box04 @ [214.396729,-396.800507,131.264450]) <<

Bobo
04-05-2008, 08:21 PM
This is one of the more cryptic error messages. An editable poly thatīs a non-editable poly?

Does anyone know whatīs going on?

>> MAXScript MacroScript Error Exception: -- Runtime error: EPoly operation on non-Editable Poly: #($Editable_Poly:Box04 @ [214.396729,-396.800507,131.264450]) <<

Are you sure you are operating on the OBJECT and not an ARRAY of selected objects?
See the #() around your Editable_Poly? How have you acquired the selection and what is the code that causes the error?

I would guess that you used something like getCurrentSelection() to get the selected objects and then attempted to apply an operation to the resulting array instead of the objects inside ...

But I have been wrong before, so who knows. :)

noontz
04-05-2008, 08:51 PM
Hi Bobo.. Thx a lot for your reply!!

convertToPoly kasse
max modify mode
subObjectLevel = 4
Polyop.setFaceSelection kasse #(6,5,4,3)
print kasse

It must be me using the wrong syntax here. Itīs the polyop. that suddenly turns kasse in to an array? Can you tell me what Iīm doing wrong, itīs probably VERY basic....

hmmm.. Using $ instead of "kasse" solves the problem.

kasse was originaly derived from kasse = startObjectCreation box returnNewNodes:#first maybe that causes the trouble??

Bobo
04-05-2008, 11:01 PM
Yep, this method always returns an array if returnNewNodes: is set to true or #first. It is NOT explicitly mentioned in the method description in the Help, but just calling it makes it obvious that the result is always an array of nodes, even when a single one is returned.

So you should use kasse[1] instead to get the first and only object from the array.

noontz
04-05-2008, 11:16 PM
Hi Bobo

Thx loads :thumbsup:

( One ) reason I was so confused is this: "print kasse" will not yield an array, but just "kasse" will ??

Bobo
04-06-2008, 04:30 AM
Hi Bobo

Thx loads :thumbsup:

( One ) reason I was so confused is this: "print kasse" will not yield an array, but just "kasse" will ??

someArray = #(1,2,3)
print someArray --always prints the ELEMENTS of the array.
format "%\n" someArray --will print the actual array.

So it is to be expected.

noontz
04-06-2008, 11:56 AM
Thx again Bobo.. This forum beats everything regarding "how to MaxScript"!

So it is to be expected
Yep.. And now I know :)

CGTalk Moderation
04-06-2008, 11:56 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.