Age | Commit message (Collapse) | Author |
|
BKE_get_linestyle_from_scene().
|
|
Now the shader node tree of a line style ID datablock is used to define textures
as well as their mapping and influence.
TODO: Textures alpha channel mapping and influence.
TODO: Blend mode in the Output Line Style shader node.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Goodbye VC2008, it has been a pleasure (more or less) :D SCons / CMake cleaenup will follow.
Differential Revision: https://developer.blender.org/D715
|
|
|
|
In addition to D319, this patch updates the parameter editor, the UI of Freestyle.
Using new API functionality and experience gained in making D319, this patch
provides a quite noticable speedup for commonly-used Freestyle linestyle modifiers.
As this patch touches a lot of code (and mainly the foundations) it is likely that
mistakes are made. The patch has been tested with a regression suite for Freestyle
(https://github.com/folkertdev/freestyle-regression-tests/tree/master), but testing
with scenes used in production is very much appreciated.
Differential revision: https://developer.blender.org/D623
Author: flokkievids (Folkert de Vries)
Reviewed by: kjym3 (Tamito Kajiyama)
|
|
in the file loader.
Previously the imported mesh data were transformed by a local-to-world projection matrix
through NodeTransform. Now that the file loader assumes the imported mesh data already
in the camera coordinate system, an indentity matrix was supplied to NodeTransform.
The present commit avoids this redundant matrix operation by using NodeGroup instead of
NodeTransform, recalling the latter is a subclass of the former with extra matrix computations.
|
|
|
|
|
|
freestyle.types.StrokeVertexIterator.
|
|
New properties 'line_color' and 'line_priority' are added to Material ID data blocks.
The 'line_color' property allows users to specify a per-material line color that can be
used as a Freestyle line color through Material color modifiers of line style settings.
The new line color property is intended to provide a solution for line color
stylization when a proper Freestyle support for Cycles is implemented (likely
as part of the upcoming Blender 2.72 release; see Patch D632). Materials in
Cycles are usually set up using shader nodes, and Freestyle won't be capable
of retrieving colors and other properties from node-based materials any soon.
The new line color property of materials addresses this foreseen limitation by
providing artists with an intuitive alternative mean to specify line colors on a
per-material basis independently from node trees.
The 'line_priority' property gives users a way to control line colors at material
boundaries. When a line is drawn along a feature edge at material boundaries,
one of the two materials on both sides of the edge has to be picked up to
determine the line color. So far there was no way to control this selection
(which was in effect at random). Now the material with a higher line color
priority will be selected.
The new per-material line settings are shown in the new Freestyle Line tab in
the Material context of the Properties window (only when Freestyle is enabled).
|
|
|
|
The cause of the crash was identified in an uninitialized member variable
`Main->lock`. Now that struct Main has a few member variables whose
values are dynamically allocated, per-render Freestyle-specific Main data
structures will be allocated and released using `BKE_main_new()` and
`BKE_main_free()`, respectively.
This revision complements the commit rB6135556f4556.
|
|
|
|
Constant crashes under Linux seem due to an uninitialized variable.
|
|
Problem report by Light BWK through personal communications, thanks!
|
|
|
|
|
|
Patch contribution by flokkievids (Folkert de Vries). Thanks!
|
|
Patch contribution by flokkievids (Folkert de Vries). Thanks!
|
|
|
|
Currently resolution divider is not exposed to the
interface yet, and i'm not even sure it needs to be
exposed because it's somewhat weird configuration.
Need to check how often artists are changing start
resolution in Cycles.
Pretty much straightforward implementation with the
only weak part: render result is getting re-allocated
and upscaled when current resolution is finished.
Not sure how to make it faster actually. Maybe it's
just a matter of making upscale fast enough.
Needed to fix some possible memory leak happening
in Freestyle when canceling rendering on a special
stage -- it was missing temp bmain free,
Reviewers: campbellbarton, dingto
CC: sebastian_k, fsiddi, venomgfx
Differential Revision: https://developer.blender.org/D609
|
|
WOEdge::GetVec().
|
|
|
|
This revision extends the Freestyle Python API to make for style module writing
easier.
- freestyle.types.Stroke: A proper support for reversed() is implemented. It
works the same with other Python sequence objects (returns an iterator starting
from the end). This is in effect equivalent to Stroke.stroke_vertices_end().
- freestyle.types.StrokeVertexIterator: An incremented, decremented and reversed
method are added. The first two methods return a new StrokeVertexIterator
object that has been incremented and decremented, respectively. The reversed
method returns a new StrokeVertexIterator object that will traverse stroke
vertices in the opposite direction.
- freestyle.types.Interface0DIterator: Its constructor now accepts a Stroke
object to create an Interface0DIterator that traverses stroke vertices. This is
in effect equivalent to Stroke.vertices_begin(). The new API makes stroke
shaders involving function calls much simpler as illustrated below:
# in the old API
it = stroke.stroke_vertices_begin()
for vert in it:
result = somefunc(Interface0DIterator(it))
# in the new API
it = Interface0DIterator(stroke)
for vert in it:
result = somefunc(it)
Differential Revision: https://developer.blender.org/D545
Reviewers: kjym3
|
|
|
|
count.
Changes were made in Stroke::Resample(int) in C++ to prevent a potential infinite loop
caused by an inconsistency between Stroke::_Length and the stroke length computed
based on stroke vertices. Such a stroke length inconsistency is usually caused by missing
calls of Stroke::UpdateLength() (i.e., API implementation bugs), but also may occur due
to scripting errors in user-defined style modules. This commit is meant to help script
writters to identify the latter error cases. Now Stroke.resample(int) may raise a runtime
error to signal an error condition.
|
|
- Fixed a typo in docstring.
- Replaced int with boolean constants.
- Updated lists of base classes for used-defined unary 0D/1D functions.
|
|
|
|
hidden lines.
This commit is intended to fully fix the problem described in
https://developer.blender.org/T36425#19 (see also the previous commit rB08528f577dcb).
Addition of a small offset (to avoid singularity in stroke rendering due to overlapping vertices)
was not performed for all overlapping vertices.
Removed the StrokeCleaner and related helper functions which were added as a
temporary workaround in rB2a5b6d9c8f16.
|
|
directions at TVertices.
A description of the problem is found in https://developer.blender.org/T36425#19 .
The cause of the issue was identified as roudning errors in Operators::createStroke() due
to insufficient numerical precision. Precision promotion from float to double was done in
the return values of getPoint3D/2D methods in Interface0D and its subclasses in C++
(data members stored in the 0D classes have already been in double precision).
|
|
The scene file provided by the problem report has many degenerate faces coming from
a particle system. These zero-area faces were not expected in the ray-casting line visibility
algorithms of Freestyle. Now degenerate faces are properly excluded from the imported
mesh data and not fed to the line visibility algorithms.
|
|
SilhouetteGeomEngine.
|
|
|
|
The Z component of the projected point in the 2D image space has already been normalized
in GeomUtils::fromWorldToImage().
|
|
TODO: Fix for Z normalization in SilhouetteGeomEngine methods.
|
|
|
|
None when it is supposed to return an empty list.
|
|
raised concern.
|
|
normals.
The code was found helpful while addressing T39669 and might help solving similar
issues related to face normals in the future.
|
|
|
|
Patch contribution by Paolo Acampora. Thank you!
|
|
deleting a line set.
|
|
FRS_delete_active_lineset().
|