[Bf-committers] YFexportxml toggle

Giuseppe Ghibò ghibo at mandriva.com
Thu Jun 1 18:32:08 CEST 2006


Anyone knows how is it possible to set the
default value of:

G.scene->r.YFexportxml

to 1, instead of 0? This defines the behaviour
of the yafray. If set to 1 it loads the yafray
plugin (as library) otherwise it passes the request via an
XML file and calls "yafray" in command line. I want the
plugin to be the default behaviour.

Trying to revert the behaviour in buttons_scene.c:

  uiDefButBitS(block, TOGN, 1, B_REDR, "xml", 5,180,75,20, 
&G.scene->r.YFexportxml, ...

to

  uiDefButBitS(block, TOG, 1, B_REDR, "xml", 5,180,75,20, 
&G.scene->r.YFexportxml, ...

doesn't work too, because anyway the "toggle" button
refers to the status of the variable G.scene->r.YFexportxml
which by default is always set to 0.

I think that this is trivial, as one have just
to set "G.scene->r.YFexportxml=1;" somewhere BEFORE
a scene/setting is loaded/created (so to preserve also the saved behaviour),
but I didn't find yet where is this point. Anyone?

Alternatively a trip would be to consider that YFexportxml=0 would
mean calls the "plugin" (i.e. reverting the default behaviour)
but this is bad, as the behaviour of all saved ".blend" files would be
reverted too.

Thanks
Bye
Giuseppe.


More information about the Bf-committers mailing list