» Blender 2.66.1 – Freestyle + OSL
Updated 06:39 April 11th, 2013
31
(948)  5,937

The (quite fantastic!) Freestyle post-processing project making available fancy edge-drawings.

 

FREESTYLE is in trunk now!

 

How ever, you will still need this file, to make the conversion between the “old” edge/face marks, and the new one used in trunk!

 

Note that Freestyle only works with internal currently, but with the renderlayers, you can easily combine the freestyle pass with a Cycles render…

 

Now also includes the Pose Bone RotScale Parent patch, which replaces/extends the Hinge/No Scale options. See http://wiki.blender.org/index.php/User:Mont29/Dev/Pose_Bone_RotScale_Parenting for more details. Removed that patch, looks like it did not gather enough interest…

 

Added python3 in statically linked libs !

 

WARNINGS!

I) Since r52831 (2012/12/10), all freestyle-related angles are stored internally as radians, and no more degrees. This does not change anything in the UI (Blender automatically translate radians in degrees), but if you are using a file saved in a previous version of freestyle, the angle values will be absurd (like 4000° etc.). So you must reset freestyle's Crease value to a decent angle! Else you may experience infinite render time…

 

II) Since r52899 (2012/12/11), a backward-compatibility break was introduced unintentionally, which affects two elements of the "Selection by edge types" area:
* Previous settings for "Edge Mark" are completely lost.
* Previous settings for "External Contour" are now used a "Edge Mark" settings.
* When opening a file saved with a previous revision, "External Contour" settings are hence always unset.

In addition to twisting your settings, this can also affect render time (the issue was discovered by a user which file was now taking twice more time to render, as well as a few Gb of additional memory). Sorry for the annoyance (but that's the risk when using a dev branch ;) ).

 

III) Since r55228 (2013/03/12), the edge/face mark flags have been replaced by customlayers. There should be no difference on the user pov, however, the code making the conversion from flags to customlayers won’t make it into trunk (i.e. it will be removed before merge).

The important point here is that if you have existing freestyle files that you want to be able to reuse/open in future versions, you must open and save them with a build from rev 55228 to rev ?????, later you would lose all your marked edges/faces.
 

LATEST LOG:

------------------------------------------------------------------------
r55841 | nazgul | 2013-04-06 15:24:34 +0200 (sam. 06 avril 2013) | 3 lignes

svn merge ^/trunk/blender -r55815:55840
------------------------------------------------------------------------
r55836 | kjym3 | 2013-04-06 09:53:57 +0200 (sam. 06 avril 2013) | 1 ligne

Minor white space fix.
------------------------------------------------------------------------
r55835 | kjym3 | 2013-04-06 08:09:08 +0200 (sam. 06 avril 2013) | 9 lignes

Removed Freestyle-specific code from DerivedMesh.c.

The removed code was necessary due to a logical bug in the use of CD_ORIGINDEX
layer entries.  Previously the index values were used to refer to the edges/polys
of the derived mesh, assuming that the derived mesh edges/polys consisted of those
from the original mesh plus newly added edges/polys.  This assumption was not
correct, although it worked well for several modifiers such as Mirror and Solidify.
Now the index values are specifically used to reference the edge/polys of the
original mesh.
------------------------------------------------------------------------
r55828 | kjym3 | 2013-04-05 21:34:26 +0200 (ven. 05 avril 2013) | 3 lignes

Removed CD_MASK_FREESTYLE_EDGE and CD_MASK_FREESTYLE_FACE from CD_MASK_BAREMESH
and moved them to init_render_mesh() in convertblender.c where these CustomData
layers are specifically required.
------------------------------------------------------------------------
r55820 | campbellbarton | 2013-04-05 18:55:12 +0200 (ven. 05 avril 2013) | 2 lignes

style cleanup
------------------------------------------------------------------------
r55819 | kjym3 | 2013-04-05 18:53:24 +0200 (ven. 05 avril 2013) | 1 ligne

White space fixes (to make a diff from the trunk cleaner).
------------------------------------------------------------------------
r55816 | campbellbarton | 2013-04-05 18:27:39 +0200 (ven. 05 avril 2013) | 1 ligne

svn merge ^/trunk/blender -r55813:55815
------------------------------------------------------------------------
r55814 | campbellbarton | 2013-04-05 17:42:31 +0200 (ven. 05 avril 2013) | 1 ligne

svn merge ^/trunk/blender -r55776:55813
------------------------------------------------------------------------
r55780 | campbellbarton | 2013-04-04 15:37:07 +0200 (jeu. 04 avril 2013) | 1 ligne

svn merge ^/trunk/blender -r55700:55776
------------------------------------------------------------------------
r55776 | campbellbarton | 2013-04-04 13:47:48 +0200 (jeu. 04 avril 2013) | 2 lignes

quiet warnings (building with -Werror)
------------------------------------------------------------------------
r55764 | kjym3 | 2013-04-03 20:26:51 +0200 (mer. 03 avril 2013) | 2 lignes

Fix for Freestyle face marks not effective with the Mirror modifier.
Reported by IRIE Shinsuke through a branch code review comment, thanks!
------------------------------------------------------------------------
r55741 | kjym3 | 2013-04-03 02:00:29 +0200 (mer. 03 avril 2013) | 13 lignes

Use of text datablocks for storing Python style modules.
Suggested by Brecht Van Lommel and Campbell Barton through code review comments.

