Age | Commit message (Collapse) | Author |
|
The default material was missing its init code.
|
|
|
|
defined on the mesh.
Build a temp matarray storing materials from obdata and source object
(depending on slots 'allocation' of source object), and assign those to
targets.
Also remove limitation of 'using same obdata is forbidden', just never
edit obdata materials in that case...
Certainly not perfect, but already much better than existing code.
|
|
|
|
|
|
|
|
The old values did not display a valid gradient by default.
|
|
|
|
This fix the issue by introducing a default material only for collection
holdouts. This avoids hash colision when the same material is used in
collections without holdout enabled.
|
|
Reviewers: mont29
Differential Revision: https://developer.blender.org/D7476
|
|
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
|
|
The `BKE_animsys.h` and `anim_sys.c` files already had a an "AnimData
API" section. The code in that section has now been split off, and
placed into `BKE_anim_data.h` and `anim_data.c`.
All files that used to include `BKE_animsys.h` have been adjusted to
only include the animation headers they need (sometimes none).
No functional changes.
|
|
This is now replaced by draw engine and annotations don't use fill.
|
|
|
|
Only the volume object is exposed in the user interface. It is based on OpenVDB
internally. Drawing and rendering code will follow in another commit.
https://wiki.blender.org/wiki/Source/Objects/Volume
https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Volumes
Hair and PointCloud object types are hidden behind a WITH_NEW_OBJECT_TYPES
build option. These are unfinished, and included only to make it easier to
cooperate on development in the future and avoid tricky merges.
https://wiki.blender.org/wiki/Source/Objects/New_Object_Types
Ref T73201, T68981
Differential Revision: https://developer.blender.org/D6945
|
|
This has been long standing TODO...
Note that remaining usages of BKE_xxx_delete should all be carefully
checked for and utilmately nuked in favor of `BKE_id_delete()`, think we
still have quiet a few bugs hidden in those (code seems to usually
assume those functions do a full ID deletion, which is not the case).
|
|
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes.
Also, a huge code cleanup has been done at all levels.
Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development.
Differential Revision: https://developer.blender.org/D6293
|
|
|
|
|
|
- Use 'BKE_object_material_*', 'BKE_id_material_*' prefix
for functions that operate on Object and ID types.
- Use '_len' suffix for length (matching BLI naming).
- Use '_p' suffix for functions that return a pointer to values
where the value would typically be returned.
Functions renamed:
- BKE_object_material_resize was BKE_material_resize_object
- BKE_object_material_remap was BKE_material_remap_object
- BKE_object_material_remap_calc was BKE_material_remap_object_calc
- BKE_object_material_array_p was BKE_object_material_array
- BKE_object_material_len_p was BKE_object_material_num
- BKE_id_material_array_p was BKE_id_material_array
- BKE_id_material_len_p was BKE_id_material_num
- BKE_id_material_resize was BKE_material_resize_id
- BKE_id_material_append was BKE_material_append_id
- BKE_id_material_pop was BKE_material_pop_id
- BKE_id_material_clear was BKE_material_clear_id
|
|
Instead of using anonymous booleans flags, also allows to keep the same
behavior in all cases, without needing special handling from calling
code for our beloved oddballs object proxies...
|
|
This info is now stored in ID tags themselves, so no need to pass an
extra anonymous boolean parameter around, yay!
|
|
Also removed some only used locally from the header, `BKE_lib_id.h`
is already way too big, no need to overload it with unused things.
|
|
This didn't break anything, but could in the future.
|
|
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
|
|
list is empty
The problem was the draw function tried to use the material and gpsettings and both were NULL.
Now, the default material is used.
|
|
Private ID data (nodetrees and scene collections...) need special care
and handling of their copy flags, and checks must be adapted too.
In that case, issue came from the fact that even though those IDs have
to be copied outside of bmain, we may still require usercount handling.
That commit also fixes a somewhat related issue - we cannot use the
non-id private data copying flag for private IDs copying, due to
difference in handling of usercount again.
|
|
|
|
copy functions.
Not sure exactly why that was working with nodetrees in depsgraph (could be some special
code in the despgraph), but we always want to allocate memory for the nodetrees here!
|
|
|
|
When a material slot is empty, the default material is used.
The default color used is Gray to get a good contrast in dense scenes with dark and white background.
Reviewers: brecht, dfelinto, mendio, pepeland
Differential Revision: https://developer.blender.org/D5625
|
|
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.
|
|
|
|
The `BKE_material_pop_id()` and `BKE_material_clear_id()` functions had
a parameter `update_data` that, when `false`, would cause the mesh polys
to keep their material index, even when the indexed material slots were
removed. This behaviour was never used in the C code and not supported
by the drawing code, making polygons disappear and causing crashes. The
Python binding in RNA, however, defaulted to `update_data=False`.
This commit removes the `update_data` parameter altogether, and makes
the functions always fix up the material indices.
Reviewed by: mont29, brecht
|
|
|
|
Reviewers: campbellbarton, brecht
Reviewed By: brecht
Subscribers: brecht
Differential Revision: https://developer.blender.org/D4991
|
|
The `BKE_material_clear_id()` didn't call `test_all_objects_materials()`,
which caused the object and mesh material slot count to go out of sync.
|
|
node_groups don't remain active
Unlike `fill_texpaint_slots_recursive`, `rna_Material_active_paint_texture_index_update` did not search for texture nodes that are inside node groups.
Reviewers: sergey, psy-fi, zeddb, brecht
Subscribers: brecht
Differential Revision: https://developer.blender.org/D5338
|
|
assigned to it
This was a design decision, but now we have decided to change it using the active material for the strokes using deleted material.
If the material slot is empty a new material is created to keep the strokes visible.
|
|
Differential Revision: https://developer.blender.org/D4939
|
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
This makes it easier to exclude a surface from casting shadows and can be
used to manipulate the shadows even for opaque surfaces.
Versionning ensure that old behavior is transfered to new rendering logic.
|
|
Using GP_BRUSH_MATERIAL_PINNED to switch between active material and brush material, instead of updating all brushes on active material changes. This will allow brushes to have no material and therefore to not inflate the user count.
This fix T62465.
Patch contributed by @matc
Reviewers: @brecht @antoniov @billreynish @mendio
|
|
This was already supported for Cycles shader nodes, but now also works for
Eevee and compositing nodes. Instead of a generic NodeCustomGroup, now
there is ShaderNodeCustomGroup and CompositorNodeCustomGroup that can be
subclassed and registered.
Differential Revision: https://developer.blender.org/D4370
|
|
Use the term "AFTER" instead of "OFS" since it wasn't obvious these
macros operate on everything after the struct member passed.
Avoid casting to non-const types when only reading.
|