[Bf-cycles] Unique socket names?

Brecht Van Lommel brechtvanlommel at pandora.be
Thu Aug 8 21:18:37 CEST 2013


Ok, I'm not opposed to changing it to Shader1 and Shader2. Do you want
to write the version patching or should I do it?

On Thu, Aug 8, 2013 at 6:55 AM, Campbell Barton <ideasman42 at gmail.com> wrote:
> IMHO breaking scripts isn't much an issue for this - any script that
> relies on lookups on non-unique items is asking for problems.
>
> UI - subjective but I don't see it as an issue personally,
> maybe some hidden delimiter could be used "Shader.1", and the UI can
> display as 'Shader' for eg.
>
> Version patching however is a pain, this is a reason against I
> suppose... but an annoying one since this does really make it crappy
> to link up nodes from python :S
>
> On Thu, Aug 8, 2013 at 12:24 AM, Brecht Van Lommel
> <brechtvanlommel at pandora.be> wrote:
>> I like it better in the UI without the 1/2 but can see it's not great
>> for scripting. Changing this will need a version patch and may break
>> existing scripts and forward compatibility, so I'm not sure if it's
>> important enough to change now?
>>
>> On Tue, Aug 6, 2013 at 10:27 PM, Campbell Barton <ideasman42 at gmail.com> wrote:
>>> Hi, recently I've been using python to create a node-tree, and ran
>>> into a limit with socket names.
>>>
>>> The 'Mix' and 'Add' shader nodes have both sockets named 'Shader',
>>> this means Python can't usefully reference them by name,
>>> instead you need to reference them by index which is more fragile
>>> since it may break the script if sockets change order.
>>>
>>> Is there any problem with naming these 'Shader1', 'Shader2' ? --- this
>>> matches Color Mix which is called 'Color1', 'Color2'.
>>>
>>> --
>>> - Campbell
>>> _______________________________________________
>>> Bf-cycles mailing list
>>> Bf-cycles at blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-cycles
>> _______________________________________________
>> Bf-cycles mailing list
>> Bf-cycles at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-cycles
>
>
>
> --
> - Campbell
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles


More information about the Bf-cycles mailing list