[Kdenlive-devel] How does the xml files in share/apps/kdenlive/effects/ work?
jb
jb at kdenlive.org
Thu Mar 12 11:50:39 UTC 2009
On Thursday 12 March 2009 08.50:41 Mathias Friman wrote:
> Hi all!
>
> I've been experimenting a bit with the XML files in
> share/apps/kdenlive/effects to get my frei0r plugins to behave a little
> less annoying. Since I use saturat0r and contrast0r a lot, i would like for
> them to have a default value that at least approximates the clips' original
> looks. A.k.a. sensible defaults.
>
Each parameter in the XML file has a min, a max value and a factor value. Those
3 values are integer numbers.
Let's say the frei0r plugin want a value between 0 and 5.
In Kdenlive, since our widget only returns integer numbers, we can decide to
let the user choose a value between 0 and 500, then divide the result by 100.
In that case, the min value will be 0, the max 500 and the factor 100. The
factor is a number by which you divide the min - max range.
If you want a default of 13, just put 13 as default value. So the resulting
xml will be:
<!DOCTYPE kpartgui>
<effect tag="frei0r.saturat0r" id="frei0r.saturat0r">
<name>Saturat0r</name>
<description>Saturation</description>
<author>Unknown</author>
<parameter type="constant" name="Saturation" max="500" min="0"
default="13" factor="100">
<name>Saturation</name>
</parameter>
</effect>
> Another rather strange side-effect with having an xml file is that the
> effect appears twice in the effects list. Can I fix this somehow?
Kdenlive probes MLT to find the available effects, than parses the XML file,
which is why it appears twice. If you create an xml file for an already
existing filter, add the filter name to the file:
/data/blacklisted_effects.txt
in the category:
# effects with XML UI
Hope it is clear enough.
regards
jb
More information about the Kdenlive
mailing list