Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-07-24A follow-up to Patch D623: minor code updates and style cleanup.Tamito Kajiyama
2014-07-24Freestyle Python API: Updates and speedups for the parameter editorTamito Kajiyama
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)
2014-07-07Per-material line color settings for Freestyle.Tamito Kajiyama
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).
2014-06-24Freestyle: Fix for a couple of missing names in ↵Tamito Kajiyama
freestyle.chainingiterators.__all__.
2014-06-24D319: Freestyle Python scripts update.Tamito Kajiyama
This revision is meant to update Freestyle's Python scripts to make full usage of the new features of Python and Freestyle's Python API. Freestyle's Python scripts are pretty old already, and were never given much attention. With the 2.7x generation of Blender coming up, this is an excellent time to update Freestyle's Python scripts, hopefully adding some new features and achieving some speed improvements on the way. Main goals: * use for loops where possible * general cleanup, making use of more recent python features (generators, ternary operator, ect.) * update the documentation on the way (it's lacking atm) Differential revision: https://developer.blender.org/D319 Author: flokkievids (Folkert de Vries) Reviewed by: kjym3 (Tamito Kajiyama)
2014-06-05Freestyle: Fix for a wrong formula used for RGB to grayscale conversion.Tamito Kajiyama
This bug fix is likely to affect the visual results of existing Freestyle setups using the Material color/alpha/thickness modifiers with the 'material_attribute' parameter set to either 'Diffuse' (default) or 'Specular', and also the Ramp option enabled in the case of the Material color modifier.
2014-05-26Fix for thinning strokes at intersections between visible and background ↵Tamito Kajiyama
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.
2014-05-21Fix for a regression in rBe84732858590.Tamito Kajiyama
2014-05-09Freestyle: Fix for dashed lines when applied to invisible stroke segments.Tamito Kajiyama
Dashed lines were resetting stroke segment visibility by mistake (making invisible segments visible, for example when applied to the results of square blueprint geometry modifier).
2014-05-06Freestyle: minor code clean-up.Tamito Kajiyama
2014-05-03Patch D246: Texture Marks for freestyle strokes, written and contributed by ↵Tamito Kajiyama
Paolo Acampora. Reviewers: brecht, kjym3, #freestyle Reviewed By: brecht, kjym3 Differential Revision: https://developer.blender.org/D246
2014-04-18Freestyle: New options for sorting to arrange the stacking order of lines.Tamito Kajiyama
Line styles now have a set of new options for rearranging the stacking order of lines. This gives artists more control to determine which lines should be drawn on top of others. Two available sort keys are the distance from camera and curvilinear 2D length. Since the distance of a line from camera may vary over vertices, another option called integration type is used to compute the sort key for a line from the values computed at individual vertices. Available integration types are MEAN, MIN, MAX, FIRST and LAST (see the tool tips for more detail).
2014-04-18Freestyle: Added logical operators for binary predicates for 1D elements.Tamito Kajiyama
The implemented operators are: freestyle.predicates.AndBP1D freestyle.predicates.NotBP1D freestyle.predicates.OrBP1D
2014-04-18Freestyle: Fix ImportError in anisotropic_diffusion.pyIRIE Shinsuke
2014-04-17Revised freestyle.predicates.pyZBP1D so that the constructor accepts an ↵Tamito Kajiyama
integration type.
2014-04-11Fix for Sinus Displacement and 2D Offset stroke geometry modifiers.Tamito Kajiyama
These modifiers were not working properly when they were applied to strokes whose backbone was already modified by other geometry shaders. This problem was due to the use of Normal2DF0D that compute 2D vertex normals based on the underlying FEdges up on which initial stroke geometry is defined. Now vertex normals are computed on the basis of modified stroke vertices. A helper function 'stroke_normal' for computing normals of stroke vertices was added to the 'freestyle.utils' API module.
2014-02-12Freestyle: Fix for chaining operators not concatenating edges with Freestyle ↵Tamito Kajiyama
edge marks and at material boundaries. Problem report by Postoman on the BlenderArtists.org Freestyle thread, thanks a lot!
2014-01-28Code cleanup: pep8Campbell Barton
2014-01-28Fix for a typo reported by flokkievids through code review comments D163#1.Tamito Kajiyama
2014-01-28Moved the Operators class from the 'freestyle' module to the ↵Tamito Kajiyama
'freestyle.types' submodule.
2014-01-28Patch set by Folkert Vries (flokkievids) with respect to T37565-patch-v1.zip ↵Tamito Kajiyama
(F32402). Applied with minor modifications.
2014-01-28Fix for a missing submodule in the top-level 'freestyle' module package.Tamito Kajiyama
Reported by flokkievids, thanks!
2014-01-28Updated Freestyle API modules according to the new hierarchical package ↵Tamito Kajiyama
structure. Additional bug fixes were also done along with the code updates: * Fix for the use of old Interface1D.pointsBegin() and .pointsEnd() method names in the definition of pyDensityAnisotropyF1D and pyViewMapGradientNormF1D. * Fix for wrong data types (int instead of bool) for: - pyChainSilhouetteGenericIterator constructor and its .orientation property in modules/freestyle/chainingiterators.py. - SpatialNoiseShader constructor in styles/external_contour_sketchy.py. - ChainSilhouetteIterator constructor in styles/multiple_parameterization.py.
2014-01-28Reorganized the Freestyle Python API in a hierarchical package structure.Tamito Kajiyama
Both C- and Python-coded API components were rearranged into logical groups. New Python modules are packaged as follows: freestyle - Top-level package freestyle.types - Classes for core data structues (e.g., view map) freestyle.chainingiterators - Pre-defined chaining iterators freestyle.functions - Pre-defined 0D and 1D functions freestyle.predicates - Pre-defined 0D and 1D predicates freestyle.shaders - Pre-defined stroke shaders freestyle.utils - Utility functions The Python modules are installed in scripts/freestyle/modules. Pre-defined styles are installed in scripts/freestyle/styles. To-do: update styles according to the new Freestyle API package structure.
2013-12-06Removed unused Freestyle env_map images.Tamito Kajiyama
2013-10-13Fix for a bug in StrokeCleaner identified through a discussion for Bug ↵Tamito Kajiyama
#36425 (freestyle edge marks not working). Many thanks for Anthony Edlin who helped fix the issue.
2013-09-27Fix for Freestyle hang up in stroke rendering, due to missing update of 2D ↵Tamito Kajiyama
stroke length in StorkeCleaner. Problem report by Light BWK through personal communications, thanks!
2013-09-26Freestyle: remove a bunch of debug prints in the python code, these are ↵Brecht Van Lommel
confusing and don't give any meaningful info to users.
2013-08-30Fix for [#36599] Freestyle: Line thickness modifier with certain blend types ↵Tamito Kajiyama
incorrectly calculated. The inner/outer thickness values were separately blended by Multiply, Divide and other binary operators, which resulted in the wrong thickness values reported in the issue. The operations must be applied to the sum of the inner and outer thickness values. Also the Minimum and Maximum operators were not properly implemented (one of the two operands were ignored by mistake).
2013-08-22style cleanup: pep8, also use float literals when comparing floats and pass ↵Campbell Barton
tuples to mathutils.Vector() rather then list.
2013-08-22Temporary fix for gaps in strokes when objects are behind the lines.Tamito Kajiyama
Problem report by Light BWK through personal communications, thanks a lot! Apparently there is something wrong in the way how edges are chained to create strokes. For some unknown reason, strokes may contain a very small line segment that proceeds in the opposite direction (e.g., downward even when adjacent stroke segments proceed upward), resulting in the reported visual artefact. This revision is intended to address the reported issue in most cases. The present solution is not a proper fix of the issue. Another code update with better understanding of the real cause is due in the future work.
2013-07-07Fix for incorrect clipping of Freestyle strokes when the viewport preview is ↵Tamito Kajiyama
used.
2013-07-05Partial fix for Bug #35695: Freestyle produces extra line across an object ↵Tamito Kajiyama
with pointed areas. The reported problem is a visual artefact (extra lines) generated by ChainingIterators.pySketchyChainingIterator used for sketchy chaining with the Same Object option disabled in the Parameter Editor mode. The issue is caused by an inconsistency in the internal data structure (i.e., view map). For now this fatal error condition is addressed to avoid visually incorrect results. Another fix will follow to address the cause of the internal inconsistency.
2013-06-16Fixed the feature edge selection by Freestyle face marks to properly account ↵Tamito Kajiyama
for border edges.
2013-06-02Fix for potential division by zero during Freestyle stroke rendering.Tamito Kajiyama
Problem report by Light BWK through personal communications with a sample .blend file for reproducing the problem. Thanks!
2013-05-03Fix for shaders.py based on code review comments from flokkievids.Tamito Kajiyama
Only the suggested changes that cause backward incompatibility were considered for now. * Removed pyFXSThicknessShader that is identical with pyConstantThicknessShader. * Swapped the order of two arguments of the pyDecreasingThicknessShader constructor in line with other shaders taking the same arguments. * Made module functions smoothC and get_fedge into methods of relevant shader classes. * Removed pyExtremitiesOrientationShader that relied on undefined Stroke methods.
2013-04-24Fix for broken Material color/alpha/thickness modifiers.Tamito Kajiyama
Reverted part of the trunk revision 56234 (RNA attribute consistency edits).
2013-04-23rna attribute consistency edits, use common prefix for booleans.Campbell Barton
2013-04-07use lowercase name for freestyle module (as with all other blender modules).Campbell Barton
2013-03-24Added header comments to indicate the author(s) of original files.Tamito Kajiyama
Suggested by Sergey Sharybin through a code review of the branch. The information was mostly recovered from the AUTHORS file [1] of the stand-alone Freestyle package version 2.2.0. [1] http://freestyle.cvs.sourceforge.net/viewvc/freestyle/freestyle/AUTHORS.TXT
2013-03-20Removed a global variable from PredicatesU1D.pyNFirstUP1D.Tamito Kajiyama
Suggested by Sergey Sharybin through a code review of the branch.
2013-03-20Fix for missing imported classes in style_modules/contour.py.Tamito Kajiyama
Identified by Campbell Barton through a code review of the Freestyle branch.
2013-03-15Fix for the Selection by Image Border not taking account of resolution ↵Tamito Kajiyama
percentage. Problem report by octane98 in the BlenderArtists Freestyle thread in June 2012, thanks a lot!
2013-03-04Fix for the Sinus Displacement geometry modifier not working properly.Tamito Kajiyama
The problem was caused by keeping a reference to a Vector object that is assumed to be unchanged, but actually altered by the geometry modifier. The same code updates were made to similar code portions to prevent possible future bugs.
2013-02-25Freestyle Python API improvements - part 9.Tamito Kajiyama
* Fix for wild card import statements (e.g., "from Freestyle import *") was done. Now import statements are either without using "from" or with all imported names explicitly listed. * GNU GPL header blocks were added to Python programs. Additional code clean-up was also made. * Removed freestyle_init.py and extra-lines.sml that were no longer used.
2013-02-24Freestyle Python API improvements - part 8.Tamito Kajiyama
* Proper handling of keyword arguments was implemented in Operators and ContextFunctions, as well as in methods of Interface0D, Interface1D, Iterator, their subclasses, Noise and IntegrationType. * Operators' methods and functions in the ContextFunctions module were renamed from CamelCase to lower cases + underscores. Style modules were updated accordingly. * Additional code clean-up was also made.
2013-02-23Fix for __repr__() depending on .getName() and .getExactTypeName().Tamito Kajiyama
API users no longer need to define them in user-defined Functions, Predicates and StrokeShaders. Also removed all .getName() and .getExactTypeName() definitions in pre-defined Functions, Predicates and StrokeShaders subclasses.
2013-02-23Freestyle Python API improvements - part 7.Tamito Kajiyama
Fix for PyGetSetDef and proper handling of keyword arguments were done in UnaryPredicate0D, UnaryPredicate1D, BinaryPredicate1D, and StrokeShader classes. Style modules were updated accordingly. Additional code clean-up was also made.
2013-02-21Freestyle Python API improvements - part 5.Tamito Kajiyama
Handling of keyword arguments in Python wrapper class constructors was revised. This revision is mainly focused on Interface0D, Interface1D, Iterator, and their subclasses, as well as a few additional view map component classes. Implementation notes: Because of the extensive use of constructor overloading in the underlying C++ classes, the corresponding Python wrappers try to parse arguments through multiple calls of PyArg_ParseTupleAndKeywords() if needed. The downside of this implementation is that most argument errors result in the same error message ("invalid argument(s)") without indicating what is wrong. For now this issue is left for future work. * Now the instantiation of ViewVertex is prohibited since the underlying C++ class is an abstract class. * Removed the .cast_to_interface0diterator() method from CurvePointIterator and StrokeVertexIterator. Instead the constructor of Interface0DIterator now accepts the instances of these two iterator classes to construct a nested Interface0DIterator instance that can be passed to Function0D functor objects. Specifically, an iterator 'it' is passed to a functor 'func' as follows: func(Interface0DIterator(it)) instead of: func(it.cast_to_interface0diterator()) * Boolean arguments of class constructors only accept values of boolean type. Input values of other types are considered as error. * Additional code clean-up was made.
2013-02-16Freestyle Python API improvements - part 4.Tamito Kajiyama
Major API updates were made as in part 3 to address code review comments. This revision focuses on Python wrappers of C++ iterators. * Most getter/setter methods were reimplemented as attributes using PyGetSetDef. * The naming of methods and attributes was fixed to follow the naming conventions of the Blender Python API (i.e., lower case + underscores for methods and attributes, and CamelCase for classes). The only irregular naming change is the following, to better indicate the functionality: - ChainingIterator: getVertex --> next_vertex * In addition, some code clean-up was done in both C++ and Python. Also duplicated definitions of predicate classes were removed.