Geometry Nodes input subtype changes on assign #112646

Closed
opened 2023-09-21 03:20:39 +02:00 by Mikhail Rachinskiy · 4 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 860M/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 522.25

Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-09-19 21:26, hash: 264c3e7bd7a6
Worked: (newest version of Blender that worked as expected)

Short description of error
When setting GN modifier value in Python, float input changes subtype from Angle to None.

Example code:
object.modifiers[0]['Socket_2'] = 3.14

Exact steps for others to reproduce the error

  1. Open attached blend file
  2. Notice how modifier value is in degrees.
  3. Execute code in Console area.
  4. Move mouse over modifier value to refresh UI.
  5. Value displays 3.14 radians instead of 180 degrees.

* Note: I also noticed that subtype does not affect input default value.

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 860M/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 522.25 **Blender Version** Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-09-19 21:26, hash: `264c3e7bd7a6` Worked: (newest version of Blender that worked as expected) **Short description of error** When setting GN modifier value in Python, float input changes subtype from `Angle` to `None`. Example code: `object.modifiers[0]['Socket_2'] = 3.14` **Exact steps for others to reproduce the error** 1. Open attached [blend file](/attachments/27da1e8e-0d49-4549-babe-db1274ae53ea) 1. Notice how modifier value is in degrees. 1. Execute code in Console area. 1. Move mouse over modifier value to refresh UI. 1. Value displays 3.14 radians instead of 180 degrees. _* Note: I also noticed that subtype does not affect input default value._
Mikhail Rachinskiy added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2023-09-21 03:20:40 +02:00
Member

Thanks for the report. I can confirm.
This may not be a bug because GN might be dealing with radian unit only (degree might be there for user convenience)
I'll forward the report to GN devs
cc @mod_moder

Thanks for the report. I can confirm. This may not be a bug because GN might be dealing with radian unit only (degree might be there for user convenience) I'll forward the report to GN devs cc @mod_moder
Pratik Borhade added
Module
Nodes & Physics
Status
Needs Info from Developers
and removed
Status
Needs Triage
labels 2023-09-21 07:29:19 +02:00

@HooglyBoogly @JacquesLucke Its okay to just take out id properties and reimplements all inputs as list of rna value structures? To solve all problems related with this (type rewriting, subtype cleaning, update not propagation, ...).

@HooglyBoogly @JacquesLucke Its okay to just take out id properties and reimplements all inputs as list of rna value structures? To solve all problems related with this (type rewriting, subtype cleaning, update not propagation, ...).
Member

That might be the best long term solution, but for now, I think assigning an IDProperty value with Python should just maintain the UI data. That seems helpful in other contexts too. #106161 is slightly related too.

That might be the best long term solution, but for now, I think assigning an `IDProperty` value with Python should just maintain the UI data. That seems helpful in other contexts too. #106161 is slightly related too.
Iliya Katushenock removed the
Meta
Good First Issue
label 2023-09-21 18:38:55 +02:00

ive found that doing anything to the inputs or outputs of the node group will cause it to refresh, and for some reason, it only needs to be done once. after it is refreshed, any other time the code is run, the inputs are formatted correctly. if a new input is added, then the bug happens to it, so i just leave the line of code at the end.

bpy.data.node_groups["Geometry Nodes"].interface.items_tree[0].description = "this somehow fixes the issue of it reformatting the text box"

(this only changes the description of the geometry output, so it doesnt change anything visible)

ive found that doing anything to the inputs or outputs of the node group will cause it to refresh, and for some reason, it only needs to be done once. after it is refreshed, any other time the code is run, the inputs are formatted correctly. if a new input is added, then the bug happens to it, so i just leave the line of code at the end. bpy.data.node_groups["Geometry Nodes"].interface.items_tree[0].description = "this somehow fixes the issue of it reformatting the text box" (this only changes the description of the geometry output, so it doesnt change anything visible)
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-03-12 15:50:34 +01:00
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
5 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#112646
No description provided.