Moo-Ack-Productions / MCprep

Blender python addon to increase workflow for creating minecraft renders and animations
https://theduckcow.com/MCprep
GNU General Public License v3.0
287 stars 24 forks source link

Optimize scene "Transmission" not found in blender 4.0 #514

Closed TheDuckCow closed 11 months ago

TheDuckCow commented 11 months ago

The most common error report we have in the current version of MCprep is below, only affected blender 4.0+ users (90 different users have submitted reports). This appears to be only present in v3.5.1 of the addon

Raw report:

File "<addon_path>/prep.py", line 292, in execute\n bpy.ops.mcprep.optimize_scene()\n File "<addon_path>/ops.py", line 109, in __call__\n ret = _op_call(self.idname_py(), kw)\nRuntimeError: Error: Python: Traceback (most recent call last):\n File "<addon_path>/optimize_scene.py", line 325, in execute\n self.is_pricipled(context, mat_type, node)\n File "<addon_path>/optimize_scene.py", line 183, in is_pricipled\n transmission_socket = node.inputs["Transmission"]\nKeyError: 'bpy_prop_collection[key]: key "Transmission" not found'\nLocation: C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\modules\bpy\ops.py:109\n\n

Different associated user messages with this report (quotes):

StandingPadAnimations commented 11 months ago

Hola quiero comunicar este error. Este me paso por que intente hacer una animacion, le di a la opcion el renderizado de siclos de ecenas. y me salto este error

Using my best Spanish translating ability (Texas forces us to take 2 years of learning a language other then English for graduation), though this will be more of a general translation, and will be far from perfect:

Hello, I want to communicate this error. I came across this when I try to make an animation, with the render option "Optimize Cycles Scene", and I get this error

("Siclos" I assume means "Cycles" in this context, from the phrase "siclos de ecenas", which I assume means "Cycles scene")

That out the way, I'm not exactly sure what's going on, but I have been wanting to remove the Cycles optimizer for a while now, for several reasons:

However, I'm open to other ideas regarding how we move forward the optimizer

TheDuckCow commented 11 months ago

Thanks for weighing in. I do agree that unless we have solid benchmarking in place to legitimize the choices made, it does seem a bit arbitrary. That being said, removing in a minor patch would be a bit hasty, so I'd prefer we try and fix whatever this narrow reference bug is, even if the rest of the alog is left the same for this.

StandingPadAnimations commented 11 months ago

Alright, I'll mark the optimizer as deprecated, and slate it for removal in MCprep 3.6

TheDuckCow commented 11 months ago

FYI I'm working on the fix now for this.