[Bf-committers] Bug CompositorNodeDilateErode

Lukas Tönne lukas.toenne at gmail.com
Sun Jan 6 10:53:32 CET 2013


In python this would be possible, but the "type" property is not just
python, it's an RNA property which does not support this kind of
overriding :/

Yes, solution would be to rename the property to e.g. "mode" or
"operation" (this is what other node types such as math node use).

makesrna has rudimentary checks for identifier collisions, but only
for properties in the exact same type, not for base type properties
(in RNA_def_property, rna_define.c line 922, commented as TODO). Would
be nice to also have this work outside makesrna for runtime RNA
additions (bpy.props from python), but not sure if this could cause
critical delays ...

On Sat, Jan 5, 2013 at 10:09 PM, Dan Eicher <dan at trollwerks.org> wrote:
> On Sat, Jan 5, 2013 at 12:06 PM, Sergey Sharybin <sergey.vfx at gmail.com>wrote:
>
>> Hrm, this is pretty nasty issue -- dilate node has got own type which
>> overrided base node's type. This indeed need to be solved, but afraid it'll
>> break some scripts.
>>
>> What's also interesting for me here -- is it more like a feature or
>> makesrna should notify about such kind of conflicts?
>>
>
> That's just regular python isn't it? If you redefine a property in a
> subclass then you'd have to use super().type to get at the base class
> property.
>
> The most obvious solution is to rename CompositorNodeDilateErode.type to
> something that describes it like 'foo_type'.
>
> Dan
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers


More information about the Bf-committers mailing list