[Bf-cycles] Add missing node to XML API

Sergey Sharybin sergey.vfx at gmail.com
Thu Mar 17 09:55:50 CET 2016


You can't put image itself to the XML, but you can reference texture file
from an Image node using "src" parameter.

There's no unwrapping happening in Cycles, so you'll have to provide UV
coordinates explicitly in XML.

On Thu, Mar 17, 2016 at 1:39 PM, Lin M <majcjc at gmail.com> wrote:

> Hi Sergey,
>
> How can I attach an image texture to the object in the xml file? In
> blender the object needs to be unwrapped but I'm not sure how I can do this
> in the xml api. It would be very helpful if you could give me some advice.
> Thank you!
>
> Best,
> Lin
>
> On Wed, Mar 16, 2016 at 11:43 PM, Lin M <majcjc at gmail.com> wrote:
>
>> Hi Laurent,
>>
>> You mentioned that there are some annoying bugs there, could you
>> described them a little bit so I can try to fix them. Thanks!
>>
>> Best,
>> Lin
>>
>> On Wed, Mar 16, 2016 at 11:35 PM, Lin M <majcjc at gmail.com> wrote:
>>
>>> 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
>>>>
>>>>
>>>
>>
>
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
>
>


-- 
With best regards, Sergey Sharybin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20160317/d097d07a/attachment.htm 


More information about the Bf-cycles mailing list