Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node_group causes error "scene not defined" [bl4.3] #144

Open
schroef opened this issue Feb 21, 2025 · 4 comments
Open

Node_group causes error "scene not defined" [bl4.3] #144

schroef opened this issue Feb 21, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@schroef
Copy link

schroef commented Feb 21, 2025

Operating system: Windows-10-10.0.26120-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1660 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 572.16

Broken: version: 4.3.0 Beta, branch: blender-v4.3-release, commit date: 2024-10-05 17:20, hash: e82ce39e17f2
Worked: (newest version of Blender that worked as expected)

Describe the bug
I have this NodeGroup which i simply exported as first test/. I wanted to see how your code would handle sub-panel in a nodegroup. The code for this is very limited, but your addon know how to find it somehow
The bug is that name scene is not defined is rather strange.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Compositor
  2. Use all defaults
  3. Select Compositor To Python
  4. Select "Scene" drop 1
  5. Select NG from 2nd dropdown
  6. Copy/pasting code into blank new file causes above error

Expected behavior
Scene should be defined and its rather stranger something simple as that causes an error

@schroef schroef added the bug Something isn't working label Feb 21, 2025
@schroef
Copy link
Author

schroef commented Feb 21, 2025

The issue is, when you use node_groups from the compositor. the code says is_scene = false. But that way, scene is not defined in the code

At least, thats what i think it is
Image
Image
Image
Image

@schroef
Copy link
Author

schroef commented Feb 21, 2025

When i tried adding code shown below, see image 3
The export did work without causing an error. I do not know if this causes issues with the other methods. This is just me quickly trying toi fix it`

if self._mode == 'SCRIPT':
            self._create_scene(0)

@schroef
Copy link
Author

schroef commented Feb 21, 2025

PS is it normal when i run the code multiple times that it adds all the same group inputs again?
I thought it would actually also create the nodegroup it self. it only creates the group_input and group_output but not the actual group

Image

@schroef
Copy link
Author

schroef commented Feb 21, 2025

It also doesnt seem to understand the order correctly

original order of in and outpurs
Image

recreated group

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant