Notifications
Clear all

[Closed] UVW problem

I’m trying to use the soft selection for the uv without opening the uvw editor

(
mod1 = $.modifiers[1]
rollout unnamedRollout “Soft Selection” width:192 height:59
(
spinner spn1 “Fallof” pos:[13,6] width:166 height:16 range:[0,100,0]
checkbox chk1 “Soft Selection” pos:[14,33] width:166 height:26
on spn1 changed val do
(
mod1.unwrap.setFalloffDist val
)
on chk1 changed state do
(
if state == false do
(
mod1.setEnableSoftSelection false
)
if state == true do
(
mod1.setEnableSoftSelection true
)

 )

)

nf_c12 = newRolloutFloater “” 220 200
addRollout unnamedRollout nf_c12

It ain’t working what em I doing wrong ?:surprised

5 Replies

I had a look and it works ok, but the uvw window doesn’t update. When it’s closed, the spinner is trying to manipulate a value in a window that is basically undefined so it cannot update the values. when you close and re-open the editor the changes are applied.

Or am i missing something?

I am trying to change the soft selection without opening the editor window

Hi,

what kikialex said is right :
mod1.unwrap.GetFalloffDist() returns -1 when editor is closed.
I am really curious as to why you are trying this…

I want to make a script that will help you change the uv from the viewport

You could use channel info to copy the vertex channel to a new channel,
then copy the uv channel to vertex channel,
then use standard poly tools to edit
then copy the vertex channel back to the uv channel,
and copy the topology (new channel) back to the vertex channel

This way you can use standard Edtable_poly tools to edit the UVs