Previously style modules were external Python script files whose absolute paths
were kept in .blend files.  Now style modules are stored in .blend files as text
datablocks.

Style modules are configured in three steps:
1. Open an external style module file (or create a new text datablock) in the
Text Editor in Blender.
2. Add a style module to the list of style modules (by pressing the "Add" button)
in the Render Layer properties window.
3. Click the name entry and select the style module from the drop-down menu.
------------------------------------------------------------------------
r55706 | kjym3 | 2013-04-01 21:31:09 +0200 (lun. 01 avril 2013) | 2 lignes

Fix for Mesh::drawflag to store ME_DRAW_FREESTYLE_EDGE and ME_DRAW_FREESTYLE_FACE.
Problem report from IRIE Shinsuke, many thanks!
------------------------------------------------------------------------
r55705 | kjym3 | 2013-04-01 20:32:19 +0200 (lun. 01 avril 2013) | 2 lignes

Removed ME_CDFLAG_FREESTYLE_EDGE and ME_CDFLAG_FREESTYLE_FACE from Mesh::cd_flag.
Suggested by Campbell Barton through a review comment of the Freestyle branch.
------------------------------------------------------------------------
r55702 | kjym3 | 2013-04-01 15:47:19 +0200 (lun. 01 avril 2013) | 4 lignes

Merged changes in the trunk up to revision 55700.

Conflicts resolved:
source/blender/editors/mesh/mesh_intern.h
------------------------------------------------------------------------
r55683 | kjym3 | 2013-03-31 12:33:27 +0200 (dim. 31 mars 2013) | 12 lignes

Work-in-progress re-implementation of CustomData-based edge/face marks.

Most changes in revision 55228 were reverted and Freestyle edge/face marks
were re-implemented using CD_ORIGINDEX layers of edge/poly custom data.

For this implementation to work properly, modifiers were updated so that
required CD_ORIGINDEX layers will be set.  As pilot cases, the Mirror and
Solidify modifiers were updated (see comments in the code).

Some Freestyle-specific code is necessary in DerivedMesh.c so that the
CD_FREESTYLE_EDGE/FACE layers will be transferred from meshes to derived
meshes.  This seems unnecessary, so further investigation is foreseen.
------------------------------------------------------------------------
r55581 | kjym3 | 2013-03-26 01:36:43 +0100 (mar. 26 mars 2013) | 3 lignes

Fix for missing CustomData flag updates in the temporary code for migrating
Freestyle edge/face marks from old .blend files.
Problem report and patch by IRIE Shinsuke, many thanks!
------------------------------------------------------------------------
r55680 | campbellbarton | 2013-03-31 03:11:07 +0200 (dim. 31 mars 2013) | 3 lignes

remove blender foundation copyright from freestyle files.
this can be added back on case-by-case basis, but better not assume ownership of another projects work by default.
------------------------------------------------------------------------
r55677 | kjym3 | 2013-03-30 17:42:59 +0100 (sam. 30 mars 2013) | 4 lignes

Updated default line style parameters.
- Line color set to black.
- Line thickness set to 3.
Based on review comments by IRIE Shinsuke.
------------------------------------------------------------------------
r55636 | campbellbarton | 2013-03-27 23:24:38 +0100 (mer. 27 mars 2013) | 1 ligne

svn merge ^/trunk/blender -r55594:55635
------------------------------------------------------------------------
r55611 | kjym3 | 2013-03-27 03:06:36 +0100 (mer. 27 mars 2013) | 1 ligne

Fix for Freestyle edge/face marks not working with most modifiers (except for Subdivision Surface).
------------------------------------------------------------------------
r55596 | nazgul | 2013-03-26 10:59:43 +0100 (mar. 26 mars 2013) | 11 lignes

Freestyle changes:

- Revert some stylistic changes made in branch
  They weren't directly related on freestyle project
  and better be handled in trunk. Helps reading patches
  ad prevents possible merge conflicts.

- Solved issue introduced with recent deprecation of
  RenderData.maximize,
------------------------------------------------------------------------
r55595 | nazgul | 2013-03-26 10:09:31 +0100 (mar. 26 mars 2013) | 3 lignes

Merging r55547 through r55594 from trunk into soc-2008-mxcurioni
------------------------------------------------------------------------
r55594 | nazgul | 2013-03-26 09:32:53 +0100 (mar. 26 mars 2013) | 5 lignes

Freestyle: fix crash unlinking object

Was getting an address of pointer variable.
------------------------------------------------------------------------
r55593 | nazgul | 2013-03-26 09:08:51 +0100 (mar. 26 mars 2013) | 5 lignes

Freestyle: use native EOL for BKE_freestyle

Hope it's not so big deal every single line was changed in this commit.
------------------------------------------------------------------------
r55592 | nazgul | 2013-03-26 09:05:56 +0100 (mar. 26 mars 2013) | 3 lignes

Freestyle: fix compilation with strict flags used
------------------------------------------------------------------------
r55580 | kjym3 | 2013-03-26 01:32:19 +0100 (mar. 26 mars 2013) | 2 lignes

Fix for truncated labels in the 3D View properties panel.
Suggested by Bastien Montagne and IRIE Shinsuke through a code review of the branch.
------------------------------------------------------------------------
r55548 | kjym3 | 2013-03-24 13:13:13 +0100 (dim. 24 mars 2013) | 7 lignes

Merged changes in the trunk up to revision 55546.

Conflicts resolved:
source/blenderplayer/bad_level_call_stubs/SConscript

