[Closed] Scripted plugin modifier
Hello there,
I’m testing the following code and when I move the spinner it returns “0”. I did some test and I saw that for some reason it never reads any UV information. The UV editor is empty. I’ve tried to “reset uvs”, to change UV channels etc but nothing worked.
I understood that it doesn’t seem to work with all the modifiers that transfers geometry informations. So I tried to create an extension of the editable poly modifier and I had the same problem. For some reason with every modifier that has to do with the actual geometry it just doesn’t work.
Do you know how I can transfer those data to the modifier?
Thanks in advance,
Nick
plugin modifier testMod
name:"testMod"
classID:#(685325,452282)
extends:Unwrap_UVW version:1
(
parameters main rollout:params
(
channelVal type:#integer animatable:false ui:channelVal default:99
on channelVal set val do
(
print ($.modifiers[1].Unwrap_UVW.NumberVertices())
)
)
rollout params "Parameters"
(
spinner channelVal "Map channel: " range:[1,99,99]
)
)
sorry… i don’t get the problem. do you want to transfer uvw data between channels? there is the
UVW_Mapping_Paste modifier
in the sample code, I have this line… “print ($.modifiers[1].Unwrap_UVW.NumberVertices())
” (It can be done with use “delegate” instead)
It is supposed to return the number of the vertices of the selected object every time I change the spinner. But it returns 0. The reason is that it can’t read any vertices.
Try to run the script, add the modifier to an object and open the UV editor. The editor is empty. It doesn’t read the texture verts.
http://dl.dropbox.com/u/14719090/testMod.mov
I’m not sure if my previous comment helped you understand my prob… that’s why I recorded this vid to demonstrate it.
Thanks
i think it’s not possible to extend Unwrap_UVW with scripted plugin and automatically get full its functionality.
i would add my custom attribute to standard Unwrap_UVW modifier, and use it for new featurtes.
Thanks denisT,
Unfortunately the tool I wanted to develop, couldn’t really work with custom attributes.
But in any case thanks for your replies.
Nick