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
2022-08-25Fix T100255: Make RigidBodyWorld (and effector_weights) collections refcounted.Bastien Montagne
Those collections were so far mainly just tagged as fake user (even though a few places in code already incremented usercount on them). Since we now clear the fakeuser flag when linking/appending data, ensure that these collections are preserved by making these usages regular ID refcounting ones. Reviewed By: brecht Differential Revision: https://developer.blender.org/D15783
2022-05-25Cleanup: Add more const'ness to RNA API.Bastien Montagne
This commit makes PointerRNA passed to RNA path API const. Main change was in the `path` callback for RNA structs, and indirectly the `getlength` callback of properties.
2022-05-05UI: Sort Force Field enums alphabeticallyPablo Vazquez
For consistency with the rest of Blender. * Use a blank icon for "None" type, so the label aligns with the rest. * Use "None" instead of "Nothing" for Kink type dropdown entry.
2022-04-04Cleanup: spelling in commentsCampbell Barton
2022-04-01Fix T96930: Cloth Disk cache not being saved and being deleted on files that ↵Bastien Montagne
have been linked and library override enabled. PointCache handing is just horrible from RNA, makes dealing with overrides a nightmare... Ended up having to add a specific 'apply' callback for the `use_disk_cache` property, that would explicitely NOT call the the `update` callback of this property, to avoid having the whole disk cache nuked away... But the whole thing remains fairly britle, to say the least.
2022-04-01Fix T96931: Crash on load with library overrides + multiple cloth cache slots.Bastien Montagne
Not really clear why that would only show with multiple caches... But point cache system is beyond brittle anyway. This fix solves the issue at two different levels: * General safety check in `rna_Cache_info_length` that we do get a valid `pid`. * Forbid usage of this `PointCache.info` RNA property in any diffing/LibOverride processing (since it's by definition runtime, volatile data).
2022-02-18Cleanup: Rename original curve object type enumHans Goudey
This commit renames enums related the "Curve" object type and ID type to add `_LEGACY` to the end. The idea is to make our aspirations clearer in the code and to avoid ambiguities between `CURVE` and `CURVES`. Ref T95355 To summarize for the record, the plans are: - In the short/medium term, replace the `Curve` object data type with `Curves` - In the longer term (no immediate plans), use a proper data block for 3D text and surfaces. Differential Revision: https://developer.blender.org/D14114
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-01-03Allow overrides for cloth, collision and force field properties.Alexander Gavrilov
Allow overriding simple properties of cloth simulations, colliders and force fields. Vertex group and shape key selectors in cloth are still not overridable since they are tied to mesh data. Force fields have a number of physical fields shared between multiple RNA fields. Until they are decoupled, they will produce redundant overrides, and cannot have different hard range limits. Differential Revision: https://developer.blender.org/D13710
2021-11-09Cleanup: clang-formatCampbell Barton
2021-11-03Add documentation for some 'hidden' RNA properties.Bastien Montagne
Even never-shown RNA properties should have at least a description, as this is used by API doc generation scripts. NOTE: this is more of an opportunistic set of changes than a proper complete fix of that loack of documentation.
2021-09-24Cleanup: spelling in commentsCampbell Barton
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-04-08Cleanup: spellingCampbell Barton
2021-04-06Fix T84623: Curve/Surface force not working in normal directionPhilipp Oeser
Tweaking e.g. a field strength would then not use the curve/surface normal anymore [but the object center instead]. If a curve has a forcefield with effector shape Curve (in code its shape is PFIELD_SHAPE_SURFACE then), it wil get a SurfaceModifier. Changing properties will free the SurfaceModifierData's bvhtree and mesh And these dont get copied along when doing the CoW copy, these are explicitly set to NULL. So this was also failing for meshes, not just curves. Without the mesh & bvhtree though, get_effector_data() will not set the EffectorData's normal correctly (it is closest_point_on_surface() which does this). And without the right EffectorData's normal, the effector will of course work unexpected. Going in and out of editmode made this work because that goes down this route: - BKE_object_handle_data_update - BKE_displist_make_curveTypes - do_makeDispListCurveTypes - curve_calc_modifiers_post -- BKE_mesh_new_nomain_from_curve_displist -- we then have our desired updated mesh from the curve -- this will also call the SurfaceModifiers deformVerts [which - given we have a valid mesh - will update the bvhtree properly] Also note that _animating_ the effector actually works, (have not done the deep dive why this works, assume the curve geometry is updated in this case) So, now just carefully tag the curve ID_RECALC_GEOMETRY in rna_FieldSettings_update for this specific case. Maniphest Tasks: T84623 Differential Revision: https://developer.blender.org/D10092
2021-01-11Collision: allow disabling collision without removing the modifier.Alexander Gavrilov
The `object.collision.use` flag was treated as a redundant marker of the existence of the modifier, going as far as adding/removing it when the value was changed, which is not actually very useful. Removing the modifier loses its position in the stack, and requires a dependency graph rebuild. It feels it may be a legacy flag? What would be useful however is the ability to toggle collisions dynamically without removing the modifier. This patch adjusts the code to keep the modifier when the flag is disabled, and add it if it doesn't exist when the flag is enabled. The modifier now checks the flag at the start and quickly exits after cleaning up stale data. The redesigned setting is exposed in the UI. Collisions can't be disabled by simply using the modifier enable flags because the modifier merely saves a snapshot of the mesh at a certain point of the modifier stack for other objects to use, and thus has to be able to clear the stale data. Differential Revision: https://developer.blender.org/D10064
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
2020-12-11Cleanup: clang-formatHarley Acheson
Forgot to run Make Format on recent spelling changes
2020-12-11UI: Use 'and' Instead of '&' in DescriptionsYevgeny Makarov
Use 'and' instead of ampersand in descriptions and comments. Differential Revision: https://developer.blender.org/D9797 Reviewed by Aaron Carlisle
2020-12-10Cleanup: rename BLI_strescape to BLI_str_escapeCampbell Barton
Prepare for `BLI_str_unescape` which doesn't read well without the separator.
2020-11-26Fix T82729: Crash in rna_EffectorWeight_path when object has fluid andPhilipp Oeser
dynamic paint modifiers Looks like prior to the introduction of mantaflow, the former SmokeModifierData always had a domain initialized (even if its type was set to None). Since mataflow, the FluidModifierData type needs to be set to MOD_FLUID_TYPE_DOMAIN (otherwise domain is invalid) Maniphest Tasks: T82729 Differential Revision: https://developer.blender.org/D9644
2020-11-18Cleanup: remove break after return statementsCampbell Barton
2020-11-13LibOverride: Make PointCache RNA properties overridable.Bastien Montagne
Note that due to convoluted layout of point caches in RNA (active one also storing list of all available ones), we'll often have the pointcache overrides rules twice. Should not be a huge problem, practically speaking. Part of first step of T82503: support disk cache in liboverrides.
2020-11-04UI: Replace uses of "loc/rot" with full wordsNathan Craddock
Use "Rotation" in place of "Rot" for the rotation header text. Cleanup various RNA titles and tooltips. Differential Revision: https://developer.blender.org/D9457
2020-09-17Fix T80131: Rigid Body World Field Weights dont have a proper RNA pathPhilipp Oeser
(e.g. cannot be animated) An RNA path is mandatory for RNA_path_from_ID_to_property, and for EffectorWeights, this has to be provided using RNA_def_struct_path_func (since this struct is shared across ParticleSettings, Modifiers and Rigid Body World). Without this, the animation system cannot work and e.g. keyframes cannot be inserted. The case for Rigid Body World in rna_EffectorWeight_path was missing, now added. Rigid Body World Field Weights are capable of being animated, tested with file from T80131 (e.g. gravity, wind). Maniphest Tasks: T80131 Differential Revision: https://developer.blender.org/D8713
2020-08-30UI: Use term "Plasticity" instead of "Plastic"Aaron Carlisle
2020-08-13Fix T79653: Change soft min frame start of cache from 1 to 0Jacques Lucke
It was always possible to set it to zero by typing in the value. This new soft limit is more consistent with the fluid cache and the Scene.frame_start property.
2020-07-28Fix T79264: Mantaflow Field weights cannot be animatedPhilipp Oeser
rna_EffectorWeight_path() needs to point to "domain_settings" (instead of "settings"), was a missing change when switching the FluidModifier to mantaflow. Maniphest Tasks: T79264 Differential Revision: https://developer.blender.org/D8398
2020-07-09Fix T78718: Crash when deleting particle system modifier with the X Shortcut.Bastien Montagne
Duplication and deletion code of modifiers was totally wrong for particle system, that special weird thing needs its own custom management. Note that for now I chose not to duplicate the particle settings ID when duplicating the modifier...
2020-07-03Cleanup: Fluid renaming from old 'manta' naming to new 'fluid' namingSebastián Barschkis
Changed variable names from mmd, mds, mfs, and mes to fmd, fds, ffs, and fes. The author of this commits lights a candle for all the merge conflicts this will cause.
2020-06-19Cloth: allow forces to act parallel to cloth.Alexander Gavrilov
Currently all force effectors can only act on cloth when the force is perpendicular to the surface. This makes sense for wind, but not for other forces; and the user may want even wind to have some friction. This changes effector code to output two force vectors - although you of course can pass the same pointer for both. The force is split between the two outputs based on a new per-effector setting. Differential Revision: https://developer.blender.org/D8017
2020-06-09Cleanup: Move pointcache dna to separate fileJacques Lucke
Reviewers: brecht Differential Revision: https://developer.blender.org/D7965
2020-05-14Fluid: Rename smoke flow forces to fluid flow forcesSebastián Barschkis
Better to use more general term since in theory these forces can be used for smoke and liquid.
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-03-24Fix T64573: RNA_path_from_ID_to_property fails for pointcachesPhilipp Oeser
Give pointcaches a proper path function which e.g. also resolves ALT+click (assign to all selected) not working for anything relating to pointcaches. This also cleans up the usage of the 'eModifierTypeFlag_UsesPointCache' flag (removed from the boolean modifier, added to the softbody modifier). Maniphest Tasks: T64573 Differential Revision: https://developer.blender.org/D7115
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2019-12-16Mantaflow [Part 6]: Updates in /blender/sourceSebastián Barschkis
A collection of smaller changes that are required in the /blender/source files. A lot of them are also due to variable renaming. Reviewed By: sergey Maniphest Tasks: T59995 Differential Revision: https://developer.blender.org/D3855
2019-11-05Fix T68396: Unable to change any Collision input value after it has been ↵Philipp Oeser
keyframed 'rna_CollisionSettings_update' has a history of tagging ob for update: rB79312c1912b4 ID_RECALC_TRANSFORM |ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION rBf90a2123eedc OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME rBfaf1c9a4bb27 OB_RECALC_ALL rB7df35db1b136 OB_RECALC Since the meaning of OB_RECALC_TIME/ID_RECALC_ANIMATION changed a bit historically (from "please update my animation if the animation datablock is tagged for update" to "update animation of this datablock") this was now always overwriting user edit with animated values, making it impossible to change those values once animated. Thx @sergey for guidance! Maniphest Tasks: T68396 Differential Revision: https://developer.blender.org/D6113
2019-09-20UI: Fix CapitalizationYevgeny Makarov
Differential Revision: https://developer.blender.org/D5716
2019-08-30Cleanup: clang-format, spellingCampbell Barton
2019-08-29Fix T69267: Missing Boids force field tooltipAaron Carlisle
2019-08-26Fix T69156: Blender crash when baking rigid body world.Bastien Montagne
Issue was exposed by recent own rB03bf84db86b commit, but was actually present in RNA API for PointCaches since (probably) ages: whole accessor code here was assuming that owner ID was an Object, when it is actually a scene for RigidBody simulations... Had also to make `BKE_ptcache_id_find()` and friends a bit more flexible, now they also accept a NULL object pointer parameter...
2019-08-24UI: Various tooltip corrections and fixesWilliam Reynish
Patch by Yevgeny Makarov (jenkm) Differential Revision: D5514
2019-08-23RNA: Cleanup PointerRNA structJacques Lucke
The old layout of `PointerRNA` was confusing for historic reasons: ``` typedef struct PointerRNA { struct { void *data; } id; struct StructRNA *type; void *data; } PointerRNA; ``` This patch updates it to: ``` typedef struct PointerRNA { struct ID *owner_id; struct StructRNA *type; void *data; } PointerRNA; ``` Throughout the code base `id.data` was replaced with `owner_id`. Furthermore, many explicit pointer type casts were added which were implicit before. Some type casts to `ID *` were removed. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D5558
2019-08-16Cleanup: spellingCampbell Barton
2019-08-13Fix T66373: Strange translation text behaviour.Bastien Montagne
i18n code does not work from threads on some plaforms, so it is disabled in Blender when called from non-main thread. Means that we have to go to a slightly different approach, with dirty tag and generating string on request for UI. Note: Also had to update the `info` string size, to fit with expensive asiatic scripts in utf-8... Using mem for that kind of runtime data is not really nice, but for now it will have to do.
2019-07-17Fix T67115: Changing the Shape of a Force Field object does not refresh the ↵mano-wii
animation
2019-06-03Cleanup: style, use braces in RNACampbell Barton