Partly reverted changes to intern/cycles/blender/addon/ui.py in revision 52899
to make it easier to merge trunk changes.
------------------------------------------------------------------------
r55543 | kjym3 | 2013-03-24 01:53:05 +0100 (dim. 24 mars 2013) | 7 lignes

Added header comments to indicate the author(s) of original files.
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
------------------------------------------------------------------------
r55542 | kjym3 | 2013-03-23 22:38:35 +0100 (sam. 23 mars 2013) | 2 lignes

Removed a Freestyle-specific function call from bf_windowmanager.
Suggested by Sergey Sharybin through a code review of the branch.
------------------------------------------------------------------------
r55536 | kjym3 | 2013-03-23 15:09:16 +0100 (sam. 23 mars 2013) | 2 lignes

Missing new files in the previous commit.
Pointed out by IRIE Shinsuke through the bf-committers list, thanks!
------------------------------------------------------------------------
r55525 | kjym3 | 2013-03-23 04:00:37 +0100 (sam. 23 mars 2013) | 14 lignes

A major code update for making the DNA file specification of Freestyle settings
and RNA for it independent of the build flag for enabling Freestyle.  Suggested
by Sergey Sharybin through a code review of the branch.

* Many #ifdef WITH_FREESTYLE blocks were removed to always have Freestyle-specific
DNA file specification and RNA for it built in Blender.  This will allow Freestyle
setting survive even when a non-Freestyle build is used for loading and saving
files.  It is noted that operations are still conditionally built through #ifdef
WITH_FREESTYLE blocks.

* To this end, new blenkernel files BKE_freestyle.h and intern/freestyle.c have
been added.  All API functions in FRS_freestyle_config.h as well as some of those
in FRS_freestyle.h were moved to the new files.  Now the relocated API functions
have BKE_ prefix instead of FRS_.
------------------------------------------------------------------------
r55522 | kjym3 | 2013-03-23 00:04:14 +0100 (sam. 23 mars 2013) | 1 ligne

Fix for missing -DWITH_FREESTYLE.
------------------------------------------------------------------------
r55488 | kjym3 | 2013-03-22 00:25:18 +0100 (ven. 22 mars 2013) | 2 lignes

Moved the definitions of Freestyle-specific panels to its own module.
Suggested by Sergey Sharybin through a code review of the branch.
------------------------------------------------------------------------
r55484 | kjym3 | 2013-03-21 22:30:05 +0100 (jeu. 21 mars 2013) | 2 lignes

Fix for default values different from the factory settings.
Suggested by IRIE Shinsuke through a code review of the branch.
------------------------------------------------------------------------
r55432 | kjym3 | 2013-03-20 02:05:37 +0100 (mer. 20 mars 2013) | 2 lignes

Fix for MAX_NAME (== 64) and FILE_MAX (== 1024) in DNA headers.
Suggested by Sergey Sharybin through a code review of the branch.
------------------------------------------------------------------------
r55431 | kjym3 | 2013-03-20 01:08:42 +0100 (mer. 20 mars 2013) | 2 lignes

Removed goto's as suggested first by Bastien Montagne and also by Sergey Sharybin
through a code review of the branch.
------------------------------------------------------------------------
r55430 | kjym3 | 2013-03-20 00:54:14 +0100 (mer. 20 mars 2013) | 4 lignes

Code clean-up suggested by Sergey Sharybin through a code review of the branch.
* Removed the checks of NULL pointers after malloc/calloc.
* Replaced repeated cast operations with a temporary variable initialized with one cast operation.
* Removed an unused switch block (meant to be a place to put per-modifier resource management code).
------------------------------------------------------------------------
r55427 | kjym3 | 2013-03-19 22:11:45 +0100 (mar. 19 mars 2013) | 2 lignes

Removed a global variable from PredicatesU1D.pyNFirstUP1D.
Suggested by Sergey Sharybin through a code review of the branch.
------------------------------------------------------------------------
r55425 | kjym3 | 2013-03-19 21:16:13 +0100 (mar. 19 mars 2013) | 2 lignes

Fix for missing imported classes in style_modules/contour.py.
Identified by Campbell Barton through a code review of the Freestyle branch.
------------------------------------------------------------------------
r55406 | campbellbarton | 2013-03-19 11:07:23 +0100 (mar. 19 mars 2013) | 2 lignes

quiet warnings by making undeclared vars static
------------------------------------------------------------------------
r55397 | campbellbarton | 2013-03-18 23:53:58 +0100 (lun. 18 mars 2013) | 2 lignes

fix for assert(), were not enough mathutils slots.
------------------------------------------------------------------------
r55395 | campbellbarton | 2013-03-18 23:51:01 +0100 (lun. 18 mars 2013) | 2 lignes

fix for some errors.

------------------------------------------------------------------------
r55394 | campbellbarton | 2013-03-18 23:37:04 +0100 (lun. 18 mars 2013) | 1 ligne

svn merge ^/trunk/blender -r55372:55392
------------------------------------------------------------------------
r55392 | campbellbarton | 2013-03-18 22:45:29 +0100 (lun. 18 mars 2013) | 1 ligne

svn merge ^/trunk/blender -r55357:55372
------------------------------------------------------------------------
r55365 | kjym3 | 2013-03-18 01:48:59 +0100 (lun. 18 mars 2013) | 8 lignes

Merged changes in the trunk up to revision 55357.

Resolved conflicts:
release/datafiles/startup.blend
source/blender/editors/space_nla/nla_buttons.c

