Negative frames? Frames less than 0? They exist!

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I'm putting this on the back burner for now.

It works. I got it to save action names to negative key frame channels and read them back in... but... ick! One frame for EACH LETTER OF THE ACTION NAME?! The number of keys needed scares me a little. With a lot of actions there could be 100 keys! That could seriously "bloat" the file size for no real gain. Plus I don't really know how this might effect the stability of the file itself. It could cause "problems" I don't know about yet.

I emailed Mike to get his opinion on this. I know it works and it could be used in a pinch... but... I hate using something weird like this to store important data.

It's sort of like gluing black and white jellybeans to a piece of cardboard to back up computer files... that's a lot of freaking jellybeans! ;)

-vern
User avatar
madrobot
Posts: 670
Joined: Mon Apr 07, 2008 3:07 pm

Post by madrobot »

My main concern is that in all likelyhood I would eat the jellybeans.

While you are in negative space, please keep an eye out for my talent.

Thanks
User avatar
jahnocli
Posts: 3471
Joined: Fri Oct 29, 2004 2:13 pm
Location: UK

Post by jahnocli »

Could you use the "Note" Layer to store strings? (Just free associating, I don't know a damn thing about this...)
You can't have everything. Where would you put it?
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

jahnocli wrote:Could you use the "Note" Layer to store strings? (Just free associating, I don't know a damn thing about this...)
No, can't use anything someone could delete. At least that's my feeling anyway. I could use notes layers to store strings... but if you delete the layer the data is gone baby gone.

I want something to store data that can't be accidentally deleted. With these negative frames, even "Clear animation from document" has no effect. I discovered that one quick. There was NO WAY to delete those keys. The only way to clear key frames from negative frames once they exist is through the scripting interface. Since all AS documents MUST HAVE ONE LAYER, the layer key frames can always be stored in that first layer.

It's still really really really kludgy. Using 50 to 100 or more key frames to store a few string values is a total waste of resources. You could literally have a good 25% of the file size just storing teeny tiny strings or text snippets that should only take up a few bytes tops. If I could figure out a way to save more data in a few key frames I might reconsider it. I was thinking of using the "long integer" decimal places to store more data on one key channel... it's all so kludgy though and would require jumping through a lot of hoops.

I think I will just wait and see if Mike will give us some way to do this legitimately in a future version.

-vern
User avatar
synthsin75
Posts: 10267
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

So you're relying on the 'must have one layer' rule? What happens if that particular layer is deleted? Like after creating another? It seems like all you really need is a way to lock a single layer from being deleted or altered.

Just to test it, I expanded my layers palette full-screen, and it seems like the layer name could be almost infinite. Big enough to store at least fifty strings in explicit form.

I think, if you could use a layers name like that, that would be a good solution. I mean AS does warn you about being unable to undo a layer deletion. I think that would be ample protection of the stored info.

Just my two cents. :wink:
User avatar
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Post by rylleman »

Why not use decimals in the key? that way you could save "eat my shorts" into one key in a rotation channel of a layer, as "0.a hexadecimal string".
Not sure how long your decimals can be in an AS-file though.
Also I don't think using the default layer to store the values is a good thing, thats the first thing I delete when setting up a scene. Better then to create a new layer called "DO_NOT_DELETE" or something like that.
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

You should store thing in the channels that belong to the project (camera mainly) They never can be deleted.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

What happens is this:

The file is loaded. The keys are read in from "Layer 1" and stored in a global variable. Any changes are written to "Layer 1".

Layers "change". They have an "ID". There is always only one "layer 1" even if you delete a layer NAMED layer 1 then the next layer in the list becomes "layer 1". There is always one "layer 1" layer.

So if layer 1 is deleted the data is written to a new layer 1.

-------

I love Genete's idea!! That's even better. Write to the data the NEVER goes away and CAN'T go away.

-vern
Post Reply