Age | Commit message (Collapse) | Author |
|
|
|
|
|
This is for internal CAPI use only, avoid confusion w/ bpy.utils module.
|
|
This was meant to be used for less general macros but was never used.
Rename BKE_BIT_TEST_SET to SET_FLAG_FROM_TEST
|
|
BKE_libblock_... API.
|
|
|
|
Use BPY_execute_* prefix for all Python execution commands
|
|
|
|
The reported crash case seems to be caused by freeing compiled Python
objects in a thread. Now this issue is avoided by allocating a buffer to
store a Python script and using BPY_string_exec() to run the script. This
makes it unnecessary to repeatedly create and destroy Text data blocks.
Many thanks to Campbell Barton for his help on the bug fix.
|
|
This module is intended for path manipulation functions
but had utility functions added to access various directories.
|
|
|
|
|
|
These qualifiers were leftovers of the stand alone Freestyle program and not used
(set to an empty string) in Blender for years.
|
|
|
|
(See commit e1771e72fbbf828dbf5bed871b814288389f3611 for more detail of
the problem).
Fixed for #include <Python.h> not properly put in the extern "C" { ... } construct.
Also removed redundant inclusion of the header file in the Freestyle Python API code.
|
|
The issue was caused by including both Python.h and BLI_math.h. Since the macro
definition in Python.h was unconditional, it was necessary to include it first and then
BLI_math.h.
Addressing the issue turned out to affect many Freestyle source files. There were several
other coding flaws that complicated the situation:
1. intern/system/FreestyleConfig.h was abused just to include BLI_math.h which was in
fact unnecessary in FreestyleConfig.h. While addressing this, inclusion of both math.h
and BLI_math.h had to be duly dealt with to avoid a compiler error about round().
2. #include <Python.h> was not properly put in the extern "C" { ... } construct.
3. intern/view_map/Interface0D.h and intern/python/Director.h, both of which included
Python.h, were included from within Freestyle header files that were almost or completely
independent of Python. These non-Python header files were used everywhere in the
Freestyle code base, causing many cases of the reported macro redefinitions.
4. The Director.h file was also declaring 'using namespace Freestyle', which was causing
another scope issue in several Freestyle header files.
This commit is intended to address the first problem above. Subsequent commits will deal
with the other three.
|
|
Addition of the path to the Freestyle Python API modules to 'sys.path' was delayed until
the first Freestyle rendering, so that any import attempt of the modules in the Python
Console always failed. Now the update of 'sys.path' is done at Blender start-up.
This allows the Freestyle-specific modules to be imported without running Freestyle,
facilitating quick interactive testing in the Console.
|
|
compile with those enabled.
|
|
source/blender ;)
|
|
This gives undefined behavior - in my case stays the same value and crashes.
Check for finite input resolves the issue.
|
|
|
|
|
|
|
|
|
|
There were two issues:
- Line visibility computations are very slow in the case of the provided .blend file, which gave
an impression that the rendering process got stuck. The slowness can be explained by the present
data structures used for the line visibility computations, together with the specific mesh distribution
of the test scene. At the moment Freestyle uses a regular grid in the 2D image coordinate system
to divide tris/quads into small groups in order to accelerate the line visibility computations.
On the other hand, the test scene is populated a big plane (made of one quad) and a moderately
detailed mesh object (22K tris). The scale of the latter mesh is animated from nearly zero to
about 0.2 to make the object show up over time. When the scale is nearly equal to zero, all the
tris concentrate in one grid cell, so essentially there is no performance gain from the grid data
structure optimized for speed. It looks like a better grid data structure (possibly based on
adaptive grid refinement) is necessary to genuinely address the identified performance issue. For now
the progress bar of Blender is employed to better inform users of the amount of work done in the line
visibility computations.
- A crash was caused by an excessive memory allocation request. The X and Y dimensions of the grid
data structure are determined based on the average area of mesh faces in the given scene. When the big
plane in the test scene is excluded from the rendering, the average area is almost zero (on the order
of 1e-5). As a result of this extremely small average area, the X and Y dimensions were set to a very
large number, causing a fatal memory allocation error. The present revision has introduced a hard
upper limit to the dimensions of the grid data structure to avoid this kind of numerical instability.
|
|
|
|
|
|
|
|
Just removed all calls of StringUtils::toAscii() as well as the function definitions.
|
|
|
|
This means main database is no longer pollutes with
temporary scene and objects needed for freestyle
render.
Actually, there're few of separated temporary mains
now. Ideally it's better to use single one, but it's
not so much trivial to pass it to all classes. Not
so big deal actually.
Required some changes to blender kernel, to make it
possible to add object to a given main, also to
check on mesh materials for objects in given main.
This is all straightforward changes.
As an additional, solved issue with main database
being infinitely polluted with text blocks created
by create_lineset_handler function.
This fixes:
- #35003: Freestyle crashes if user expands objects in FRS1_Scene
- #35012: ctrl+f12 rendering crashes when using Freestyle
|
|
A crash in the Freestyle renderer was reported by Ton on IRC with a stack trace
below. Note that #2 is in Freestyle, whereas #1 is in the compositor. The problem
was observed in a debug build on OS X 10.7 (gcc 4.2, openmp disabled, no llvm).
----------------------------------------------------------------------
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
[Switching to process 72386 thread 0xf303]
0x0000000100c129f3 in NodeBase::~NodeBase (this=0x10e501c80) at COM_NodeBase.cpp:43
43 delete (this->m_outputsockets.back());
Current language: auto; currently c++
(gdb) where
#0 0x0000000100c129f3 in NodeBase::~NodeBase (this=0x10e501c80) at COM_NodeBase.cpp:43
#1 0x0000000100c29066 in Node::~Node (this=0x10e501c80) at COM_Node.h:49
#2 0x000000010089c273 in NodeShape::~NodeShape (this=0x10e501c80) at NodeShape.cpp:43
#3 0x000000010089910b in NodeGroup::destroy (this=0x10e501da0) at NodeGroup.cpp:61
#4 0x00000001008990cd in NodeGroup::destroy (this=0x10e5014b0) at NodeGroup.cpp:59
#5 0x00000001008990cd in NodeGroup::destroy (this=0x114e18da0) at NodeGroup.cpp:59
#6 0x00000001007e6602 in Controller::ClearRootNode (this=0x114e19640) at Controller.cpp:329
#7 0x00000001007ea52e in Controller::LoadMesh (this=0x114e19640, re=0x10aba4638, srl=0x1140f5258) at Controller.cpp:302
#8 0x00000001008030ad in prepare (re=0x10aba4638, srl=0x1140f5258) at FRS_freestyle.cpp:302
#9 0x000000010080457a in FRS_do_stroke_rendering (re=0x10aba4638, srl=0x1140f5258) at FRS_freestyle.cpp:600
#10 0x00000001006aeb9d in add_freestyle (re=0x10aba4638) at pipeline.c:1584
#11 0x00000001006aceb7 in do_render_3d (re=0x10aba4638) at pipeline.c:1094
#12 0x00000001006ae061 in do_render_fields_blur_3d (re=0x10aba4638) at pipeline.c:1367
#13 0x00000001006afa16 in do_render_composite_fields_blur_3d (re=0x10aba4638) at pipeline.c:1815
#14 0x00000001006b04e4 in do_render_all_options (re=0x10aba4638) at pipeline.c:2021
----------------------------------------------------------------------
Apparently a name conflict between the two Blender modules is taking place.
The present commit hence intends to address it by putting all the Freestyle C++
classes in the namespace 'Freestyle'. This revision will also prevent potential
name conflicts with other Blender modules in the future.
Special thanks to Lukas Toenne for the help with C++ namespace.
|
|
|
|
this can be added back on case-by-case basis, but better not assume ownership of another projects work by default.
|
|
|
|
Conflicts resolved:
release/datafiles/startup.blend
release/scripts/startup/bl_ui/properties_render.py
source/blender/SConscript
source/blender/blenloader/intern/readfile.c
|
|
on the console during Freestyle rendering. The debug prints are turned off
by default now. Errors are still printed on the console.
A patch set implementing this functionality was provided by Bastien Montagne.
Many thanks! :)
|
|
again!
|
|
Reported by Bastien Montagne, thanks!
|
|
Patch contribution by Bastien Montagne, thanks!
|
|
This commit is meant to improve the response of the ESC key for stopping Freestyle rendering
throughout the rendering process. The rendering with Freestyle consists of several steps
including: (1) mesh data loading, (2) winged edge construction, (3) silhouette edge detection,
(4) view map construction, and (5) stroke drawing. All these steps have been extended to
frequently check if the ESC key is pressed, so that users can abort time-consuming rendering
at any point of time.
|
|
Conflicts resolved:
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/makesrna/intern/rna_scene.c
Additional changes:
* Fix for recent changes of BKE_* function renaming.
* Fix for an "attempt to free NULL pointer" in BlenderStrokeRenderer::RenderStrokeRepBasic().
|
|
* View map calculation has been intensively optimized for speed by
means of:
1) new spatial grid data structures (SphericalGrid for perspective
cameras and BoxGrid for orthographic cameras; automatically switched
based on the camera type);
2) a heuristic grid density calculation algorithm; and
3) new line visibility computation algorithms: A "traditional"
algorithm for emulating old visibility algorithms, and a "cumulative"
algorithm for improved, more consistent line visibility, both exploiting
the new spatial grid data structures for fast ray casting.
A new option "Raycasting Algorithm" was added to allow users to choose
a ray casting (line visibility) algorithm. Available choices are:
- Normal Ray Casting
- Fast Ray Casting
- Very Fast Ray Casting
- Culled Traditional Visibility Detection
- Unculled Traditional Visibility Detection
- Culled Cumulative Visibility Detection
- Unculled Cumulative Visibility Detection
The first three algorithms are those available in the original
Freestyle (the "normal" ray casting was used unconditionally, though).
The "fast" and "very fast" ray casting algorithms achieve a faster
calculation at the cost of less visibility accuracy.
The last four are newly introduced optimized options. The culled
versions of the new algorithms will exclude from visibility
calculation those faces that lay outside the camera, which leads to a
faster view map construction. The unculled counterparts will take all
faces into account. The unculled visibility algorithms are useful
when culling affects stroke chaining.
The recommended options for users are the culled/unculled cumulative
visibility algorithms. These options are meant to replace the old
algorithms in the future.
Performance improvements over the old algorithms depend on the scenes
to be rendered.
* Silhouette detection has also been considerably optimized for speed.
Performance gains by this optimization do not depend on scenes.
* Improper handling of error conditions in the view map construction
was fixed.
|
|
Conflicts resolved:
source/creator/creator.c
source/blender/python/intern/bpy.c
|
|
Conflicts resolved:
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/animation/keyframes_edit.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/space_nla/nla_channels.c
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_scene.c
API changes resolved:
source/blender/freestyle/intern/system/PythonInterpreter.h
|
|
The PseudoNoise class for generating a series of noise values had a bug
involving a signed integer overflow when renders were at high image resolution.
This caused the noise generator to yield very large noise values, putting
strokes out of the renders' image boundary.
|
|
|
|
Parameter Editor mode. This is a WIP commit. Only the base line
color, base alpha transparency, and base line thickness are respected.
More additions are anticipated to account for other parameters.
* Added FRS_finish_stroke_rendering() to clean Freestyle-related
temporary resources after stroke rendering.
* Some functions in FRS_freestyle.cpp are now declared as static
functions, so as not to mess up the program-wide name space.
* Made the StyleModule class inheritable, and defined new subclass
BlenderStyleModule that takes a Text object instead of a file name.
|
|
of _POSIX_C_SOURCE and _XOPEN_SOURCE. There are no functional changes.
Tested with GCC 4.4.1 on Ubuntu 9.10 (karmic).
|
|
to redefinition of M_PI.
|