Also updated source/blender/blenkernel/intern/linestyle.c as a follow-up of
recent changes for the use of bool.
------------------------------------------------------------------------
r55347 | kjym3 | 2013-03-16 23:39:39 +0100 (sam. 16 mars 2013) | 5 lignes

Fix for a crash due to a bug in the handling of singularity in stroke creation,
where additions of a small offset (to prevent vertices from being at the same point)
were not properly done when vertices were shifted in the reverse order.

A problem report by Vicente Carro through personal communications, thanks a lot!
------------------------------------------------------------------------
r55340 | kjym3 | 2013-03-16 17:41:12 +0100 (sam. 16 mars 2013) | 2 lignes

Fix for a crash due to mesh faces with wire frame materials not properly handled.
A problem report by Vicente Carro through personal communications, many thanks!
------------------------------------------------------------------------
r55291 | kjym3 | 2013-03-15 01:30:20 +0100 (ven. 15 mars 2013) | 2 lignes

Fix for the Selection by Image Border not taking account of resolution percentage.
Problem report by octane98 in the BlenderArtists Freestyle thread in June 2012, thanks a lot!
------------------------------------------------------------------------
r55228 | kjym3 | 2013-03-13 07:44:43 +0100 (mer. 13 mars 2013) | 12 lignes

New implementation of Freestyle edge/face marks

The previous implementation of Freestyle edge/face marks was refactored
based on suggestions from the latest code review by Campbell.  The new
implementation relies on mesh CustomData to store edge/face marks, instead
of introducing extra flags in the core Mesh and BMesh data structures.
The CustomData-based implementation will allow further additions of new
edge/face attributes because of the independence from Mesh/BMesh.

This revision is work in progress, mainly intended to address the review
comments and ask for further code review in view of the trunk merger in
the upcoming 2.67 release.
------------------------------------------------------------------------
r55185 | kjym3 | 2013-03-11 07:56:51 +0100 (lun. 11 mars 2013) | 1 ligne

Another big code clean-up patch from Bastien Montagne, thanks again!
------------------------------------------------------------------------
r55102 | kjym3 | 2013-03-08 00:17:23 +0100 (ven. 08 mars 2013) | 1 ligne

A big code clean-up patch from Bastien Montagne, many thanks!
------------------------------------------------------------------------
r54998 | kjym3 | 2013-03-03 22:56:36 +0100 (dim. 03 mars 2013) | 6 lignes

Fix for the Sinus Displacement geometry modifier not working properly.
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.
------------------------------------------------------------------------
r54994 | kjym3 | 2013-03-03 16:07:49 +0100 (dim. 03 mars 2013) | 4 lignes

Merged changes in the trunk up to revision 54992.

Resolved conflicts:
release/scripts/startup/bl_ui/space_view3d.py
------------------------------------------------------------------------
r54984 | kjym3 | 2013-03-03 02:53:49 +0100 (dim. 03 mars 2013) | 2 lignes

Fix for exceptions in converting Python float objects to C variables not properly handled.
Based on review comment from Campbell.
------------------------------------------------------------------------
r54981 | kjym3 | 2013-03-03 00:30:23 +0100 (dim. 03 mars 2013) | 2 lignes

Renamed FreestyleLineSet.use to .show_render.
Based on review comment from Campbell.
------------------------------------------------------------------------
r54980 | kjym3 | 2013-03-03 00:17:35 +0100 (dim. 03 mars 2013) | 2 lignes

Code clean-up: used copy_m4_m4() and unit_m4() instead of verbose loops.
Based on review comment from Campbell.
------------------------------------------------------------------------
r54979 | kjym3 | 2013-03-03 00:17:20 +0100 (dim. 03 mars 2013) | 2 lignes

Removed redundant definitions of __min and __max macros by replacing them with
std::min() and std::max(), respectively.  Based on review comment from Campbell.
------------------------------------------------------------------------
r54977 | kjym3 | 2013-03-02 23:20:27 +0100 (sam. 02 mars 2013) | 2 lignes

Moved operations on blend file data from C++ class destructor to a specific method
for releasing resources.  Based on review comment from Campbell.
------------------------------------------------------------------------
r54975 | kjym3 | 2013-03-02 19:43:06 +0100 (sam. 02 mars 2013) | 2 lignes

Fix for a buffer overflow, by simply removing the unnecessary string copy.
Review comment from Campbell.
------------------------------------------------------------------------
r54974 | kjym3 | 2013-03-02 19:31:32 +0100 (sam. 02 mars 2013) | 2 lignes

Removed paths to a browser command and help index that are no longer used in Freestyle for Blender.
Review comment from Campbell.
------------------------------------------------------------------------
r54973 | kjym3 | 2013-03-02 19:27:50 +0100 (sam. 02 mars 2013) | 2 lignes

Use sys.float_info.max instead of float('inf').
Review comment from Campbell.
------------------------------------------------------------------------
r54826 | kjym3 | 2013-02-25 00:43:40 +0100 (lun. 25 févr. 2013) | 10 lignes

Freestyle Python API improvements - part 9.

* 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.
------------------------------------------------------------------------
r54805 | kjym3 | 2013-02-24 04:39:20 +0100 (dim. 24 févr. 2013) | 1 ligne

Merged changes in the trunk up to revision 54802.
------------------------------------------------------------------------
r54804 | kjym3 | 2013-02-24 03:39:38 +0100 (dim. 24 févr. 2013) | 10 lignes

