I'm currently working on a script that draws some things for me. I have it basically working, for the most part, however, the preview portion of it doesn't work at all. I see nothing until I click the last click and the script inputs my drawing elements and terminates. How should I go about getting the preview to work?
Inside of the coordinateEvent function, I have the standard
Code: Select all
if (preview) {this.updatePreview();}
I also tried making my own custom myScript.prototype.getAuxPreview() {} function as well but it never gets called either. Maybe that's why I see no preview at all because the getAuxPreview in EAction is just empty brackets?
I also noticed, looking through the source code, that certain Draw scripts implement their own getAuxPreview() functions while others do not. The scripts that do implement their own getAuxPreview() seem to only be pushing RLine to the array of shapes. How does the program know to take the RLine and convert it into a circle, or an arc, or whatever? Shouldn't you have to add a circle or an arc or whatever to a custom implementation of getAuxPreview()?
I think that's it. The basic question with this thread is: how do I get previews to work within my script?
Thanks in advance for your time/replies.