[Bf-committers] Reading custom normals from python

Vicente vicentecarro at gmail.com
Tue May 12 01:35:34 CEST 2015


Hi again,

I have been trying it but I can not get it working. Probably I'm doing 
something wrong.
The closest I got is this:
bpy.data.meshes['Cube'].calc_normals_split()
bpy.data.meshes['Cube'].vertices[0].normal
Vector((-0.57, -0.5.7,-0.57))
bpy.data.meshes['Cube'].loops[0].normal
Vector((0.0, 0.0, 0.0))
None of both results match what I have (all the normals pointing to X 
axis positive, so I suppose it should be 1,0,0)

Ideas?

Thanks

Vicente

On 05/11/2015 05:07 PM, Bastien Montagne wrote:
> I do not see the problem? Just compute, read, modify, set custom
> normals, compute, read, modify, set, etc.
>
> Le 11/05/2015 18:19, Vicente Carro a écrit :
>> Hi,
>>
>> Thanks for the answer but I'm not sure if that helps me (anyway I'll try it
>> later at home).
>> My script should read the custom normals and modify them, and repeat that
>> process until the user gets the desired result. So calculating stuff
>> doesn't sound what I need. What I mean is, the custom normals shuld not be
>> reset/calculated each time the user uses my script, it should rely on the
>> previous custom normals.
>>
>> Thanks
>>
>> Vicente
>>
>>
>> On 11 May 2015 at 16:01, Bastien Montagne <montagne29 at wanadoo.fr> wrote:
>>
>>> All you have to do is compute loop (split) normals
>>> (me.calc_normals_split()), and then read loops' normal member…
>>>
>>>
>>> Le 11/05/2015 17:38, Vicente Carro a écrit :
>>>> Hi,
>>>>
>>>> I've checked all the custom-normals related functions that I found but I
>>>> can not find one for simply reading the custom normals of an mesh and I
>>>> need it for an script I'm doing to precisely modify the custom normals
>>>> (based on their previous values).
>>>> Are there python function/s to read the custom normals? Else, how can I
>>>> read them?
>>>>
>>>>
>>>> Thanks
>>>> _______________________________________________
>>>> Bf-committers mailing list
>>>> Bf-committers at blender.org
>>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>>>
>>> _______________________________________________
>>> Bf-committers mailing list
>>> Bf-committers at blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>>
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers



More information about the Bf-committers mailing list