Freestyle Python API improvements - part 8.

* 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.
------------------------------------------------------------------------
r54803 | kjym3 | 2013-02-24 03:32:56 +0100 (dim. 24 févr. 2013) | 1 ligne

Code clean-up and fix for typos in docstrings.
------------------------------------------------------------------------
r54792 | kjym3 | 2013-02-23 19:50:33 +0100 (sam. 23 févr. 2013) | 1 ligne

Code style clean-up.
------------------------------------------------------------------------
r54791 | kjym3 | 2013-02-23 19:32:28 +0100 (sam. 23 févr. 2013) | 1 ligne

Added GNU GPL header blocks.
------------------------------------------------------------------------
r54787 | kjym3 | 2013-02-23 13:17:40 +0100 (sam. 23 févr. 2013) | 4 lignes

Fix for __repr__() depending on .getName() and .getExactTypeName().
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.
------------------------------------------------------------------------
r54779 | kjym3 | 2013-02-23 04:07:19 +0100 (sam. 23 févr. 2013) | 1 ligne

Minor docstring fixes.
------------------------------------------------------------------------
r54778 | kjym3 | 2013-02-23 04:05:38 +0100 (sam. 23 févr. 2013) | 1 ligne

Fix for texture images left unreleased.
------------------------------------------------------------------------
r54771 | kjym3 | 2013-02-23 02:12:23 +0100 (sam. 23 févr. 2013) | 5 lignes

Freestyle Python API improvements - part 7.

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.
------------------------------------------------------------------------
r54768 | kjym3 | 2013-02-23 01:44:39 +0100 (sam. 23 févr. 2013) | 1 ligne

Fixed typoes in docstrings.
------------------------------------------------------------------------
r54740 | kjym3 | 2013-02-22 04:04:52 +0100 (ven. 22 févr. 2013) | 1 ligne

Code clean-up: removed empty PyMethodDef.
------------------------------------------------------------------------
r54739 | kjym3 | 2013-02-22 03:48:41 +0100 (ven. 22 févr. 2013) | 4 lignes

Missing code updates in the previous commit.

Also improved __repr__() so that the .getName() is no longer necessary in user-defined
Function0D and Function1D subclasses.
------------------------------------------------------------------------
r54735 | kjym3 | 2013-02-22 02:57:20 +0100 (ven. 22 févr. 2013) | 4 lignes

Freestyle Python API improvements - part 6.

Fix for PyGetSetDef and proper handling of keyword arguments were done in
Function0D and Function1D classes.  Additional code clean-up was also made.
------------------------------------------------------------------------
r54732 | kjym3 | 2013-02-22 02:29:50 +0100 (ven. 22 févr. 2013) | 1 ligne

Code clean-up: Py_TYPE(self)->tp_name instead of ((PyObject *)self)->ob_type->tp_name.
------------------------------------------------------------------------
r54730 | kjym3 | 2013-02-21 22:48:52 +0100 (jeu. 21 févr. 2013) | 2 lignes

Attribute renaming: .exact_type_name --> .name.  Also did a more generic implementation
of the attribute (meant to be a shortcut of .__class__.__name__).
------------------------------------------------------------------------
r54698 | kjym3 | 2013-02-21 03:57:44 +0100 (jeu. 21 févr. 2013) | 32 lignes

Freestyle Python API improvements - part 5.

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.
------------------------------------------------------------------------
r54596 | kjym3 | 2013-02-16 19:38:03 +0100 (sam. 16 févr. 2013) | 1 ligne

Merged changes in the trunk up to revision 54594.
------------------------------------------------------------------------
r54595 | kjym3 | 2013-02-16 18:13:59 +0100 (sam. 16 févr. 2013) | 4 lignes

Fix for pointers to auto variables returned from Python wrapper class methods.
The previous implementation was a quick workaround of C++ const references.

Also removed the unused 'borrowed' flag from the Python wrapper of FrsMaterial.
------------------------------------------------------------------------
r54593 | kjym3 | 2013-02-16 15:22:34 +0100 (sam. 16 févr. 2013) | 1 ligne

Made code style clean-up and fixed a typo in a docstring.
------------------------------------------------------------------------
r54592 | kjym3 | 2013-02-16 15:21:40 +0100 (sam. 16 févr. 2013) | 16 lignes

Freestyle Python API improvements - part 4.

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.
------------------------------------------------------------------------
r54591 | kjym3 | 2013-02-16 15:01:55 +0100 (sam. 16 févr. 2013) | 1 ligne

Fix for copy-and-paste bugs in Id rich comparison.  Also made code style clean-up.
------------------------------------------------------------------------
r54575 | mont29 | 2013-02-15 12:23:07 +0100 (ven. 15 févr. 2013) | 10 lignes

Fix compilation on linux (with gcc4.7).

Without const, I had the following error:

/home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_ViewMap.cpp: In function ‘PyObject* ViewMap_scene_bbox_get(BPy_ViewMap*, void*)’:
/home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_ViewMap.cpp:120:54: error: invalid initialization of non-const reference of type ‘BBox >&’ from an rvalue of type ‘BBox >’
In file included from /home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_ViewMap.cpp:3:0:
/home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_Convert.h:81:12: error: in passing argument 1 of ‘PyObject* BPy_BBox_from_BBox(BBox >&)’
/home/i7deb64/blender-2.5-svn/__work__/freestyle/source/blender/freestyle/intern/python/BPy_ViewMap.cpp:121:1: warning: control reaches end of non-void function [-Wreturn-type]
make[2]: *** [source/blender/freestyle/CMakeFiles/bf_freestyle.dir/intern/python/BPy_ViewMap.cpp.o] Erreur 1
------------------------------------------------------------------------
r54568 | kjym3 | 2013-02-15 00:50:30 +0100 (ven. 15 févr. 2013) | 1 ligne

