PDA

View Full Version : Different result with filein script ?


SaiGreat
10-17-2008, 08:29 AM
Hi everyone,

I writted a script to remove poly edges like this,can clear remove edge like you pressed ctrl and backspace.

Checkobj = Filters.GetModOrObj()
(
--when EditPoly Modifier
if (Checkobj as string) == "Edit_Poly:Edit Poly" then
(
case subobjectLevel of
(
1: (Checkobj.ButtonOp #RemoveVertex)
2: (Checkobj.PopupDialog #RemoveEdge)
3: ()
4: (Checkobj.ConvertSelection #Face #Edge requireAll:on;Checkobj.PopupDialog #RemoveEdge)
5: ()
)

)
-- when Editable poly Object
if (Checkobj as string) == "Editable Poly" then
(
case subobjectLevel of
(
1: ($.remove ())
2: ($.ConvertSelection #Edge #Vertex ;$.remove selLevel:#Edge)
3: ()
4: ($.ConvertSelection #Face #Edge requireAll:on ;$.ConvertSelection #Edge #Vertex ;$.remove selLevel:#Edge)
5: ()
)

)
)


It works fine when I run directly in ScriptEditor,but when i use filein to run this script,it will return different result which just remove edges.

can anyone tell me is this a bug or I make something wrong ?

fix:
I found if use filein with mcr,or run in ScriptEditor with shift+enter, it will return the wrong answer,but use ctrl+E is fine.

CGTalk Moderation
10-17-2008, 08:29 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.