PDA

View Full Version : progressbar issues


mrben
12-18-2006, 03:32 PM
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

_stev_
12-18-2006, 04:18 PM
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

mrben
12-18-2006, 04:29 PM
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

Bobo
12-19-2006, 01:08 AM
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.


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.

CGTalk Moderation
12-19-2006, 01:08 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.