Minor coding style clean-up.
------------------------------------------------------------------------
r54566 | kjym3 | 2013-02-15 00:48:34 +0100 (ven. 15 févr. 2013) | 45 lignes

Freestyle Python API improvements - part 3.

Major API updates were made to address code review comments.
This revision mostly focuses on Python wrappers of C++ 0D and 1D elements (i.e.,
Interface0D and Interface1D, as well as their subclasses).

* Most getter/setter methods were reimplemented as attributes using PyGetSetDef.
Vector attributes are now implemented based on mathutils callbacks.  Boolean
attributes now only accept boolean values.

* The __getitem__ method was removed and the Sequence protocol was used instead.

* 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).  Some naming inconsistency within the Freestyle Python
API was also addressed.

* The Freestyle API had a number of method names including prefix/suffix "A" and
"B", and their meanings were inconsistent (i.e., referring to different things
depending on the classes).  The names with these two letters were replaced with
more straightforward names.  Also some attribute names were changed so as to indicate
the type of the value (e.g., FEdge.next_fedge instead of FEdge.next_edge) in line
with other names explicitly indicating what the value is (e.g., SVertex.viewvertex).

* In addition, some code clean-up was done in both C++ and Python.

Notes:

In summary, the following irregular naming changes were made through this revision
(those resulting from regular changes of naming conventions are not listed):

- CurvePoint: {A,B} --> {first,second}_svertex
- FEdge: vertex{A,B} --> {first,second}_svertex
- FEdge: {next,previous}Edge --> {next,previous}_fedge
- FEdgeSharp: normal{A,B} --> normal_{right,left}
- FEdgeSharp: {a,b}FaceMark --> face_mark_{right,left}
- FEdgeSharp: {a,b}Material --> material_{right,left}
- FEdgeSharp: {a,b}MaterialIndex --> material_index_{right,left}
- FrsCurve: empty --> is_empty
- FrsCurve: nSegments --> segments_size
- TVertex: mate() --> get_mate()
- ViewEdge: fedge{A,B} --> {first,last}_fedge
- ViewEdge: setaShape, aShape --> occlude
- ViewEdge: {A,B} --> {first,last}_viewvertex
- ViewMap: getScene3dBBox --> scene_bbox
------------------------------------------------------------------------
r54561 | kjym3 | 2013-02-14 20:19:44 +0100 (jeu. 14 févr. 2013) | 2 lignes

Fix for a static variable in BlenderStrokeRenderer::RenderStrokeRep() left after
quick trials of different approaches to performance improvement.
------------------------------------------------------------------------
r54518 | kjym3 | 2013-02-13 06:32:02 +0100 (mer. 13 févr. 2013) | 4 lignes

Fix for a crash when the Polygonization geometry modifier is used with a small "error"
parameter value.  The problem was caused by a null pointer reference in CurvePiece::error()
resulting from incorrect lengths of subdivided curves calculated in CurvePiece::subdivide().
Problem report by IRIE Shinsuke with a GDB backtrace log, many thanks!
------------------------------------------------------------------------
r54427 | kjym3 | 2013-02-10 11:17:59 +0100 (dim. 10 févr. 2013) | 7 lignes

Merged changes in the trunk up to revision 54421.

Conflicts resolved:
release/datafiles/startup.blend
release/scripts/startup/bl_ui/properties_render.py
source/blender/SConscript
source/blender/blenloader/intern/readfile.c
------------------------------------------------------------------------
r54287 | kjym3 | 2013-02-04 01:23:37 +0100 (lun. 04 févr. 2013) | 6 lignes

* Added a generic helper function for parsing PyObject arguments as N-dimensional float array.

* Local helpers were replaced with the generic one.  This also fixed a memory leak in the setter
function StrokeVertex_point_set.

* Made minor code style changes.
------------------------------------------------------------------------
r54283 | kjym3 | 2013-02-04 00:04:42 +0100 (lun. 04 févr. 2013) | 6 lignes

* Fix for broken StrokeAttribute.visible setter function.

* Fix for a wrong vector element index in StrokeAttribute_mathutils_set
in the case of MATHUTILS_SUBTYPE_COLOR.

* Made minor code style changes.
------------------------------------------------------------------------
r54282 | kjym3 | 2013-02-03 23:40:10 +0100 (dim. 03 févr. 2013) | 1 ligne

Replaced PyTuple_SetItem by PyTuple_SET_ITEM when creating new tuples.
------------------------------------------------------------------------
r54280 | kjym3 | 2013-02-03 18:01:21 +0100 (dim. 03 févr. 2013) | 4 lignes

Freestyle Python API improvements - part 2.

The API syntax of FrsMaterial was updated by means of getter/setter properties.
Python style modules (including the Parameter Editor) were updated accordingly.
------------------------------------------------------------------------
r54257 | kjym3 | 2013-02-02 03:42:12 +0100 (sam. 02 févr. 2013) | 2 lignes

