Python: accessing color ramp causes segmentation violation #21054

Closed
opened 2010-02-09 08:05:59 +01:00 by Thomas Larsson · 3 comments
Member

%%%Python: accessing color ramp causes segmentation violation
build 26658
Ubuntu 64 bit, same error on Windows 32 bit

Run the following code when the active object has a material with diffuse ramp.

                      - Python file -----------

import bpy

ob = bpy.context.object
print(ob)
mat = ob.materials- [x].material
print(mat)
ramp = mat.diffuse_ramp
print(ramp)
elements = ramp.elements
print(elements)
for elt in elements:
print(elt.color)
print(elt.position)

          - Output ----------

[BPy_StructRNA "Object" -> "Cube"]
[BPy_StructRNA "Material" -> "Material"]
[BPy_StructRNA "ColorRamp"]
[BPy_PropertyRNA "ColorRamp" -> "elements"]
Segmentation fault

%%%

%%%Python: accessing color ramp causes segmentation violation build 26658 Ubuntu 64 bit, same error on Windows 32 bit Run the following code when the active object has a material with diffuse ramp. - Python file ----------- import bpy ob = bpy.context.object print(ob) mat = ob.materials- [x].material print(mat) ramp = mat.diffuse_ramp print(ramp) elements = ramp.elements print(elements) for elt in elements: print(elt.color) print(elt.position) - Output ---------- [BPy_StructRNA "Object" -> "Cube"] [BPy_StructRNA "Material" -> "Material"] [BPy_StructRNA "ColorRamp"] [BPy_PropertyRNA "ColorRamp" -> "elements"] Segmentation fault %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Member

%%%This is caused by the same problem as
https://projects.blender.org/tracker/index.php?func=detail&aid=21057&group_id=9&atid=498

Closing this report.%%%

%%%This is caused by the same problem as https://projects.blender.org/tracker/index.php?func=detail&aid=21057&group_id=9&atid=498 Closing this report.%%%
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
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#21054
No description provided.