Python script has visual bugs when inputting floats and integers into geometry node inputs #119064

Open
opened 2024-03-04 21:44:52 +01:00 by Edward-Savage · 3 comments

System Information
Edition Windows 10 Home
Version 22H2
Installed on ‎29/‎09/‎2023
OS build 19045.4046
Experience Windows Feature Experience Pack 1000.19053.1000.0

Processor AMD Ryzen 5 3600 6-Core Processor 3.60 GHz
Installed RAM 16.0 GB
System type 64-bit operating system, x64-based processor

Blender Version
Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: 9be62e85b7

Short description of error
When using the python console or text editor, geometry node inputs do weird things. (visually, and can be returned by making any change to the nodes)(putting an integer value into a 'float' type input causes the input box to disappear, and putting a number with decimal places (e.g. "1.0")in will change the subtype of the input)

Exact steps for others to reproduce the error

The video attached says these steps in more detail, and is easier to understand, but i included the process in text just in case.

  1. Create a new geometry node tree data block
  2. Add any geometry node (I've been using subdivision surface)
  3. Connect any float value into the group input node, so that the value can be edited in the modifier panel
  4. Change the value to any integer number
  5. In the Info panel, copy the latest action
  6. Change the value to anything (this is just to see if the code does anything)
  7. Paste the action into the python console
  8. The input box (in geometry nodes in modifiers panel) disappears, and an error shows saying "Property type does not match input socket "(Edge Crease)"". (I was using the edge crease from the subdivision surface node). When i say disappears, i mean its a visual bug, so it is not actually gone, any change to the nodes will refresh it and make the box reappear.
  9. If you change the code to have a number with a decimal place (e.g. "1.0"), then the value does change, and the box does not disappear. However, the 'subtype' of the input has been visually changed to 'none'. (e.g. it changes from 'factor'). Any change to the nodes will refresh it and turn it back into the original subtype.

(keep in mind that in order to see the change to the object, you have to turn off and on the viewport visibility. This is a separate bug that has been reported here)

**System Information** Edition Windows 10 Home Version 22H2 Installed on ‎29/‎09/‎2023 OS build 19045.4046 Experience Windows Feature Experience Pack 1000.19053.1000.0 Processor AMD Ryzen 5 3600 6-Core Processor 3.60 GHz Installed RAM 16.0 GB System type 64-bit operating system, x64-based processor **Blender Version** Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: 9be62e85b727 **Short description of error** When using the python console or text editor, geometry node inputs do weird things. (visually, and can be returned by making any change to the nodes)(putting an integer value into a 'float' type input causes the input box to disappear, and putting a number with decimal places (e.g. "1.0")in will change the subtype of the input) <video src="/attachments/879c065d-f2c2-4e4a-a0cf-65b9f537bb25" controls></video> **Exact steps for others to reproduce the error** The video attached says these steps in more detail, and is easier to understand, but i included the process in text just in case. 1. Create a new geometry node tree data block 2. Add any geometry node (I've been using subdivision surface) 3. Connect any float value into the group input node, so that the value can be edited in the modifier panel 4. Change the value to any integer number 5. In the Info panel, copy the latest action 6. Change the value to anything (this is just to see if the code does anything) 7. Paste the action into the python console 8. The input box (in geometry nodes in modifiers panel) disappears, and an error shows saying "Property type does not match input socket "(Edge Crease)"". (I was using the edge crease from the subdivision surface node). When i say disappears, i mean its a visual bug, so it is not actually gone, any change to the nodes will refresh it and make the box reappear. 9. If you change the code to have a number with a decimal place (e.g. "1.0"), then the value does change, and the box does not disappear. However, the 'subtype' of the input has been visually changed to 'none'. (e.g. it changes from 'factor'). Any change to the nodes will refresh it and turn it back into the original subtype. (keep in mind that in order to see the change to the object, you have to turn off and on the viewport visibility. This is a separate bug that has been reported [here](https://projects.blender.org/blender/blender/issues/87006))
Edward-Savage added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2024-03-04 21:44:52 +01:00
Edward-Savage changed title from Python script to Python script has visual bugs when inputting floats and integers into geometry node inputs 2024-03-04 21:47:46 +01:00

I can confirm the issue reported.
It seems to be related to #112646: "Geometry Nodes input subtype changes on assign".

I also noticed another issue when testing on Blender 4.2. The operations Log in the Info Editor is wrong in 4.2. Will report separately.

I can confirm the issue reported. It seems to be related to #112646: "Geometry Nodes input subtype changes on assign". I also noticed another issue when testing on Blender 4.2. The operations Log in the Info Editor is wrong in 4.2. Will report separately.
Author

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)
Member

Part of this is fixed by 91466f71f1. Now the subtype stays intact when setting the value to another float. Setting it to an integer still does not work though.

Part of this is fixed by 91466f71f1db6048384b1ffe12e48c8876025f61. Now the subtype stays intact when setting the value to another float. Setting it to an integer still does not work though.
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
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#119064
No description provided.