Error Message When Submitting A Comp Job

Post Reply
SteffenD
Posts: 20
Joined: Fri Oct 13, 2017 12:15 pm

Error Message When Submitting A Comp Job

Post by SteffenD »

Hi there,

I know that Blender 2.8x support is more than "official" at the moment, but I didn't have any problem so far.
Now when I try to submit a job containing only a compositing node tree (not using the Render Layer node but Image Sequence nodes from disk as sources) I get the following error:

Code: Select all

Traceback (most recent call last):
  File "C:\Users\Steffen.VR\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\cgru\operators.py", line 114, in execute
    layers = utils.layers_get(active_scene)
  File "C:\Users\Steffen.VR\AppData\Roaming\Blender Foundation\Blender\2.82\scripts\addons\cgru\utils.py", line 39, in layers_get
    obj_colls = object.users_collection # get all collections object is in
AttributeError: 'NoneType' object has no attribute 'users_collection'

location: <unknown location>:-1
Someone have an idea how to solve this?

Cheers
Steffen
SteffenD
Posts: 20
Joined: Fri Oct 13, 2017 12:15 pm

Re: Error Message When Submitting A Comp Job

Post by SteffenD »

OK, shortly after I posted here I found a super simple and super stupid solution:
The comp scene didn't contain any objects / cameras / lights in the Outliner. As soon as I added a useless cube (which isn't even rendered because I'm not using a Render Layers node) I was able to successfully submit and render my scene ;)
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Error Message When Submitting A Comp Job

Post by timurhai »

Hi.
How are you submitting scenes from 2.8?
CGRU 2.3.1 has no Blender 2.8 support, as they completely rewrote Python API since 2.8.
What submission plug-in have you used?
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
SteffenD
Posts: 20
Joined: Fri Oct 13, 2017 12:15 pm

Re: Error Message When Submitting A Comp Job

Post by SteffenD »

I'm using the submitter from the other thread here: viewtopic.php?p=4406#p4406

Working fine so far (but would be nice if it was integrated in the next version of Afanasy).
SteffenD
Posts: 20
Joined: Fri Oct 13, 2017 12:15 pm

Re: Error Message When Submitting A Comp Job

Post by SteffenD »

BTW this same thing is still happening in Blender 3.x when trying to submit a scene with an empty "Scene Collection".

Code: Select all

>>> active_scene = bpy.context.active_object
>>> print (active_scene)
None
As soon as I add e.g. an empty I get the following

Code: Select all

>>> active_scene = bpy.context.active_object
>>> print (active_scene)
<bpy_struct, Object("Empty") at 0x7eff7dc64608>
I guess this is causing the error we see in the first post in this thread because there is no "active scene" (whatever that has to do with an empty collection)?

From the manual:
bpy.context.object or bpy.context.active_object
Will give you access to the active object in the 3D Viewport.
So, if there is no "active object", the result will be "None" and the script will fail, right?

Funny enough, if there's any object in the Outliner, the script will run. BUT if you e.g. have one object inside a collection and then deactivate and reactivate this collection (the checkbox next to the collection), the object is still not counted as "active" and the script will fail, too.
Post Reply