Adding keyframes to nested custom properties (IDProperties) of a bone fails #25746

Closed
opened 2011-01-20 19:20:44 +01:00 by der On · 17 comments

%%%OS: Linux - Ubuntu 10.04 64bit
Build: 34414

In the attached file there's an armature with one bone in layer 4. That bone has a nested IDProperty (xplane.datarefs- [x].value). When trying to add a keyframe to the nested property blender crashes with a segfault. Maybe something with resolving paths? I've tried adding keyframes to regular custom props of a bone and found out that after renaming the prop the fcurve becomes invalid as it seems to be bound to the prop name. Also I've seen that the fcurves are actually added to the armature, not to the bone, as bone don't have fcurves?%%%

%%%OS: Linux - Ubuntu 10.04 64bit Build: 34414 In the attached file there's an armature with one bone in layer 4. That bone has a nested IDProperty (xplane.datarefs- [x].value). When trying to add a keyframe to the nested property blender crashes with a segfault. Maybe something with resolving paths? I've tried adding keyframes to regular custom props of a bone and found out that after renaming the prop the fcurve becomes invalid as it seems to be bound to the prop name. Also I've seen that the fcurves are actually added to the armature, not to the bone, as bone don't have fcurves?%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

%%%Forgett to mention:

I'm using Bone.xplane.datarefs- [x].keyframe_insert(data_path="value",group="XPlane Dararefs "+bone.name).
Bone.xplane.datarefs- [x].value is a FloatProperty
Bone.xplane.datarefs- [x] is a PropertyCollection%%%

%%%Forgett to mention: I'm using Bone.xplane.datarefs- [x].keyframe_insert(data_path="value",group="XPlane Dararefs "+bone.name). Bone.xplane.datarefs- [x].value is a FloatProperty Bone.xplane.datarefs- [x] is a PropertyCollection%%%
Member

%%%Hi Joshua, didnt you work on keyframing custom properties?%%%

%%%Hi Joshua, didnt you work on keyframing custom properties?%%%
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

%%%I added support for this but only tested on ID's not bones, assigning to myself.%%%

%%%I added support for this but only tested on ID's not bones, assigning to myself.%%%
Member

%%%This bugreport is not clear enough

  • How are you getting "Bone"? Bone = bpy.data.armatures["Armature"].bones["Bone"], OR Bone = bpy.data.objects["Armature"].pose.bones["Bone"], OR something else?
  • Where are you running this line from? Console? A Script?

For ease of testing/repeatability of the bug you're getting, if you're running commands from py, then set up the file with a script that runs the offending commands, and then upload that file so that we can just run the script to test (instead of guessing how you're doing this).

Also, it seems odd to be adding properties on Armature/restpose level of bones instead of Pose level. Pose level is where most settings such as transforms and stuff animators can tweak go...%%%

%%%This bugreport is not clear enough - How are you getting "Bone"? Bone = bpy.data.armatures["Armature"].bones["Bone"], OR Bone = bpy.data.objects["Armature"].pose.bones["Bone"], OR something else? - Where are you running this line from? Console? A Script? For ease of testing/repeatability of the bug you're getting, if you're running commands from py, then set up the file with a script that runs the offending commands, and then upload that file so that we can just run the script to test (instead of guessing how you're doing this). Also, it seems odd to be adding properties on Armature/restpose level of bones instead of Pose level. Pose level is where most settings such as transforms and stuff animators can tweak go...%%%
Member

%%%Reassigning back to Campbell. %%%

%%%Reassigning back to Campbell. %%%

%%%der On, can you explain how to redo this crash, from looking at your file there are no scripts which setup these properties.

It should be possible to make a file where 2-4 steps can redo this crash.%%%

%%%der On, can you explain how to redo this crash, from looking at your file there are no scripts which setup these properties. It should be possible to make a file where 2-4 steps can redo this crash.%%%
Author

%%%I've attached a file that includes a script to reproduce the error.%%%

%%%I've attached a file that includes a script to reproduce the error.%%%

%%%Hi, looked into this file, it now complains the properties are not set,

Traceback (most recent call last):

File "activate", line 5, in <module>
File "/data/src/blender/blender/release/scripts/modules/bpy/ops.py", line 179, in __call__
  ret = op_call(self.idname_py(), None, kw)

SystemError: Calling operator "bpy.ops.export.xplane_obj" error, could not be found

The script needs to define the RNA, this would be currently be being done by your addon.%%%

%%%Hi, looked into this file, it now complains the properties are not set, Traceback (most recent call last): ``` File "activate", line 5, in <module> File "/data/src/blender/blender/release/scripts/modules/bpy/ops.py", line 179, in __call__ ret = op_call(self.idname_py(), None, kw) ``` SystemError: Calling operator "bpy.ops.export.xplane_obj" error, could not be found The script needs to define the RNA, this would be currently be being done by your addon.%%%
Author

%%%Reuploaded the testfile with script that creates properties%%%

%%%Reuploaded the testfile with script that creates properties%%%

%%%fixed crash r34615.
still not keyframing though, leaving open for now though this could be a TODO item too.%%%

%%%fixed crash r34615. still not keyframing though, leaving open for now though this could be a TODO item too.%%%
Author

%%%Instead of segfaul blender now throws a RNA error. One leap forward. Thanks.

Tried adding those nested properties to PoseBones now and then adding keyframes but this was giving me the same error as with the props@bone.%%%

%%%Instead of segfaul blender now throws a RNA error. One leap forward. Thanks. Tried adding those nested properties to PoseBones now and then adding keyframes but this was giving me the same error as with the props@bone.%%%

%%%Moved from Blender 2.5 Bug Tracker to Todo%%%

%%%Moved from Blender 2.5 Bug Tracker to Todo%%%

%%%looked further into supporting this, its basically impossible unless the PointerRNA stores a reference to its parent.
because its possible that the rna exists but the ID property data doesnt. if the struct is used twice there is no way to know which one we are looking at.

moving to todo.

for now you can add an fcurve to animdata directly and set its path.%%%

%%%looked further into supporting this, its basically impossible unless the PointerRNA stores a reference to its parent. because its possible that the rna exists but the ID property data doesnt. if the struct is used twice there is no way to know which one we are looking at. moving to todo. for now you can add an fcurve to animdata directly and set its path.%%%
Author

%%%Ok, got that adding fcurve manually but how would that path look like?

At the moment I'm trying to attach properties to the poseBones and create data paths that look like this:

pose.bones[index].xplane.datarefs[index].value (this causes blender to crash when trying to expand the created Action-Group in Curve-Editor, my Property won't update in UI)

Also tried: PoseBone.xplane.datarefs[index].value (no crash, nice fcurve, but my Property won't update in UI)%%%

%%%Ok, got that adding fcurve manually but how would that path look like? At the moment I'm trying to attach properties to the poseBones and create data paths that look like this: pose.bones[index].xplane.datarefs[index].value (this causes blender to crash when trying to expand the created Action-Group in Curve-Editor, my Property won't update in UI) Also tried: PoseBone.xplane.datarefs[index].value (no crash, nice fcurve, but my Property won't update in UI)%%%
Author

%%%I've attached a simple example file with an internal script in it, that tries to assign a keyframe to a nested custom Property of a bone. It causes the same RNA error like the one in my addon.%%%

%%%I've attached a simple example file with an internal script in it, that tries to assign a keyframe to a nested custom Property of a bone. It causes the same RNA error like the one in my addon.%%%
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 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#25746
No description provided.