Since 2.83, Grease Pencil objects can interact with light sources.
In my tests, it seemed that this only applies to Grease Pencil objects that were created with Blender 2.83?
Is that correct? If not, what do I have to consider?
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.
Sign up to join this communitySince 2.83, Grease Pencil objects can interact with light sources.
In my tests, it seemed that this only applies to Grease Pencil objects that were created with Blender 2.83?
Is that correct? If not, what do I have to consider?
That's correct. The Grease Pencil has been rewritten from scratch and lights are only affecting Grease Pencil Objects created in Blender 2.83.
Quote from the official Blog Post (5. Converting Old Files):
When you load a file, Blender tries its best to convert missing settings/features to their new equivalent (e.g. 2.7 Groups → 2.8 Collections). But sometimes there isn’t a one to one equivalent, especially if the feature has been replaced completely. In the new system, for example, the Light Effect modifier is replaced by light objects, this case needs to be handled manually.
Some new properties/data seems to be missing in the old version of the Grease Pencil Object thus lights can't illuminate the old strokes. However, there is a workaround:
Replace its data-block with the old one (Object Properties > Data-Block dropdown)
Following script does all of that in one go. Select all appended objects and just run the script:
import bpy
C = bpy.context
D = bpy.data
for old_gp_obj in C.selected_objects:
if old_gp_obj.type == 'GPENCIL':
# Create new gp object based on the old data
new_gp_obj = D.objects.new("{}_converted".format(old_gp_obj.name), old_gp_obj.data)
# Copy transforms
new_gp_obj.matrix_world = old_gp_obj.matrix_world.copy()
# Get and link to collection
old_gp_coll = old_gp_obj.users_collection[0]
old_gp_coll.objects.link(new_gp_obj)
# Hide old object in viewport
old_gp_obj.hide_set(True)
Notice that old objects are hidden after running the script.