Can't set normals with foreach_set #34372

Closed
opened 2013-02-22 22:42:53 +01:00 by John Smith · 3 comments

%%%--- Operating System, Graphics card ---
Arch Linux 64-bit
Nvidia GTX 295

- Blender version with error, and version that worked ---

Error: Blender 2.66.0 r54697
Working: Blender 2.65 r53177

- Short description of error ---

Normals can't be set using foreach_set in Blender 2.66. For example, something like this doesn't work anymore:
verts.foreach_set("normal", normal_list)

- Steps for others to reproduce the error (preferably based on attached .blend file) ---
  1. Open Blender and make sure default "Cube" is available.
  2. Copy this code into the Text Editor (or open the attached Blend file):

import bpy
import random

verts = bpy.data.meshes["Cube"].vertices
for v in verts:

  print(v.normal)

print('----------')
random_normals = [random.uniform(-1.0, 1.0) for i in range(0, 24)]
verts.foreach_set("normal", random_normals)
for v in verts:

  print(v.normal)
  1. Hit the "Run Script" button.
  2. Verify that normals weren't updated in the console.%%%
%%%--- Operating System, Graphics card --- Arch Linux 64-bit Nvidia GTX 295 - Blender version with error, and version that worked --- Error: Blender 2.66.0 r54697 Working: Blender 2.65 r53177 - Short description of error --- Normals can't be set using foreach_set in Blender 2.66. For example, something like this doesn't work anymore: verts.foreach_set("normal", normal_list) - Steps for others to reproduce the error (preferably based on attached .blend file) --- 1. Open Blender and make sure default "Cube" is available. 2. Copy this code into the Text Editor (or open the attached Blend file): import bpy import random verts = bpy.data.meshes["Cube"].vertices for v in verts: ``` print(v.normal) ``` print('----------') random_normals = [random.uniform(-1.0, 1.0) for i in range(0, 24)] verts.foreach_set("normal", random_normals) for v in verts: ``` print(v.normal) ``` 3. Hit the "Run Script" button. 4. Verify that normals weren't updated in the console.%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

%%%Fix in svn, thanks for the report.%%%

%%%Fix in svn, thanks for the report.%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#34372
No description provided.