[Bf-cycles] Add missing node to XML API

Lin M majcjc at gmail.com
Wed Mar 16 16:35:01 CET 2016


Hi,

The rgbcurvesnode is a subnode under the <shader></shader> tag and cannot
be loaded like the mesh data. It's not elegant to add a line in the
xml_read_scene() specially for rgbcurvesnode. I feel it would be better to
change the import code of xml_read_shader(): Check if the name already
existed in the state.scene->shaders. So the nodes in a shader can be
imported from different places.

For example

File 1

<cycles>
<shader name="name_1">
  <certain_node />
</shader>

<include src="//File 2.xml" />
</cycles>

File 2

<cycles>
<shader name="name_1">
  <certain_node />
</shader>
</cycles>


I submitted a diff here https://developer.blender.org/D1857

Not sure if this is the right way to do it, please take a look at it.
Thanks!

Best,
Lin

On Wed, Mar 16, 2016 at 12:59 PM, Sergey Sharybin <sergey.vfx at gmail.com>
wrote:

> Hi,
>
> While it's not ideal (personally I don't find xml ideal here to begin
> with, but that's another story ;) but for the time being think it's not a
> bad approach indeed.
> On Mar 16, 2016 07:01, "Lin M" <majcjc at gmail.com> wrote:
>
>> Hi,
>>
>> I'm adding the RGBCurvesNode to XML API. There are 3 variables needed to
>> be added into the node. The min_x and max_x can be easily set from xml
>> file. I'm thinking about how to load the curves array from xml file. Since
>> the size depends on the depth of image (256 each channel for 8bit image)
>> and quite large, is it OK if I saved it in a separate file like the current
>> way for mesh data?
>>
>> Best,
>> Lin
>>
>> _______________________________________________
>> Bf-cycles mailing list
>> Bf-cycles at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-cycles
>>
>>
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20160316/ae646850/attachment.htm 


More information about the Bf-cycles mailing list