:: Re: [Frei0r] [frei0r-devel] Strings…
トップ ページ
このメッセージを削除
このメッセージに返信
著者: salsaman
日付:  
To: Frei0r developer list
CC: frei0r
題目: Re: [Frei0r] [frei0r-devel] Strings for List parameters?
On Sat, April 7, 2012 16:04, jb wrote:
> On Saturday 07 April 2012 09:29:22 Marko Cebokli wrote:
>
>> but string parameter support was virtually nonexistent then, so I choose
>> the
>> "divided double" method for list parameters at that time - which proved
>> to
>> be non-extensible, and now it came back to haunt me!!
>>
>> This really bugs me - now I have some new plugins in the pipeline, and
>> don't
>> know how to implement the list parameters, to avoid future problems.
>>
>> I tried strings again today, and it works very well from melt
>> commandline,
>> name=1 or name='1' or name="1" all work correctly.
>>
>> However, I couldn't get Kdenlive to work with a string parameter, didn't
>> even display an input field for it.
>
> String parameters are supported in Kdenlive when using a ; separated list
> of
> possible strings (you should probably avoid spaces before or after the ;),
> see
> for example the mirror effect:
>
> <parameter type="list" name="mirror" default="horizontal"
> paramlist="horizontal;vertical;diagonal;xdiagonal;flip;flop">
>     <name>Mirroring direction</name>
> </parameter>

>
>
> Display names can also be added as for numeric lists... so in my opinion
> integers or strings would be better suited for lists.
>
> regards
> jb
>


Yes, that is also the way it is implemented in Weed. String lists are
actually integer parameters which have a separate field with the display
names for string values.

There are several advantages to this - one being that the string values
can have localised translations and it does not affect the functioning of
the plugin.


If we are to introduce string lists (choices) I would vote for doing it
this way:

- introduce a new integer type with max and min values.
- introduce an optional string list (NULL terminated array of char *)
valid only for int type
- keep float as present, with range 0.0 - 1.0, OR use min and max for
these (but it should be specified, no more "hidden" maxima...)


Salsaman.




Salsaman.






>
>
>
>
> _______________________________________________
> frei0r-devel mailing list
> frei0r-devel@???
> http://piksel.no/cgi-bin/mailman/listinfo/frei0r-devel
>