Notifications
Clear all

[Closed] progressbar issues

hello,

I’ve been trying to access the Gizmo of a Volume Select from within a script, and I’m constantly getting errors.

When I run the same code from the listener it works great, it took me some time but I narrowed it down to the progressbar. If I comment out the progressbar command it works great.

here’s the code section for accessing the gizmo :

    myvol = volumeSelect()
    myvol.invert = true
    myvol.level = 1
    addModifier ImportedShape myvol
    ImportedShape.modifiers[1].gizmo.scale = [2,2,2]

Anyone else had any strange behaviour when using progressbar ?

cheers
ben

3 Replies

What exactly are the errors you are getting?

How are you updating the prog bar? Are you using the floater and/or rollout name? If the prog bar is updated outside the scope of your UI then you should use the floater/rollout name as well.

myRollout.myProgressBar.value += step

Is your floater or rollout defined as a global?

Stev

Hi there,

The more I read the more I think it’s related to the modifier stack not refreshing correctly. Bobo mentioned it in another post and I think my issue was related.

I was getting errors whenever I tried to scale the Gizmo of my volume select, it was telling me my object didn’t actually have a volumeselect applied yet. asthough the modifier hadn’t actually been applied to the object.

This was seemingly caused by the progressbar, as once I removed it my code worked fine.

cheers
ben

1 Reply
(@bobo)
Joined: 11 months ago

Posts: 0

As I mentioned in other posts, just add the line

classof theObject –where theObject is the object in question

to force an update of the stack.