Page MenuHome

GPencil: "Use Lights" option for adding line art gpencil objects
ClosedPublic

Authored by YimingWu (NicksBest) on May 24 2021, 10:00 AM.

Details

Summary

Does what the title says. Indeed a lot of times we don't want the stroke style being affected by lights, so here's the patch.

Diff Detail

Repository
rB Blender

Event Timeline

YimingWu (NicksBest) requested review of this revision.May 24 2021, 10:00 AM
YimingWu (NicksBest) created this revision.

Actually... I changed the default value for line art use_lights to false to better reflect the usage.

For me is ok this parameter, but I would like to hear the opinion of @Matias Mendiola (mendio) and @Pablo Vazquez (pablovazquez). My concern is to add too many parameters.

source/blender/editors/object/object_add.c
1532

Default must be True

source/blender/editors/object/object_add.c
1436

Here, you only need disable if required. By default the object is added with lights, so to have two times the ON lights code is not good.

if (!use_lights)  {
ob->dtx &= ~OB_USE_GPENCIL_LIGHTS;
      }
YimingWu (NicksBest) marked an inline comment as done.May 24 2021, 11:11 AM
YimingWu (NicksBest) added inline comments.
source/blender/editors/object/object_add.c
1532

This is only effective for adding line art object not everything else. I think it's fair to set it false?

source/blender/editors/object/object_add.c
1532

And why this object must be different? I'm not a fan to have different settings for LineArt objects.

source/blender/editors/object/object_add.c
1532

Humm... maybe the strokes aren't meant by styled by light in almost all use cases, and because the normal data will not be as desired anyway.

source/blender/editors/object/object_add.c
1532

@YimingWu (NicksBest) I have talked with Pablo and Matias and both agree to have different default settings for LineArt, so you can set Lights=OFF for LineArt by default. You can commit to master

Note: Remember to update release notes page (https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Grease_Pencil)

This revision is now accepted and ready to land.May 25 2021, 4:31 PM