[Closed] include vs. filein?
I just split up my script because its getting large…
I’m having a hard time getting all the parts to be recognized at startup though…
my structure is:
Scripts\startup\XPlaneObj8Tools.ms
Scripts\XPlane\Helpers.ms
Scripts\XPlane\Modifiers.ms
Scripts\XPlane\Functions.ms
Scripts\XPlane\Export.ms
Scripts\XPlane\Import.ms
I’m currently using include, but it doesn’t seem to be working…
For all of the things I want to have recognized above, do I want to use filein or include?
FileIn might be better for what you are doing. Also you might want to run the
Scripts\XPlane\Helpers.ms
Scripts\XPlane\Modifiers.ms
Scripts\XPlane\Functions.ms
Scripts\XPlane\Export.ms
Scripts\XPlane\Import.ms
Out of plugins instead of scripts. That way you know they are loaded and all in memory already. You can just make the calls to them and don’t have to do a fileIN at all.
Well…my Scripts\startup\XPlaneObj8Tools.ms file contains the following:
MacroScript XPlaneObj8Tools category:"X-PlaneObjTools"
(
include "XPlane\Helpers.ms"
include "XPlane\Modifiers.ms"
include "XPlane\Functions.ms"
include "XPlane\Export.ms"
include "XPlane\Import.ms"
XPlaneObjRolloutFloater = newRolloutFloater "X-Plane OBJ Tools" 250 300
addrollout XPlaneObj8Export XPlaneObjRolloutFloater
addrollout XPlaneObj8Import XPlaneObjRolloutFloater
)
What needs to change there if I move the other parts to plugins?
Well that is a macro script and needs to have the extension .mcr. Also it will need to reside in the macro scripts folder.
wow, as in ui\macroscripts?
I’m confused now…what shoudl my final structure be?
By the way…I wanted it to be a plugin really…an export plugin…Should I not be using the macroscript command to setup a rollout?
Well, thats how I got where I am now…Considering I’m a casual scripter, and once this export script is finished I probably won’t do much more scripting (I’m more of a modeller really)…
The script is already quite a piece of work, I’m finding the maxscript help docs so convoluted and unlike any programming reference I’ve ever used before, some of the hard things seem to be easy to find and the easy simple basic stuff is buried.
To have someone tell me to take tutorials instead of helping me work through a problem is rather cold. Especially considering my script already exports geometry with normals, UVWs, and some basic animation to a format thats quite unlike any other standard modelling format. Sounds like I’ve come pretty far on my own to be told to go take a tutorial. I hope you’re a little nicer to people who are interested in buying from you. But pardon me for being cynical.
To turn this around…given the fact that I’ve already written an almost complete export script, and am having trouble with simple things such as program structure and the rotate around a parent pivot issue…what tutorials would you recommend?
I don’t want to come off the wrong way, and I’d like to learn this stuff so I can release this script to the XPlane community…so please forgive me for being defensive. I really do appreciate all the help you guys have given me thus far.