Replace String geometry node does not handle empty strings correctly #98268

Closed
opened 2022-05-19 19:36:04 +02:00 by Tomás Cejas · 9 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.59

Blender Version
Broken: version: 3.1.0, branch: master, commit date: 2022-03-08 18:16, hash: c77597cd0e

Short description of error
There are issues when replacing a character for an empty string using the Replace String node. It doesn't seem to work as expected.
For example, when trying to replace the "B"s for an empty string in the input "ABBA", the result is "ABA" instead of the expeted "AA"

A guess is that it goes over each index in the string and if the letter in that index is "B" it replaces it with "" but since that shortens the string it makes it skip the next index.

{F13091269, size = full}

Exact steps for others to reproduce the error
Open the attached .blend file (or reproduce the node setup shown above) and test different string inputs, to notice how the result follows the undesired behaviour.
Replace String node issues.blend

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 512.59 **Blender Version** Broken: version: 3.1.0, branch: master, commit date: 2022-03-08 18:16, hash: `c77597cd0e` **Short description of error** There are issues when replacing a character for an empty string using the Replace String node. It doesn't seem to work as expected. For example, when trying to replace the "B"s for an empty string in the input "ABBA", the result is "ABA" instead of the expeted "AA" A guess is that it goes over each index in the string and if the letter in that index is "B" it replaces it with "" but since that shortens the string it makes it skip the next index. {[F13091269](https://archive.blender.org/developer/F13091269/image.png), size = full} **Exact steps for others to reproduce the error** Open the attached .blend file (or reproduce the node setup shown above) and test different string inputs, to notice how the result follows the undesired behaviour. [Replace String node issues.blend](https://archive.blender.org/developer/F13091287/Replace_String_node_issues.blend)
Author

Added subscriber: @TomasCJ

Added subscriber: @TomasCJ
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Added subscribers: @pundr, @HooglyBoogly

Added subscribers: @pundr, @HooglyBoogly
Member

Thanks for the report!

Hey @erik85, would you be interested in looking into this?

Thanks for the report! Hey @erik85, would you be interested in looking into this?
Member

Added subscriber: @erik85

Added subscriber: @erik85
Member

Removed subscriber: @pundr

Removed subscriber: @pundr

This issue was referenced by 174c3ffb4a

This issue was referenced by 174c3ffb4adf29e0a7698aacf9468a820f448770
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Jacques Lucke self-assigned this 2022-05-24 10:21:28 +02: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#98268
No description provided.