Can not get eval obj's attribute in get/set function #99964
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#99964
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.96
Blender Version
Broken: version: 3.3.0 Alpha, branch: master, commit date: 2022-07-24 19:33, hash:
6db059e3d7
Worked: 3.2.1 / 3.3.0 7-10 build
Short description of error
2022-07-25 18-23-39.mp4
when using this script to get object's attribute in a property's get/set function, it didn't work
Exact steps for others to reproduce the error
I need some time to clean up the code and upload the smallest file
Added subscriber: @1029910278
Added subscriber: @mano-wii
Changed status from 'Needs Triage' to: 'Needs User Info'
Thanks for the report, but in order to forward it to the developers, we need a reliable way to reproduce the issue.
So please provide a simple .blend file or script showing the problem.
A guideline for making a good bug report can be found at https://wiki.blender.org/wiki/Process/Bug_Reports
The first test file from my code. I am not sure it cause this error directly, it work fine in my addon but crash blender when select a object(to read its attribute) here
ERROR (bpy.rna): C:\Users\blender\git\blender-vdev\blender.git\source\blender\python\intern\bpy_rna.c:7392 pyrna_srna_Subtype: failed to register 'Attribute'
Reproduce
get_geo_obj_attr.blend
get_geo_obj_attr.crash.txt
I will write a get/set examle later
The second file, this is how it work get_geo_obj_attr2.blend
PS: I set the depsgragh to a global value becauese I found that if I call 2 context.eval_depsgraph_get at a same time will freeze blender forver (like 2 drawing function call at the same time)
Changed status from 'Needs User Info' to: 'Needs Triage'
Added subscriber: @OmarEmaraDev
Changed status from 'Needs Triage' to: 'Needs User Info'
In your second file, if I connect the Domain Size node to the bezier curve geometry output, it prints the attributes as expected. Could this be the issue or was this just a mistake while preparing the file?
Regardless, I don't think using with contexts and depsgraphs in RNA setter and getter functions is safe.
oh, maybe I shound check the file again. I will check it out asap
Is there an other to get attribute generated from geo node attribute without using depsgraphs?
Yes, It need to link to the output. It was a mistake sorry.
I found the true problem is the obj must be link to the scene so that it can print attribute in 3.3/3.4(It didn't to link to the scene in 3.2)
3.4 with obj unlink
3.4 with obj link
Changed status from 'Needs User Info' to: 'Needs Triage'
Changed status from 'Needs Triage' to: 'Needs User Info'
Can you clarify your last point? Which object wasn't linked to the scene? The one named
Motion Control-MotionPath
? Is that in the second file you shared?get_geo_obj_attr2 (1).blend1
upload again
I still don't understand the issue. It prints
{'factor': [0.0, 0.9999999403953552], 'length': [0.0, 0.0]}
for me whenCube.001
is selected, which means the attributes are correctly retrieved.Can you clarify this?
check this file get_geo_obj_attr2 (1).blend1 and run the script
Problem: in 3.2 and early 3.3 , attribute can be printed while the object is not linked to the scene, but in later 3,3 and 3.4 , object must be linked to the scene so that the attribute can be printed
I suspect the 3.3/3.4 behavior is the more correct one, since unlinked objects will not be evaluated because they don't affect anything. So wouldn't this be expected?
What is the use case for evaluating an unlinked object?
So what I expect is I can read bpy.data.objects's attributes without linking them to the scene. If we can read their location, we shounld be able to read their attirbute.
Seems now the deps graph no longer consider the object not link to the scene?
Changed status from 'Needs User Info' to: 'Needs Triage'
Added subscriber: @lichtwerk
Changed status from 'Needs Triage' to: 'Needs User Info'
Situation is unclear for me.
I dont see a difference in 3.2 vs. master, selecting
Cube.001
after running the script and changing the test_value will equally print an empty dict {}What am I doing wrong?
poke ^
sorry, busy for moving house last week. I will give an respond tomorrow
one more poke ^
Changed status from 'Needs User Info' to: 'Archived'
No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed.
Thanks again for the report. If the problem persists please open a new report with the required information.