Point Density Texture ID User decrement error related to the Object field #52148

Closed
opened 2017-07-22 04:22:50 +02:00 by Vuk Gardašević · 7 comments

System Information
Windows 7, AMD x3 455, R7 360

Blender Version
builds 8009564, db8bc1d

Short description of error
Removing an object causes an ID user decrement error: OBCube.001 (from '[Main]'): 0 <= 0 if a Point Density texture has it referenced in the Object Field

Exact steps for others to reproduce the error
Default Scene > Create a new mesh object > add a Cycles material > Enable use nodes > add a Point Density texture in the Node Editor > select a mesh object in the Object field of the texture node > Delete the chosen object

Doesn't matter if the deleted object itself has the material or not nor the Object field is self referencing (the same object has the material and the Object field references it).

The Cloud Generator add-on has the similar error since it uses the Point Density texture in the "DeGenerate" option upon the scripted removal of the objects.

**System Information** Windows 7, AMD x3 455, R7 360 **Blender Version** builds `8009564`, ` db8bc1d` **Short description of error** Removing an object causes an `ID user decrement error: OBCube.001 (from '[Main]'): 0 <= 0` if a Point Density texture has it referenced in the Object Field **Exact steps for others to reproduce the error** Default Scene > Create a new mesh object > add a Cycles material > Enable use nodes > add a Point Density texture in the Node Editor > select a mesh object in the Object field of the texture node > Delete the chosen object Doesn't matter if the deleted object itself has the material or not nor the Object field is self referencing (the same object has the material and the Object field references it). The *Cloud Generator* add-on has the similar error since it uses the Point Density texture in the "DeGenerate" option upon the scripted removal of the objects.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @VukGardasevic

Added subscriber: @VukGardasevic

Added subscribers: @mont29, @Sergey

Added subscribers: @mont29, @Sergey
Bastien Montagne was assigned by Sergey Sharybin 2017-07-28 11:24:30 +02:00

@mont29, selecting Object in PointDensity node doesn't increase user counter, however removing object will try to reduce user counter from PointDensity node. Also, re-loading file after choosing point density object will increase users of that object.

Not sure what would be a proper solution here: either make selecting object in PointDensity to increase user counter (then how?) or do something more like modifiers where user counter is not increased by target objects?

@mont29, selecting Object in PointDensity node doesn't increase user counter, however removing object will try to reduce user counter from PointDensity node. Also, re-loading file after choosing point density object will increase users of that object. Not sure what would be a proper solution here: either make selecting object in PointDensity to increase user counter (then how?) or do something more like modifiers where user counter is not increased by target objects?

Yuck… yeah, this is really hairy…

We could add exception in libraryquery to not set refcounting flag when DI pointer of a node is an object. This is more consistent with other places where we use Objects (though I really, really dislike that stance of 'no object refcount besides scene instantiation'). But am pretty sure this will not work reliably either, NULL pointer could very easily break things again in that case I guess.

So will rather try to make assigning pointer to Node ID increment usercount, we do it already for others (images etc.) so should not be that difficult ;)

Yuck… yeah, this is really hairy… We could add exception in libraryquery to not set refcounting flag when DI pointer of a node is an object. This is more consistent with other places where we use Objects (though I really, really dislike that stance of 'no object refcount besides scene instantiation'). But am pretty sure this will not work reliably either, NULL pointer could very easily break things again in that case I guess. So will rather try to make assigning pointer to Node ID increment usercount, we do it already for others (images etc.) so should not be that difficult ;)

This issue was referenced by 05f377805b

This issue was referenced by 05f377805bec3b43a78b45662859d085c1c6e6a0

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#52148
No description provided.