Custom property settings not preserved when changing its type #91256

Closed
opened 2021-09-08 12:10:27 +02:00 by Demeter Dzadik · 10 comments
Member

Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-09-07 23:23, hash: 7beb4a0e0a

Exact steps for others to reproduce the error

  • Add integer property to default cube with a custom min/max/default value, and Is Library Overridable enabled.
    image.png
  • C.object['prop'] = 2.0
  • The property's settings are all lost.
    image.png

IIRC, before the refactor, an integer property could have floats as its min/max so this would be allowed. Might be a bit of a pain point with the new system, but I think doing a best effort conversion between types would be nice when possible (even if some data is lost going from float to int, losing some data is better than losing all data).

#91256-2021-09-08_12.54.49.mp4

Test File:
#91256.blend

**Blender Version** Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-09-07 23:23, hash: `7beb4a0e0a` **Exact steps for others to reproduce the error** - Add integer property to default cube with a custom min/max/default value, and Is Library Overridable enabled. ![image.png](https://archive.blender.org/developer/F10385321/image.png) - `C.object['prop'] = 2.0` - The property's settings are all lost. ![image.png](https://archive.blender.org/developer/F10385350/image.png) IIRC, before the refactor, an integer property could have floats as its min/max so this would be allowed. Might be a bit of a pain point with the new system, but I think doing a best effort conversion between types would be nice when possible (even if some data is lost going from float to int, losing some data is better than losing all data). [#91256-2021-09-08_12.54.49.mp4](https://archive.blender.org/developer/F10385458/T91256-2021-09-08_12.54.49.mp4) Test File: [#91256.blend](https://archive.blender.org/developer/F10386343/T91256.blend)
Author
Member

Added subscriber: @Mets

Added subscriber: @Mets
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Broken: version: 3.0.0 Alpha, branch: studio-sprite-fright

Hi @Mets , I am not able to reproduce this on master branch: 7beb4a0e0a49fdee3c4b98bcf9287ab72aaebda5.
May be this happens only on studio-sprite-fright branch?

> Broken: version: 3.0.0 Alpha, branch: studio-sprite-fright Hi @Mets , I am not able to reproduce this on master branch: `7beb4a0e0a49fdee3c4b98bcf9287ab72aaebda5`. May be this happens only on `studio-sprite-fright` branch?
Author
Member

Yep, probably, I suspect somehow our "critical fixes only" branch got branched off just before a bunch of critical fixes got into master, lol. I poked Hans in DM's with the same theory, it's probably gonna be a matter of just pushing a few commits from master to the sprites branch, I hope.

Yep, probably, I suspect somehow our "critical fixes only" branch got branched off just before a bunch of critical fixes got into master, lol. I poked Hans in DM's with the same theory, it's probably gonna be a matter of just pushing a few commits from master to the sprites branch, I hope.
Author
Member

I could reproduce it on the latest master from the buildbot though! #91256-2021-09-08_12.54.49.mp4

I could reproduce it on the latest master from the buildbot though! [#91256-2021-09-08_12.54.49.mp4](https://archive.blender.org/developer/F10385458/T91256-2021-09-08_12.54.49.mp4)
Member

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

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

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

Thanks for the report. Working with the existing custom property operator was becoming problematic, so I refactored it to have a type drop-down and included the changes you suggest here in that WIP patch: D12435

Thanks for the report. Working with the existing custom property operator was becoming problematic, so I refactored it to have a type drop-down and included the changes you suggest here in that WIP patch: [D12435](https://archive.blender.org/developer/D12435)

This issue was referenced by bf948b2cef

This issue was referenced by bf948b2cef3ba340a6bba5e7bd7f4911c9a9275a
Philipp Oeser removed the
Interest
Python API
label 2023-02-10 09:04:30 +01:00
Member

Seems Library Overridable is kept now, but limits as well as description is still lost...

Seems `Library Overridable` is kept now, but `limits` as well as `description` is still lost...
Hans Goudey self-assigned this 2023-03-27 03:58:03 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-03-12 15:50:29 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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 & 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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#91256
No description provided.