Anonymity
02-01-2008, 06:45 PM
Hello every one
I'm pretty green when it comes to scripting so plz bare with me. :)
I'm trying to make a button that makes a PF_Source...Seems simple enough, I can make the script that makes the PF_Source and when you go to the ParticleViewer it shows up correctly,renders particles and displays them in the view port . But if I try to put that code into a button it creats the PF_Source but the "Render" and "Display" operators dont seem to work any more.
This code makes the PF_Source
pf=PF_Source()
--pf.Enable_Particles= true
particleFlow.beginEdit()
ev=event()
br=birth()
pf.appendInitialActionList ev
ev.appendAction br
ev.appendAction (Position_Icon())
ev.appendAction (Speed())
ev.appendAction (ShapeStandard())
ev.appendAction (DisplayParticles ())
pf.appendAction (RenderParticles())
particleFlow.endEdit()
and this is so post to be it with the button
rollout Rollout1 "particle flow tool box" width:200
(
button pflow "Pflow"
on pflow pressed do
(
pf=PF_Source()
--pf.Enable_Particles= true
particleFlow.beginEdit()
ev=event()
br=birth()
pf.appendInitialActionList ev
ev.appendAction br
ev.appendAction (Position_Icon())
ev.appendAction (Speed())
ev.appendAction (ShapeStandard())
ev.appendAction (DisplayParticles ())
pf.appendAction (RenderParticles())
particleFlow.endEdit()
)
)
createDialog Rollout1
any ideas would be great for I have run out :bowdown:
I'm pretty green when it comes to scripting so plz bare with me. :)
I'm trying to make a button that makes a PF_Source...Seems simple enough, I can make the script that makes the PF_Source and when you go to the ParticleViewer it shows up correctly,renders particles and displays them in the view port . But if I try to put that code into a button it creats the PF_Source but the "Render" and "Display" operators dont seem to work any more.
This code makes the PF_Source
pf=PF_Source()
--pf.Enable_Particles= true
particleFlow.beginEdit()
ev=event()
br=birth()
pf.appendInitialActionList ev
ev.appendAction br
ev.appendAction (Position_Icon())
ev.appendAction (Speed())
ev.appendAction (ShapeStandard())
ev.appendAction (DisplayParticles ())
pf.appendAction (RenderParticles())
particleFlow.endEdit()
and this is so post to be it with the button
rollout Rollout1 "particle flow tool box" width:200
(
button pflow "Pflow"
on pflow pressed do
(
pf=PF_Source()
--pf.Enable_Particles= true
particleFlow.beginEdit()
ev=event()
br=birth()
pf.appendInitialActionList ev
ev.appendAction br
ev.appendAction (Position_Icon())
ev.appendAction (Speed())
ev.appendAction (ShapeStandard())
ev.appendAction (DisplayParticles ())
pf.appendAction (RenderParticles())
particleFlow.endEdit()
)
)
createDialog Rollout1
any ideas would be great for I have run out :bowdown:
