Page 1 of 1

Error Message When Submitting A Comp Job

Posted: Tue Jan 07, 2020 10:39 am
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

Re: Error Message When Submitting A Comp Job

Posted: Tue Jan 07, 2020 10:58 am
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 ;)

Re: Error Message When Submitting A Comp Job

Posted: Thu Jan 09, 2020 11:12 am
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?

Re: Error Message When Submitting A Comp Job

Posted: Tue Jan 14, 2020 10:53 am
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).

Re: Error Message When Submitting A Comp Job

Posted: Fri Jun 17, 2022 9:24 am
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.