PDA

View Full Version : beta script, Instancing along a path



LightFreeze
03-02-2013, 07:19 AM
Got this instancer script working, you add it to the object you want to instance then select a path from the dialogue.

However it wont save data with the scene file, anyone know how to do this?

LightFreeze
03-03-2013, 08:57 AM
found some info in some of the newtek scripts, you do this to save,


def inst_save(self,dat):
dat.lwsave_i4(self.frmstrt)
dat.lwsave_i4(self.frmend)
dat.lwsave_fp(self.fps)
dat.lwsave_i4(self.ni)
dat.lwsave_fp(self.offx)
dat.lwsave_fp(self.offy)
dat.lwsave_fp(self.offz)
dat.lwsave_str(self.objn)
dat.lwsave_i4(self.active)
#dat.lwsave_end()
return None # LWError

and this to load,


def inst_load(self,state):
print "loading data"
#print dir(dat)
r,self.frmstrt = dat.lwload_i4(1)
r,self.frmend = dat.lwload_i4(1)
r,self.fps = dat.lwload_fp(1)
r,self.ni = dat.lwload_i4(1)
r,self.offx = dat.lwload_fp(1)
r,self.offy = dat.lwload_fp(1)
r,self.offz = dat.lwload_fp(1)
r,self.objn = dat.lwload_str()
print self.objn
r,self.active = dat.lwload_i4(1)
return None # LWError

the save bit puts data into the scene file however the load part appears to do nothing, none of the newtek scripts would load data either.

fogged it