[Bf-committers] YFexportxml toggle

Giuseppe Ghibò ghibo at mandriva.com
Thu Jun 1 19:10:35 CEST 2006


Ben Stabler wrote:

> I think the normal approach is just to set the default in B.blend
> 

I don't provide a default B.blend (nor the blender.org binaries do),
and it's needed at packaging level not at a single user level. Providing
a .B.blend would mean that I've to provide in the RPM package a default
.B.blend which is achieved the first time I ran the blender, and I don't think
this is the best solution/approach.

The other alternative which comes to my mind is to ignore the status
of the YFwxportxml toggle and use always the plugin, i.e. replace the block:

         if (!R.r.YFexportxml)
                 YAF_switchFile();
         else
                 YAF_switchPlugin();

with only

	YAF_switchPlugin();

or withint #ifdef;

#ifdef DONT_USEYAFRAYXML
	YAF_switchPlugin();
#else
         if (!R.r.YFexportxml)
                 YAF_switchFile();
         else
                 YAF_switchPlugin();
#endif

Thanks
Bye
Giuseppe.

> Ben
> 
> Giuseppe Ghibò wrote:
> 
>> 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.
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at projects.blender.org
>> http://projects.blender.org/mailman/listinfo/bf-committers
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers



More information about the Bf-committers mailing list