Age | Commit message (Collapse) | Author |
|
|
|
Using 'name' for the full path of a file reads badly,
especially when id.name is used in related code.
|
|
AutoPtr class became a sub-class of unique_ptr with some special magic
to mimic behavior of auto_ptr for copy constructor.
The code was already there, but for some reason visual studio did not
set __cplusplus correctly for some reason.
The other change is remove of binary function usage, which is not
needed in the Freestyle code.
|
|
|
|
We plan to use the "blender" namespace in other modules as well.
|
|
|
|
This helped to go beyond the 4GB limit, but is no longer relevant for 64 bit.
|
|
|
|
|
|
|
|
Freestyle would create a huge amount of material slots with the same material,
causing issues in Eevee use of alloca().
|
|
|
|
Surrounding includes with an 'extern "C"' block is not necessary anymore.
Also that made it harder to add any C++ code to some headers, or include headers
that have "optional" C++ code like `MEM_guardedalloc.h`.
I tested compilation on linux and windows (and got help from @LazyDodo).
If this still breaks compilation due to some linker error, the header containing
the symbol in question is probably missing an 'extern "C"' block.
Differential Revision: https://developer.blender.org/D7653
|
|
|
|
Version 6 does not appear to respect clang-format off for header sorting.
|
|
Use BLI_path_ prefix, more consistent names:
BLI_parent_dir -> BLI_path_parent_dir
BLI_parent_dir_until_exists -> BLI_path_parent_dir_until_exists
BLI_ensure_filename -> BLI_path_filename_ensure
BLI_first_slash -> BLI_path_slash_find
BLI_last_slash -> BLI_path_slash_rfind
BLI_add_slash -> BLI_path_slash_ensure
BLI_del_slash -> BLI_path_slash_rstrip
BLI_path_native_slash -> BLI_path_slash_native
Rename 'cleanup' to 'normalize', similar to Python's `os.path.normpath`.
BLI_cleanup_path -> BLI_path_normalize
BLI_cleanup_dir -> BLI_path_normalize_dir
BLI_cleanup_unc -> BLI_path_normalize_unc
BLI_cleanup_unc16 -> BLI_path_normalize_unc16
Clarify naming for extracting, creating numbered paths:
BLI_stringenc -> BLI_path_sequence_encode
BLI_stringdec -> BLI_path_sequence_decode
Part of T74506 proposal.
|
|
This simplifies freestyle render pipeline integration so we don't have to do
much manual ID user management at all. The complexity here was legacy from
Blender Internal.
Based on fix provided by Sybren A. Stüvl.
|
|
Contributed by luzpaz.
Differential Revision: https://developer.blender.org/D7133
|
|
|
|
|
|
|
|
|
|
In practice, references to files rarely have trailing slashes
(by accident). Remove this function in favor of BLI_cleanup_path.
|
|
|
|
This isn't needed with modern compilers.
|
|
|
|
This allows for more flexibility in Compositing compared to the
hardcoded alpha-over that is currently used.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6829
|
|
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
Old Name New Name
========= =========
init_def_material BKE_materials_init
BKE_material_gpencil_default_free BKE_materials_exit
test_object_materials BKE_object_materials_test
test_all_objects_materials BKE_objects_materials_test_all
give_matarar BKE_object_material_array
give_totcolp BKE_object_material_num
give_current_material_p BKE_object_material_get_p
give_current_material BKE_object_material_get
assign_material BKE_object_material_assign
assign_matarar BKE_object_material_array_assign
give_matarar_id BKE_id_material_array
give_totcolp_id BKE_id_material_num
assign_material_id BKE_id_material_assign
clear_matcopybuf BKE_material_copybuf_clear
free_matcopybuf BKE_material_copybuf_free
copy_matcopybuf BKE_material_copybuf_copy
paste_matcopybuf BKE_material_copybuf_paste
BKE_material_init_gpencil_settings BKE_gpencil_material_attr_init
BKE_material_add_gpencil BKE_gpencil_material_add
BKE_material_gpencil_get BKE_gpencil_material
BKE_material_gpencil_default_get BKE_gpencil_material_default
BKE_material_gpencil_settings_get BKE_gpencil_material_settings
|
|
|
|
For Freestyle, it helps to move the struct copy from C++ to C, where the
compiler knows that copying deprecated members is ok.
|
|
|
|
|
|
This is a more correct fix to the issue Brecht was fixing in D6600.
While the fix in that patch worked fine for linking it broke ASAN
runtime under some circumstances.
For example, `make full debug developer` would compile, but trying
to start blender will cause assert failure in ASAN (related on check
that ASAN is not running already).
Top-level idea: leave it to CMake to keep track of dependency graph.
The root of the issue comes to the fact that target like "blender" is
configured to use a lot of static libraries coming from Blender sources
and to use external static libraries. There is nothing which ensures
order between blender's and external libraries. Only order of blender
libraries is guaranteed.
It was possible that due to a cycle or other circumstances some of
blender libraries would have been passed to linker after libraries
it uses, causing linker errors.
For example, this order will likely fail:
libbf_blenfont.a libfreetype6.a libbf_blenfont.a
This change makes it so blender libraries are explicitly provided
their dependencies to an external libraries, which allows CMake to
ensure they are always linked against them.
General rule here: if bf_foo depends on an external library it is
to be provided to LIBS for bf_foo.
For example, if bf_blenkernel depends on opensubdiv then LIBS in
blenkernel's CMakeLists.txt is to include OPENSUBDIB_LIBRARIES.
The change is made based on searching for used include folders
such as OPENSUBDIV_INCLUDE_DIRS and adding corresponding libraries
to LIBS ion that CMakeLists.txt. Transitive dependencies are not
simplified by this approach, but I am not aware of any downside of
this: CMake should be smart enough to simplify them on its side.
And even if not, this shouldn't affect linking time.
Benefit of not relying on transitive dependencies is that build
system is more robust towards future changes. For example, if
bf_intern_opensubiv is no longer depends on OPENSUBDIV_LIBRARIES
and all such code is moved to bf_blenkernel this will not break
linking.
The not-so-trivial part is change to blender_add_lib (and its
version in Cycles). The complexity is caused by libraries being
provided as a single list argument which doesn't allow to use
different release and debug libraries on Windows. The idea is:
- Have every library prefixed as "optimized" or "debug" if
separation is needed (non-prefixed libraries will be considered
"generic").
- Loop through libraries passed to function and do simple parsing
which will look for "optimized" and "debug" words and specify
following library to corresponding category.
This isn't something particularly great. Alternative would be to
use target_link_libraries() directly, which sounds like more code
but which is more explicit and allows to have more flexibility
and control comparing to wrapper approach.
Tested the following configurations on Linux, macOS and Windows:
- make full debug developer
- make full release developer
- make lite debug developer
- make lite release developer
NOTE: Linux libraries needs to be compiled with D6641 applied,
otherwise, depending on configuration, it's possible to run into
duplicated zlib symbols error.
Differential Revision: https://developer.blender.org/D6642
|
|
This accesses PYTHONPATH directly, ignoring Py_IgnoreEnvironmentFlag.
Remove since it's not used.
|
|
|
|
Extend options are currently stored per curve. This was not clearly
communicated to the user and they expected this to be a setting per
CurveMapping.
This change will move the option from `Curve` to `CurveMapping`. In
order to support this the API had to be changed.
BPY: CurveMap.evaluate is also moved to CurveMapping.evaluate what
breaks Python API. Cycles has been updated but other add-ons have
not. After release of 2.81 we can merge this to master and adapt
the add-ons.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D6169
|
|
|
|
The goal is to make it possible to access evaluated datablocks at a
corresponding context. For example, be able to check evaluated state
if an object used for rendering.
Allows to write scripts in a safe manner for T63548 and T60094.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5726
|
|
Currently unused, but will allow to keep of an owner of the depsgraph.
Could also simplify other APIs in the future by avoiding to pass bmain
explicitly to relation update functions and things like that.
|
|
|
|
Preparing for the bigger changes which will be related on passing
dependency graph to various callbacks which need it.
Differential Revision: https://developer.blender.org/D5725
|
|
In its current version that was a totally useless extra layer of crap
that we can totally avoid. Plus name was bad too.
|
|
|
|
reference."
This reverts commits 54fd8176d7e91, 4c5becb6b1 and 8f578150e.
Those kind of commits must be reviewed and approved by project owners.
That one:
* Broke Collada building by not properly updating all calls to modified
function.
* Broke *whole* ID management by not properly updating library_query.c.
And in general, I am strongly against backward ID pointers, those are
*always* a serious PITA for ID management. Sometimes they cannot be
avoided, but in general other ways to get that kind of info should be
investigated first.
|
|
|
|
|
|
|
|
|