Fix for the label of the DIFFERENCE blending mode for alpha and thickness modifiers.
Problem report from IRIE Shinsuke, thanks a lot!
------------------------------------------------------------------------
r54240 | kjym3 | 2013-01-31 21:42:25 +0100 (jeu. 31 janv. 2013) | 2 lignes

Fix for a bug that Freestyle settings of a scene are reset when copying the scene.
Problem report by IRIE Shinsuke, many thanks!
------------------------------------------------------------------------
r54178 | mont29 | 2013-01-29 08:21:10 +0100 (mar. 29 janv. 2013) | 1 ligne

Fix build with blender player.
------------------------------------------------------------------------
r54174 | kjym3 | 2013-01-29 04:42:19 +0100 (mar. 29 janv. 2013) | 1 ligne

Merged changes in the trunk up to revision 54171.
------------------------------------------------------------------------
r54172 | kjym3 | 2013-01-29 04:12:49 +0100 (mar. 29 janv. 2013) | 12 lignes

Fix for a crash when freeing copied scenes.

The problem was caused by the fact that BKE_scene_copy() was simply doing "memcpy"
to duplicate render layers including lineset settings without taking care of pointers
in the linesets.  For this reason, freeing the original scene and copied one resulted
in freeing allocated memory buffers twice.

Now BKE_scene_copy() properly duplicates linesets as part of render layers.

Also some code clean-up was made in the modified files.

Problem report by IRIE Shinsuke (with a patch to fix the crash).  Many thanks!
------------------------------------------------------------------------
r54129 | kjym3 | 2013-01-27 22:51:25 +0100 (dim. 27 janv. 2013) | 4 lignes

Freestyle Python API improvements.

StrokeAttribute class methods were renamed from camel case to lower case plus underscore.
Also made changes to shaders.pyTVertexOrientationShader that uses the affected methods.
------------------------------------------------------------------------
r54127 | kjym3 | 2013-01-27 21:17:49 +0100 (dim. 27 janv. 2013) | 8 lignes

Freestyle Python API improvements - part 1.

* The API syntax of StrokeVertex and StrokeAttribute was updated by means of getter/setter
properties instead of class methods.  Python style modules (including the Parameter Editor
implementation) were updated accordingly.

* Code clean-up was done for a few Python style modules, mostly by removing duplicated
definitions of stroke shaders and fixing indentation.
------------------------------------------------------------------------
r54119 | mont29 | 2013-01-27 15:08:39 +0100 (dim. 27 janv. 2013) | 1 ligne

Fix for wrong layers UI with Cycles renderer. Thanks to IRIE Shinsuke for the report on ML!
------------------------------------------------------------------------
r54113 | kjym3 | 2013-01-27 00:49:13 +0100 (dim. 27 janv. 2013) | 7 lignes

Merged changes in the trunk up to revision 54110.

Conflicts resolved:
source/blender/blenfont/SConscript
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/rna_scene.c
------------------------------------------------------------------------
r54112 | kjym3 | 2013-01-26 23:28:04 +0100 (sam. 26 janv. 2013) | 3 lignes

Slightly generalized the crash fix in revision 54111.
Also added a warning message to anticipate potential issues due to
the implication of the problem addressed here.
------------------------------------------------------------------------
r54111 | kjym3 | 2013-01-26 19:53:16 +0100 (sam. 26 janv. 2013) | 3 lignes

Fix for a crash in curvature calculation due to a WVertex with no associated edges.
(TODO: identify the reason why such a strange WVertex is generated.)
Problem report by Vicente Carro with a .blend for reproducing the issue.  Thanks a lot!
------------------------------------------------------------------------
r54095 | kjym3 | 2013-01-25 08:31:29 +0100 (ven. 25 janv. 2013) | 1 ligne

Fix for no copy constructor in the Python wrapper of StrokeAttribute.

31 Comments so far. Leave yours.
16:00 March 11th, 2013
BrunoCornelsen, what version Ubuntu are you using?

What errors do you get when you run Blender from a terminal?
16:00 March 11th, 2013
BrunoCornelsen, what version Ubuntu are you running?

