Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Custom Prop names have length limit #19

Open
tsvilans opened this issue Oct 1, 2020 · 0 comments
Open

Custom Prop names have length limit #19

tsvilans opened this issue Oct 1, 2020 · 0 comments

Comments

@tsvilans
Copy link
Collaborator

tsvilans commented Oct 1, 2020

Best solution would be to not flatten nested dictionaries by prepending parent key names, and instead actually just use nested dictionaries.

ID prop group filtering and access can be done like this:

import bpy, idprop

cube = bpy.data.objects['Cube']
d = cube.get('tommy') # d is also a IDPropertyGroup, since it is assigned as a dict

for i in d.items():
    print(i)
    if isinstance(i[1], idprop.types.IDPropertyGroup):
        print(i[1].__class__)

Results in:

('this', 'that') <-- 'that' is a normal string
('numbers', 100) <-- 100 is a normal integer
('doodeedoo', <bpy id prop: owner="OBCube", name="doodeedoo", address=0x000001A6CFD9BF48>)
<class 'IDPropertyGroup'>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant