kaczorefx
09-12-2009, 09:37 AM
Hi,
is there a function that tells Max that the PFlow tree has changed and should be reevaluated?
This problem happens only when the code is in an event of a GUI element (button or spinedit).
Codes in listener and in a script file by itself work as expected.
When the code is in a button - I can create an entire Flow through MaxScript in PView but no particles show in the scene - I have to manualy add and delete a random operator in PView for the scene to refresh.
The same goes for changing parameters in operators - the parameter changes, as reflected in PView but the scene doesn't aknowledge that!!!
I managed to narrow the problem down:
Code:
$Birth_01.Amount=400
- in the listener - it works
- as script by itself - it works
- as a script inside an on pressed event of a button - it changes only the parameter in PView, the scene doesn't reflect the change
One workaround is to emediately after, Hold the scene and then Fetch it - the reopened scene shows the change.
So now the question is, what is the difference between code run as a whole script and the same code run in a button?
PS. Anybody know a way to Fetch the scene without the "Are'U'Sure" dialog opening????
is there a function that tells Max that the PFlow tree has changed and should be reevaluated?
This problem happens only when the code is in an event of a GUI element (button or spinedit).
Codes in listener and in a script file by itself work as expected.
When the code is in a button - I can create an entire Flow through MaxScript in PView but no particles show in the scene - I have to manualy add and delete a random operator in PView for the scene to refresh.
The same goes for changing parameters in operators - the parameter changes, as reflected in PView but the scene doesn't aknowledge that!!!
I managed to narrow the problem down:
Code:
$Birth_01.Amount=400
- in the listener - it works
- as script by itself - it works
- as a script inside an on pressed event of a button - it changes only the parameter in PView, the scene doesn't reflect the change
One workaround is to emediately after, Hold the scene and then Fetch it - the reopened scene shows the change.
So now the question is, what is the difference between code run as a whole script and the same code run in a button?
PS. Anybody know a way to Fetch the scene without the "Are'U'Sure" dialog opening????
