farbrausch / fr_public

Farbrausch demo tools 2001-2011
3.36k stars 344 forks source link

Selectgrow - Improve + fix bugs #58

Closed wzman closed 12 years ago

wzman commented 12 years ago
rygorous commented 12 years ago

This breaks file format compatibility again (order of parameters changed).

wzman commented 12 years ago

Selectgrow parameters order ? Yes I changed order, I think it's more logical like this. But the initial selectgrow is only 3 days long and in dev phase ?? it is now stable. Is it so important to keep previous order ? and I have to reorder the parameters ? Thanks

rygorous commented 12 years ago

You can change UI order if you want to, but file format order must be stable. The order they appear in the .ops file is the same order you'll get in the UI; if you reshuffle things later, you have to manually specify where in the op data block everything is stored, by specifying offsets manually using ":". In your case you would do:

flags Input("face|vertices") : 1;
int Amount(0..1024) : 0 = 0;
float Range(0..1 step 0.001) : 2 = 0;
int Power(0..12) : 3=1;
float Bias(0..16 step 0.01) : 4=1;

Offsets are in "slots". Floats/ints/flags etc. take one slot, float2 takes 2 slots, ..., float4 takes 4 slots. Links, strings, file names and buttons are special and don't count in this.

rygorous commented 12 years ago

As a general rule, locally and in your own branches you can do whatever you want, but once code has been merged into master that effectively becomes a public release and I'll insist on not breaking backwards compatibility in this way. (Exception: if something in the mainline was just broken to the point where it can't ever have worked properly for anyone, you get to break compatibility, but I really want to avoid breaking any existing files without good reason.)

wzman commented 12 years ago

ok thanks for this tip. I really appreciate your professionalism and it is a rewarding to have your advice ;)

Just for info, good syntax for changing offsets is :

flags Input:1("face|vertices")=0;
int Amount:0(0..1024)=0;
float Range:2(0..1 step 0.001)=0;
int Power:3(0..256)=1;
float Bias:4(0..16 step 0.01)=1;

Fixed

rygorous commented 12 years ago

Oops, sorry, you're right about the syntax - it's been a while since I last used it :)