Shaamallow / texture-diffusion

A blender add-on to use diffusion models for texture generation
GNU Affero General Public License v3.0
40 stars 0 forks source link

A “key ‘ViewLayer’ not found'” error occurs. #12

Open umiyuki opened 1 day ago

umiyuki commented 1 day ago

Windows 10, using Blender 4.2.2. When I press the Generate button to generate an image, I get the following error In my environment, the default view layer is named “View Layer” (with spaces), and if I rename it to “ViewLayer” (without spaces), the error disappears.

Error code 諠・ア: Camera 1 has been setup and aligned to view 繧ィ繝ゥ繝シ: Python: Traceback (most recent call last): File "C:\Users\test\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\user_default\blender_texture_diffusion\src\operators\generation_operators.py", line 527, in execute bpy.ops.diffusion.render_depth(uuid=generation_uuid) File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py", line 109, in __call__ ret = _op_call(self.idname_py(), kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: 繧ィ繝ゥ繝シ: Python: Traceback (most recent call last): File "C:\Users\test\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\user_default\blender_texture_diffusion\src\operators\image_render_operators.py", line 113, in execute bpy.context.scene.view_layers["ViewLayer"].use_pass_z = True ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ KeyError: 'bpy_prop_collection[key]: key "ViewLayer" not found' 菴咲スョ・咾:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py:109
Shaamallow commented 13 hours ago

Thank you for noticing that. I'll try to access it differently then