Page MenuHome

Freestyle: Linestyle presets
Needs RevisionPublic

Authored by Iyad Ahmed (iyadahmed2001) on Feb 23 2021, 7:18 PM.

Details

Summary

Suggested and funded by BNPR, this patch adds a collection of linestyle presets

Brush

Doodle

Generic Tapered

Invisible Lines

Noisy

Pen

Pencil

Thick Joins

Diff Detail

Repository
rB Blender

Event Timeline

Aaron Carlisle (Blendify) requested changes to this revision.Feb 23 2021, 7:36 PM

This is missing the ability to add new presets, see release/scripts/startup/bl_operators/presets.py and preset_add_operator

This revision now requires changes to proceed.Feb 23 2021, 7:36 PM
release/scripts/presets/linestyle/Thick_Joins.py
4

The name here I think could be better, "Thick Vertices" is technically more correct.

Was looking into the comments about adding presets, I don't know if this is possible with the complexity of modifiers.

Was looking into the comments about adding presets, I don't know if this is possible with the complexity of modifiers.

perhaps we could leave this ability for now, the presets serve as examples and starting points

Iyad Ahmed (iyadahmed2001) marked an inline comment as done.

Rename Thick Joins to Thick Vertices

Was looking into the comments about adding presets, I don't know if this is possible with the complexity of modifiers.

I thought about a solution for this, presets could be loaded from and saved to a blend file, if it is worth to add the ability for use to add presets I could try out this idea

I think sticking with the current solution is best for now.

This revision is now accepted and ready to land.Feb 23 2021, 10:23 PM

I think sticking with the current solution is best for now.

Ok great, we can always add it in future

According to the module wiki, Render & Cycles is responsible for Freestyle nowadays.

The most problematic thing I see is that adding a presets adds a new linestyle data-block. Presets should only modify settings, not add data - at least if we follow existing conventions. Couldn't the preset just modify the current data-block instead?

Brecht Van Lommel (brecht) requested changes to this revision.Feb 25 2021, 3:11 PM

Right, adding new datablocks is not the way other presets work, that should be avoided.

This revision now requires changes to proceed.Feb 25 2021, 3:11 PM

Right, adding new datablocks is not the way other presets work, that should be avoided.

Yes, but there's problem if user already changed settings or even chose a preset,
then choosing a preset will not give desired preset results ...
as the presets don't override all settings, and it would be redundant if it did IMHO

Presets modify active linestyle and no longer creates new data-blocks

Brecht Van Lommel (brecht) requested changes to this revision.Mar 8 2021, 2:12 PM

Switching between presets does not work well with this change.

  • More and more modifiers are added, it should clear existing ones (and I guess re-add the default Samplig modifier).
  • All preset should modify the same properties like chaining, use_same_object, alpha, ... . Where they are not set now they should set the default value.
This revision now requires changes to proceed.Mar 8 2021, 2:12 PM

Switching between presets does not work well with this change.

  • More and more modifiers are added, it should clear existing ones (and I guess re-add the default Samplig modifier).
  • All preset should modify the same properties like chaining, use_same_object, alpha, ... . Where they are not set now they should set the default value.

Indeed this is the issue I tried to solve before by creating a new data block, will try to reset settings instead