Notifications
Clear all

[Closed] edit_poly modifier woes

hi all,

I’ve been trying to get this to work for the last couple of days but can’t seem to find a solution, and here’s the problem:
I wish to modify an object’s face material ID’s, but I don’t want to change it on the base object. So I tried using edit_poly modifier, however, I can’t seem to be able to use any of the polyOp struct functions, the only way I managed to get it to work was using the modify panel commands of the edit poly modifier. However, this will not do, as I wish to make it into a scripted modifier and replace the UI, at which point these commands stop working.
So, does anyone have any other ideas, or is there something I’m missing here?

TIA,
o

5 Replies

From the Macro recorder I got this:

 $.modifiers[#Edit_Poly].SetOperation #SetMaterial 

$.modifiers[#Edit_Poly].materialIDToSet = 0

$.modifiers[#Edit_Poly].Commit ()


It seems that 0 in this case is actually materialID 1 and ID 2 would be 1 and so on.

CML

Thanks Rivendale,

however, this is the way I was refering to when I said I got it to work with the modify panel command. the problem is, this doesn’t work if the edit_poly modifier’s UI is replaced with the new scripted modifier UI, so I’m looking for a way around this.

cheers,
o

I see. Then you need to do something like this:

 on spinner set val do 

(

delegate.SetOperation #SetMaterial

delegate.materialIDToSet = (val - 1)

delegate.Commit ()

)


cheers,
CML

1 Reply
(@ofer_z)
Joined: 11 months ago

Posts: 0

again, this is not the problem, I got this to work, but only if the original UI is visible, which is very much undesirable. I’m looking to achieve the same results without the original edit_poly modifier UI.

thanks,
o

Couldn’t help noticing the signatures of the two of you

Rivendale: “Make love, not sense”
ofer_z: “Forget About Love”

  • Martijn