This diff includes:
- CPU calculation of feature lines.
- Line Art Grease Pencil modifier.
- Other related configurations in Object/Collection/Material etc.
Below are the detailed description of locations in each of the changes.
Line Art core
Mainly in editors/lineart/.
- lineart_cpu.c All the calculation stuff are here.
- lineart_chain.c Feature line chaining functions.
- lineart_util.c Own utilities with memory, list and math.
- lineart_ops.c Operators related to baking.
Other related changes mainly includes data refreshing.
- render_update.c Trigger update on new render, both viewport and F12 render.
- MOD_gpencillineart.c Trigger update when Line Art modifier calls.
- rna_scene.c rna_material.c rna_object.c Consists of line art data api, also includes the callback for refreshing line art data.
- object_update.c have changes to allow calculating CD_MASK_FREESTYLE_* in the viewport to be able to see line art result for edge/face marks.
UI changes
Line Art can now be accessed in a form of GPencil modifier, with global settings in the render panel. To create line art quickly, just add a Line Art GPencil object in the menu.
Master configurations are under Render panel, see properties_render.py
Line Art is drawn using the GPencil modifier, here's the UI:
Additionally, to further control line generation, Line Art has panels in Object and Material tab as well. properties_object.py properties_material.py
There's also a collection tab where you can set line art properties per collection. ( For this tab I don't find other place that is suitable for putting it)
Line Art uses Freestyle's edge/face mark data as well. So when Freestyle is disabled from compiling, its marking operators are still shown. In the future we may want to change it to something else but for the moment it's good enough.
Grease Pencil related changes
Mainly the modifier. See MOD_gpencillineart.c, DNA_gpencil_modifier_types.h
The patch for distance based fading effect in modifier is in another path (D9091)
Other related stuff
- ratiof() and ratiod() functions added into math_base_inline.c, this are the reverse functions of interpf() and interpd()
- Added collection->object_cache_instanced for being able to select object instances from a linked scene.
- Added a WITH_LINEART compiler option in cmake files and bpy_app_build_options.c.
Some extra UI thoughts
Line Art module's arguments are not immediately obvious in some sense. I have already updated the UI for a more clear categorization so some arguments like "crease threshold" will probably make more sense under "crease enable" switch.
I'm also thinking about if I could use some "mode" concept, for different uses of line art module, like rendering anime girls or doing technical illustrations will have different arguments shown to the user that make most sense. For example, rendering subdiv model may require smooth lines, thus chaining configurations needs to be prominent, but for technical stuff, transparency settings is of higher priority. If we have "modes" for the UI, then it may make the module easier to use to some extent?
I don't think this is a really good solution, because it will involve an extra abstraction layer, but having a UI-level mode may worth considering. I tend to use a fixed UI logic but it's just the arguments may not make much sense in different contexts.
Would like to have some input from the UI team :D @Julian Eisel (Severin) @Matias Mendiola (mendio)







