[Cin] User Defined Blend Algebra

Georgy Salnikov sge at nmr.nioch.nsc.ru
Thu Feb 13 18:24:27 CET 2025


On Thu, 13 Feb 2025, Andrea paz wrote:

> CIN_CONFIG I apply it at compile time (./configure) via the flag
> \u201c--with-config-dir=/home/paz/.bcast6\u201d. So I think your plugin fails to
> catch this change of mine and takes .bcast5 by default. But this is
> not a problem because it only affects my customization.

Setting CIN_CONFIG at compile time is your choice, it is OK. But to make the
environment definitions for the compilation/editing script, you have to set
them one after another in the same terminal/console from the same shell, and
then start Cinelerra program also from that very same console/shell:

cryo.sge:/disk2/sge/test> export CIN_EDITOR=kate
cryo.sge:/disk2/sge/test> export CIN_CONFIG=$HOME/.bcast6
cryo.sge:/disk2/sge/test> ~/ct/cin/bin/cin

This just works by me.

> Relevant environment variables
>
> $CIN_CC: currently not set, fallback: gcc
> $CC: currently not set, fallback: gcc
> CIN_EDITOR=kate
> $CIN_DAT: currently not set
> CIN_CONFIG=/home/paz/.bcast6
> $CIN_USERLIB: currently not set, fallback: /home/paz/.bcast6lib

So, when you set the environment and start the script immediately, it does
see them all. But then CGG has to be started also from there.

> NOTE: I have a BlendAlgebraCompile.pl also in .bcast5, despite never
> having started appimage since I did the compilation with your plugin.
> This file maintains emacs and .bcast5.

This is perhaps because once the script copied itself to ~/.bcast5 to create
user editable instance, while no $CIN_CONFIG was set (that it was set
somewhen while building CGG binary, is over).

> > perhaps you would think, you should get green, but actually you can get
> > black because here you subtract also alpha from alpha, both being 1.0, and
> > as the result you get alpha = 1-1 = 0.0, also black.
>
> And this makes me understand some of the many doubts I had about overlays....

OK, but now you can take the arith_subtract function, change the expression
for alpha to something like A_OUT = A(s); or even A_OUT = 1;, and you'll get
green:)

> I would like to use your explanations by summarizing them in the
> manual (and perhaps keep the full text in a separate file for users
> interested in further analysis). What do you think? Better to use all
> your writing in the manual?

I think, in any case I'll add my descriptions in form of plain text to the
sources of the plugins as some README files for future reference. Not just
now, but in a short time, after the code is stabilized.

How much technical info from this to include in user manual, is a difficult
question... A programmer and a user imagine differently. So, here I rely on
your decision.

Here in attachment there is a tiny patch to be applied after the first big
one. Then, if you press Edit... while finction name is empty (or in the file
selection dialog a directory is selected instead of plain file), an error
message will be shown. Perhaps this will be less confusing than silently
doing nothing.

_______________________________________________________________________________

Georgy Salnikov
NMR Group
Novosibirsk Institute of Organic Chemistry
Lavrentjeva, 9, 630090 Novosibirsk, Russia
Phone   +7-383-3307864
Email   sge at nmr.nioch.nsc.ru
_______________________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cgg-blend-editmsg.diff.gz
Type: application/octet-stream
Size: 755 bytes
Desc: 
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20250214/6fb7769f/attachment.obj>


More information about the Cin mailing list