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
2018-06-19Particles: Add utility function to copy particles from one system to anotherSergey Sharybin
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for blenkernelCampbell Barton
2018-06-14Cleanup: styleCampbell Barton
2018-06-13Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/blenkernel/intern/blendfile.c source/blender/blenkernel/intern/node.c source/blender/blenkernel/intern/particle.c
2018-06-13Cleanup: remove more G.main from BKE area.Bastien Montagne
2018-06-12Particle: Use loclaized RNG for physics simulationSergey Sharybin
Avoids threading conflicts between multiple particle systems being simulated.
2018-06-07Particle edit: Simplify code by benefiting from single edit contextSergey Sharybin
Makes ADD brush to work. At some point children particles draw got broken, children are not visible for until first stroke is done. Still looking into it.
2018-06-04Merge branch 'master' into blender2.8Campbell Barton
2018-06-04Particle System: move data creation into RNA updateCampbell Barton
Relying on evaluation to initialize data causes issues w/ 2.8.
2018-05-31Cleanup: remove G.main from BKE modifier.Bastien Montagne
2018-05-26Fix T55207, fix T55208: hair not positioned correctly after subsurf.Brecht Van Lommel
The problem was that the particle system modifier was reading ob->derivedDeform during modifier stack evaluation. Due to the mesh -> DM conversion this was no longer set leading to wrong results. In fact we don't really need the deformed mesh, just the original mesh topology for face/poly index remapping. So the solution is to use that instead.
2018-05-16Particle System: ported most DerivedMesh → MeshSybren A. Stüvel
There are a few places where DerivedMesh is still used, most notably when calling the (not yet ported) cloth simulation. There is also still the use of Object.derivedDeform and Object.derivedFinal. Those places are marked with a TODO. Some functions in the editors module were copied to accept Mesh. Those already had 'mesh' in the name; the copies are suffixed with '__real_mesh' for easy renaming later when the DM-based functionality is removed.
2018-05-15Particle edit: Need to check DONE flag from evaluated psysSergey Sharybin
2018-05-15Depsgraph: Keep track of original particle systemSergey Sharybin
Allows to have quicker lookup in particle edit mode.
2018-04-19Remove Blender Internal and legacy viewport from Blender 2.8.Ton Roosendaal
Brecht authored this commit, but he gave me the honours to actually do it. Here it goes; Blender Internal. Bye bye, you did great! * Point density, voxel data, ocean, environment map textures were removed, as these only worked within BI rendering. Note that the ocean modifier and the Cycles point density shader node continue to work. * Dynamic paint using material shading was removed, as this only worked with BI. If we ever wanted to support this again probably it should go through the baking API. * GPU shader export through the Python API was removed. This only worked for the old BI GLSL shaders, which no longer exists. Doing something similar for Eevee would be significantly more complicated because it uses a lot of multiplass rendering and logic outside the shader, it's probably impractical. * Collada material import / export code is mostly gone, as it only worked for BI materials. We need to add Cycles / Eevee material support at some point. * The mesh noise operator was removed since it only worked with BI material texture slots. A displacement modifier can be used instead. * The delete texture paint slot operator was removed since it only worked for BI material texture slots. Could be added back with node support. * Not all legacy viewport features are supported in the new viewport, but their code was removed. If we need to bring anything back we can look at older git revisions. * There is some legacy viewport code that I could not remove yet, and some that I probably missed. * Shader node execution code was left mostly intact, even though it is not used anywhere now. We may eventually use this to replace the texture nodes with Cycles / Eevee shader nodes. * The Cycles Bake panel now includes settings for baking multires normal and displacement maps. The underlying code needs to be merged properly, and we plan to add back support for multires AO baking and add support to Cycles baking for features like vertex color, displacement, and other missing baking features. * This commit removes DNA and the Python API for BI material, lamp, world and scene settings. This breaks a lot of addons. * There is more DNA that can be removed or renamed, where Cycles or Eevee are reusing some old BI properties but the names are not really correct anymore. * Texture slots for materials, lamps and world were removed. They remain for brushes, particles and freestyle linestyles. * 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and other renderers use this to find all panels to show, minus a few panels that they have their own replacement for.
2018-04-16Depsgraph: remove EvaluationContext, pass Depsgraph instead.Brecht Van Lommel
The depsgraph was always created within a fixed evaluation context. Passing both risks the depsgraph and evaluation context not matching, and it complicates the Python API where we'd have to expose both which is not so easy to understand. This also removes the global evaluation context in main, which assumed there to be a single active scene and view layer. Differential Revision: https://developer.blender.org/D3152
2018-04-13Python API: remove preview/render resolution settings from API functions.Brecht Van Lommel
For correct results these must have been set already when the depsgraph was created and evaluated, so all dependencies have appropriate resolutions too. For particle we no longer backup and restore the viewport particles to avoid overwriting them during render, as copy-on-write solves this for us. Even without COW particles seem to work ok. This also removes the particle simplification options based on camera. This was never used much and only available in Blender Internal. Differential Revision: https://developer.blender.org/D3148
2018-04-05Remove workspace object mode, reverts changes w/ 2.8Campbell Barton
This caused too many problems syncing object modes with multiple objects/windows/workspaces, see: D3130 for details.
2018-03-29Particles: Remove dedicated recalc field from ParticleSettingsSergey Sharybin
Use more generic id->recalc flag. Also sanitize flag flush from settings to particle system. Need to do such flush before triggering point cache reset, since point cache reset will do some logic based on what flags are set. This will solve crash caused by threaded update which will set some bitflags while point cache reset is in progress.
2018-02-15Merge branch 'master' into blender2.8Sergey Sharybin
2018-02-15Simple hair children: Make twist affected by vertex groupSergey Sharybin
The idea is to give a control over direction of twist, and maybe amount of twist as well. More concrete example: make braids on left and right side of character head to be twisting opposite directions. Now, tricky part: we need some negative values to flip direction, but weights can not be negative. So we use same trick as displacement map and tangent normal maps, where 0.5 is neutral, values below 0.5 are considered negative and values above 0.5 are considered positive.
2018-02-15Simple hair children: Initial implementation of twist controlSergey Sharybin
It allows to have children hair to be twisted around parent curve, which is quite an essential feature when creating hair braids. There are currently two controls: - Number of turns around parent children. - Influence curve, which allows to modify "twistness" along the strand.
2018-02-06Object Mode: Use eval_ctx mode for drawing, paint & modifiersCampbell Barton
2018-01-18Merge branch 'master' into blender2.8Brecht Van Lommel
2018-01-18Fix buffer overflow vulnerability in curve, font, particles code.Brecht Van Lommel
Solves these security issues from T52924: CVE-2017-12102 CVE-2017-12103 CVE-2017-12104 While the specific overflow issue may be fixed, loading the repro .blend files may still crash because they are incomplete and corrupt. The way they crash may be impossible to exploit, but this is difficult to prove. Differential Revision: https://developer.blender.org/D3002
2018-01-11Merge branch 'master' into blender2.8Campbell Barton
2018-01-11Cleanup: BKE naming conventions for datablock add/localizeCampbell Barton
Conventions were already followed nearly everywhere.
2017-11-23Rename any instance of scene layer or render layer in code with view layerDalai Felinto
The RenderResult struct still has a listbase of RenderLayer, but that's ok since this is strictly for rendering. * Subversion bump (to 2.80.2) * DNA low level doversion (renames) - only for .blend created since 2.80 started Note: We can't use DNA_struct_elem_find or get file version in init_structDNA, so we are manually iterating over the array of the SDNA elements instead. Note 2: This doversion change with renames can be reverted in a few months. But so far it's required for 2.8 files created between October 2016 and now. Reviewers: campbellbarton, sergey Differential Revision: https://developer.blender.org/D2927
2017-11-09Farewell Scene->basactDalai Felinto
2017-08-16Pass EvaluationContext instead of bContextCampbell Barton
2.8x branch added bContext arg in many places, pass eval-context instead since its not simple to reason about what what nested functions do when they can access and change almost anything. Also use const to prevent unexpected modifications. This fixes crash loading files with shadows, since off-screen buffers use a NULL context for rendering.
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-07-21Pass EvaluationContext argument everywhereLuca Rood
Note that some little parts of code have been dissabled because eval_ctx was not available there. This should be resolved once DerivedMesh is replaced.
2017-07-21Merge branch 'master' into blender2.8Sergey Sharybin
2017-07-21Fix T52134: New depsgraph crashes when evaluating several psys on from objectSergey Sharybin
2017-07-20Depsgraph: Solve TODO about more granular particle settings update taggingSergey Sharybin
2017-07-19Depsgraph: Use dependency graph flush routines to update particle settingsSergey Sharybin
Previously tagging particle settings for update will iterate over all objects and all their particle system to see whether something needs an update or not. Now we put ParticleSettings as an ID to the dependency graph, so tagging it for update will nicely flush updates to all dependent particle systems. Current downside of this is that due to limitation of flush routines it will cause some extra particle system re-evaluation when it technically not needed, and what's more annoying currently it will discard point caches more often. However, this is a good and simple demonstration case to improve tagging/flushing system to accommodate for such cases (similar issues happens with CoW and shading components). So let's try to find some generic solution to the problem!
2017-06-14Merge branch 'master' into blender2.8Bastien Montagne
2017-06-14Make whole ID copying code use const source pointer.Bastien Montagne
Noisy change, but safe, and better do it sooner than later if we are to rework copying code. Also, previous commit shows this *is* useful to catch some mistakes.
2017-05-12Implement hair drawing with Draw Manager in Clay engineLuca Rood
Part of T51378
2017-03-11Cleanup: code style & cmakeCampbell Barton
2017-01-31Cleanup: use 'cb_flag', not 'cd_flag' for library_query callbacks.Bastien Montagne
`cd_flag` tends to be used for CustomData flags in mesh area, while for library_query those are rather callback flags...
2016-08-06Fix T26658: particles stopped or bounced by 100% permeability colliders.Alexander Gavrilov
There were two issues here. One is that the fix done originally for this bug only checks for colliding with the same face as the single preceeding hit. If the particle hits an edge or vertex of the collider, it in fact hits two or more faces, so the loop ends up cycling between first two of them and reaches the max collision limit. The fix is to disable the collider for the sim step once a permeability roll succeeds, by adding it to a skip list. Skipping just one face causes some particles to bounce at odd angles in case of partial permeability. The second problem was that the collider bounced back a small percentage of particles, and the cause seemed to be that the code was set to flip the velocity if the particle was just past the collider but still within collision distance. Inverting both values causes a half permeable collider to stop particles, so it seems that this if branch shouldn't bounce at all. Test file: {F327322} Reviewers: lukastoenne, brecht Reviewed By: brecht Subscribers: brecht, #physics Maniphest Tasks: T26658 Differential Revision: https://developer.blender.org/D2120
2016-07-21Refactor/deduplicate even more make_local code (and fix part of T48907).Bastien Montagne
Turns out most BKE_foo_make_local datablock-specific functions are actually doing exactly the same thing, only two currently need special additional operations (object and brush ones). So added a BKE_id_make_local_generic instead of copying same code over and over. Also, changed a bit how make_local works in case we are localizing a whole library. We need to do the 'remap' step (from old linked ID to new local one) in the second loop, otherwise we miss some dependencies. This fixes main part of T48907.
2016-07-14Add option to id_make_local to force localization of datablock, even if not ↵Bastien Montagne
used locally. Will be used by link/append code.
2016-07-10Refactor/enhance BKE_particlesettings_make_local().Bastien Montagne
Now using modern features from libquery/libremap areas. Provides same kind of fixes/improvements as for BKE_object_make_local() (see rBd1a4ae3f395a6).
2016-07-10Cleanup/Refactor: pass Main pointer to all ID copy functions.Bastien Montagne
Also allows us to get rid of a few _copy_ex() versions...
2016-06-23Fix T48658: Cycles render & render preview corrupts particlesCampbell Barton
Replaces `G.is_rendering` with `use_render_params` argument. This is needed for Cycles, which attempts to restore render-preview settings from particles, after it gets its own particle data, but fails to restore because `G.is_rendering` was being checked in psys_cache_paths (and other places).
2016-03-19BLI_kdopbvh: Pass center to to range callbackCampbell Barton
Useful when BLI_bvhtree_range_query callback calculates a new position to measure from.