What errors do you get when you run Blender from a terminal?
05:20 February 15th, 2013
Hi Mont29, could you check this .blend file? i already add suzanne in it, and render it using your latest build. But the problem still exist :( https://dl.dropbox.com/u/13769882/an_taow_01b_07.blend thanks in advance :)
01:30 February 15th, 2013
Hi Mont, there's something weird about the render result. you can see the result here http://blenderartists.org/forum/showthread.php?89986-Freestyle-for-Blender&p=2306183&viewfull=1#post2306183

even with the simple suzanne and a plane, i still can see the line through geometry :(
01:34 February 13th, 2013
27 . mont29 (builder)
Woops! did not even saw your previous comment… :/

Anyway, that's nice if you could get that libtiff. I try to make a as much as possible static Blender, but that’s far from easy, especially with all those new fancy libs! :p
19:07 February 12th, 2013
nevermind, i manage to install missing libtiff.so.5 with this http://packages.ubuntu.com/quantal/libtiff5 :D tengkyu for a wonderfull build !!
23:34 February 10th, 2013
still not working in my Ubuntu 12.04 64bit :( i have manage to install libGLEW.so.1.7 but again, error while loading shared libraries: libtiff.so.5: cannot open shared object file: No such file or directory

is it something to do with OSL ??
05:15 January 15th, 2013
24 . mont29 (builder)
Eeek… Yes, you need a working Python3.3 on your system, which is not so common currently in stable distro… :/

I don't think I can use a static python (will investigate, though), but your distro has most likely a testing package for py3.3 now, which you can manually download and install.
23:06 January 14th, 2013
Help :D libpython3.3m.so.1.0: cannot open shared object file: No such file or directory
17:19 October 22nd, 2012
Thanks, that you tried to make it work on Ubuntu. I absolutely agree with you - sometimes (very often) I think Ubuntu developers hate users of their product :(
07:11 October 22nd, 2012
21 . mont29 (builder)
Well, finally decided to build and statically link against libglew… So this should be no more a problem!
06:11 October 22nd, 2012
20 . mont29 (builder)
Bah, stupid Ubuntu… Even 12.10 does not have libglew1.7, they directly bumped to 1.8. :/

Only solution I can see currently is trying to install that Debian Wheezy package : http://packages.debian.org/wheezy/libglew1.7

…and crossing fingers hoping everything will go smooth. ;)
03:02 October 22nd, 2012
But how????? I'm on Ubuntu 12.04 and don't know any way how to install the libglew1.7.
00:27 October 12th, 2012
18 . mont29 (builder)
Well, you should install the libglew1.7 package (or similar name) of your distribution… ;)
02:58 October 11th, 2012
i use this build 8396_blender_freestyle_svn51130.tar.xz but it seems a library is missing : error while loading shared libraries: libGLEW.so.1.7: cannot open shared object file: No such file or directory

what should i do ?
06:58 September 15th, 2012
16 . mont29 (builder)
Ehh… i’m late, sorry :/

AFAIK, there is no option to enable/disable MT during rendering? Anyway, I use the default options here…
22:05 August 29th, 2012
just curious, does the build not multithreaded ? i use Phenom x6 and only one core does the rendering
02:56 August 29th, 2012
14 . mont29 (builder)
Nice to learn! :D
04:25 August 27th, 2012
Hi Mont29...i use the latest build (8002_blender_freestyle_svn49987.tar.xz) and everything works fine ^__^ i use Ubuntu 12.04 64 bit and i only have to install libjpeg62 for dependency. No more bone fixing, thanks for your hard work !
12:06 June 30th, 2012
12 . mont29 (builder)
Ack, sorry johantri, didn’t saw your comment…

Could you please put the simplest fail case .blend on pasteall.org, and give me the link? Would be much interested in trying to find what’s broken…
03:14 June 27th, 2012
this build ruins some of my character's rig. some bone is not inherit rotation and scale of their parent anymore. And i have to fix it bone by bone T___T
22:50 March 7th, 2012
10 . mont29 (builder)
Hi Jba,

Yes, that build needs Boost 1.48 (which is current version on Debian testing since a few weeks now)…
I will try to statically link against Boost for next build, but I don’t promise anything, if it make the archive too big I’ll have to drop this (I already have difficulties to upload the current 20Mb one :/ ).

Anyway, I think Ubuntu 12.4 will have boost 1.48!
04:06 March 7th, 2012
9 .
Hi mont29,
on my Ubuntu 11.10 64bit i have the following error:
"./blender: error while loading shared libraries: libboost_filesystem.so.1.48.0: cannot open shared object file: No such file or directory"
On the repo there is only libboost-filesystem1.46.1, but it doesn't work. Does it require 1.48 or maybe other libs?

Thanks 1K :D !!
Jba
01:25 March 6th, 2012
8 . mont29 (builder)
Hi oscurart,

Afair, there is nothing special nor fancy needed to build freestyle, just checkout its branches (soc-2008-mxcurioni), and compile. :)
04:22 March 5th, 2012
Hi folk? have you some guide for compile Blender with Freestyle??? thanks a bunch!
14:50 February 22nd, 2012
6 . mont29 (builder)
It would be really, really surprising you would need those -dev packages…

However, you do need the “non-dev” packages of all thoses libs – most are probably already present, but some, like perhaps libsndfile, libopenexr, libjack, libspnav, etc., were likely missing (and installing -dev packages automatically installs their libraries too).

The point being, stick to standard packages, using -dev ones usually adds many things you should never need (like headers, static libraries…). :)
12:27 February 22nd, 2012
But When I Install These This Build Work Even The Other Linux Builds On Here, Before I Install These Things It Did Not Work. But If Its Not Needed Then Its Fine By Me.
06:04 February 22nd, 2012
4 . mont29 (builder)
@ gen: No, those packages should absolutely *not* be needed, they are only necessary when *building* Blender, not to just use a build!
17:10 February 21st, 2012
BrunoCornelsen You May Need To Install These Using Your Terminal.

sudo apt-get update; sudo apt-get install subversion build-essential gettext \
libxi-dev libsndfile1-dev \
libpng12-dev libfftw3-dev \
libopenexr-dev libopenjpeg-dev \
libopenal-dev libalut-dev libvorbis-dev \
libglu1-mesa-dev libsdl1.2-dev libfreetype6-dev \
libtiff4-dev libavdevice-dev \
libavformat-dev libavutil-dev libavcodec-dev libjack-dev \
libswscale-dev libx264-dev libmp3lame-dev python3.2-dev \
libspnav-dev
10:20 February 14th, 2012
2 . mont29 (builder)
Hmm… Do you have any message, when you lunch it from a terminal?

It’s most likely a lib problem :/
04:15 February 14th, 2012
Hello! This build doesnt open in my Ubuntu 64. Any tips? Thanks!
Feeling talkative?
Log in to leave a comment.