Bpy/Python is letting create inputs at the node level for node groups that make blend file unsaveable #62732

Closed
opened 2019-03-19 04:36:56 +01:00 by iszotic · 9 comments

System Information
Operating system: Linux-4.15.0-46-generic-x86_64-with-Ubuntu-18.04-bionic 64 Bits
Graphics card: Radeon RX Vega ATI Technologies Inc. 4.5.13542 Core Profile Context 18.50.1.418

Blender Version
Broken: version: 2.80 (sub 49)
Worked: Create the inputs at the node_tree level
Short description of error
bpy is letting create inputs at the node level for node groups that make blend file unsaveable by crashing blender saving.

Exact steps for others to reproduce the error

  1. Go to compositor view
  2. Create a group by adding a Mix node and then group it
  3. Execute this line in the python console
  1. the node now has a new input, but then entering the group the new input is not there
  2. save, here it crashes and it doesn't save the file.

The blend file is in step 2)
{F6847403}

**System Information** Operating system: Linux-4.15.0-46-generic-x86_64-with-Ubuntu-18.04-bionic 64 Bits Graphics card: Radeon RX Vega ATI Technologies Inc. 4.5.13542 Core Profile Context 18.50.1.418 **Blender Version** Broken: version: 2.80 (sub 49) Worked: Create the inputs at the node_tree level **Short description of error** bpy is letting create inputs at the node level for node groups that make blend file unsaveable by crashing blender saving. **Exact steps for others to reproduce the error** 1) Go to compositor view 2) Create a group by adding a Mix node and then group it 3) Execute this line in the python console ```bpy.context.scene.node_tree.nodes['Group'].inputs.new('NodeSocketColor','stuff') ``` 4) the node now has a new input, but then entering the group the new input is not there 5) save, here it crashes and it doesn't save the file. The blend file is in step 2) {F6847403}
Author

Added subscriber: @iszotic

Added subscriber: @iszotic

Added subscriber: @mont29

Added subscriber: @mont29

Confirmed, bpy.context.scene.node_tree.nodes['Group'].node_tree.inputs.new('NodeSocketColor','stuff') is working as expected (the direct access from Group node's inputs should be a shortcut to that one I think, or not allow this operation at all, checking code…)

Confirmed, `bpy.context.scene.node_tree.nodes['Group'].node_tree.inputs.new('NodeSocketColor','stuff')` is working as expected (the direct access from Group node's inputs should be a shortcut to that one I think, or not allow this operation at all, checking code…)
Bastien Montagne self-assigned this 2019-03-19 14:23:16 +01:00
Member

Added subscribers: @brecht, @JacquesLucke

Added subscribers: @brecht, @JacquesLucke
Member

I'm pretty sure that this is not supposed to work.
I actually don't know the API to add sockets to groups, but I guess it has to be done "from the inside".

I'm pretty sure that this is not supposed to work. I actually don't know the API to add sockets to groups, but I guess it has to be done "from the inside".

@JacquesLucke I think this is fairly easy to add (just call the function adding sockets to group's nodetree instead in RNA code), trying it currently…

@JacquesLucke I think this is fairly easy to add (just call the function adding sockets to group's nodetree instead in RNA code), trying it currently…

This issue was referenced by blender/blender@e8777a7290

This issue was referenced by blender/blender@e8777a729013d04dcb854b0b9f327e9b90191747
Member

It's nice to hear you say that something is easy, related to node trees haha

It's nice to hear you say that something is easy, related to node trees haha

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 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-addons#62732
No description provided.