4
$\begingroup$

I need props in sequencer strips, to store data in each individual strip. One of the prop should link to other strips but:

I can’t make PointerProperty(type=bpy.types.Sequence). I get this error:

TypeError: PointerProperty(...) expected an RNA type derived from ID or ID Property Group
Traceback (most recent call last):
  File "----", line 10, in <module>
  File "----", line 11, in StripSettings
ValueError: bpy_struct "ImageSequence" registration error: fakeinput1 could not register

Test script:

import bpy

#this works
bpy.types.Sequence.prop1 = bpy.props.PointerProperty(type=bpy.types.Scene)

#this not
bpy.types.Sequence.prop2 = bpy.props.PointerProperty(type=bpy.types.Sequence)

Any walkaround?

$\endgroup$
5
  • 2
    $\begingroup$ Sequence is a bpy_struct but not a ID. $\endgroup$
    – lemon
    Sep 23, 2019 at 7:05
  • 1
    $\begingroup$ @lemon and what can i do? $\endgroup$
    – Crantisz
    Sep 23, 2019 at 7:22
  • 1
    $\begingroup$ May be a workaround (?), but if not, the situation is similar for vertex groups (or uv maps or this kind of data). If you create a group, assign it to (say) a modifier, then the modifier stores a string/name only. So that, if you for instance change the group name, the modifier won't be updated. $\endgroup$
    – lemon
    Sep 23, 2019 at 13:07
  • 1
    $\begingroup$ Though, if you want to handle eventual changes, there is this kind of solutions blender.stackexchange.com/questions/953/… (a bit old, but updatable) $\endgroup$
    – lemon
    Sep 23, 2019 at 13:17
  • 1
    $\begingroup$ @lemon in this case I will get allow script execution notice, but i want to make a add-on $\endgroup$
    – Crantisz
    Sep 24, 2019 at 6:40

0

You must log in to answer this question.

Browse other questions tagged .