Python: accessing DriverVariable targets causes segmentation violation #21057

Closed
opened 2010-02-09 08:58:20 +01:00 by Thomas Larsson · 4 comments
Member

%%%
Python: accessing DriverVariable targets causes segmentation violation
build 26658
Ubuntu 64 bit

  1. Delete default cube
  2. Add Armature > Meta-rig > Arm biped
  3. In Armature context, Meta-Rig tab, check Create deform rig and Generate
  4. Select the new rig
  5. Run the following code.

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

import bpy

ob = bpy.context.object
print(ob)
adata = ob.animation_data
print(adata)
drivers = adata.drivers
print(drivers)
for fcurve in drivers:
print(fcurve)
driver = fcurve.driver
print(driver)
vars = driver.variables
print(vars)
for var in vars:
print(var.name)
print(var.type)
print(var.targets)
for targ in var.targets:
print("Print target")
print(targ)

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

[BPy_StructRNA "Object" -> "rig"]
[BPy_StructRNA "AnimData"]
[BPy_PropertyRNA "AnimData" -> "drivers"]
[BPy_StructRNA "FCurve"]
[BPy_StructRNA "Driver"]
[BPy_PropertyRNA "Driver" -> "variables"]
hinge
SINGLE_PROP
[BPy_PropertyRNA "DriverVariable" -> "targets"]
Segmentation fault
%%%

%%% Python: accessing DriverVariable targets causes segmentation violation build 26658 Ubuntu 64 bit 1. Delete default cube 2. Add Armature > Meta-rig > Arm biped 3. In Armature context, Meta-Rig tab, check Create deform rig and Generate 4. Select the new rig 5. Run the following code. # -------------- Python file ----------- import bpy ob = bpy.context.object print(ob) adata = ob.animation_data print(adata) drivers = adata.drivers print(drivers) for fcurve in drivers: print(fcurve) driver = fcurve.driver print(driver) vars = driver.variables print(vars) for var in vars: print(var.name) print(var.type) print(var.targets) for targ in var.targets: print("Print target") print(targ) # -------- Output ---------- [BPy_StructRNA "Object" -> "rig"] [BPy_StructRNA "AnimData"] [BPy_PropertyRNA "AnimData" -> "drivers"] [BPy_StructRNA "FCurve"] [BPy_StructRNA "Driver"] [BPy_PropertyRNA "Driver" -> "variables"] hinge SINGLE_PROP [BPy_PropertyRNA "DriverVariable" -> "targets"] Segmentation fault %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Member

%%%Closed duplicate report:
[#21054] Python: accessing color ramp causes segmentation violation
https://projects.blender.org/tracker/index.php?func=detail&aid=21054&group_id=9&atid=498

Both of these bugs are caused when trying to iterate over collections that are defined as arrays in the sdna code.

Assigning our Python wrangler-master, Campbell :)

%%%

%%%Closed duplicate report: [#21054] Python: accessing color ramp causes segmentation violation https://projects.blender.org/tracker/index.php?func=detail&aid=21054&group_id=9&atid=498 Both of these bugs are caused when trying to iterate over collections that are defined as arrays in the sdna code. Assigning our Python wrangler-master, Campbell :) %%%

%%%fixed in svn r26745. nice find :)%%%

%%%fixed in svn r26745. nice find :)%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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#21057
No description provided.