Age | Commit message (Collapse) | Author |
|
This is only supported for mesh objects so far.
Also, abort in case there are no faces in dm (instead of crashing on NULL BVH tree...).
|
|
|
|
|
|
|
|
Also quiet some other minor warnings
|
|
|
|
another, including edit data (grooming).
This uses basically the same method as the existing connect/disconnect
feature. The main difference is that it allows working with multiple
objects and transferring the //particle/hair data// instead of the
//mesh// data (which is what connect/disconnect expects). This is a much
more realistic workflow when rigging, topology etc. changes and
groomed hair has to be transferred to the changed model.
|
|
|
|
Conflicts:
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/particle_system.c
source/blender/makesrna/intern/rna_particle.c
|
|
|
|
shape instead of a brush tool.
The brush cutting tool for hair, while useful, is not very accurate and
often requires rotating the model constantly to get the right trimming
on every side. This makes adjustments to a hair shape a very tedious
process.
On the other hand, making proxy meshes for hair shapes is a common
workflow. The new operator allows using such rough meshes as boundaries
for hair. All hairs that are outside the shape mesh are removed, while
those cutting it at some length are shortened accordingly.
The operator can be accessed in the particle edit mode toolbar via the
"Shape Cut" button. The "Shape Object" must be set first and stays
selected as a tool setting for repeatedly applying the shape.
|
|
Added the select random functionality in particle edit mode for hairs or control points.
Reviewers: campbellbarton, lukastoenne
Reviewed By: lukastoenne
Subscribers: campbellbarton, kevindietrich, jezv
Projects: #quick_hacks, #bf_blender, #physics
Maniphest Tasks: T37873
Differential Revision: https://developer.blender.org/D809
|
|
|
|
In rB78c491e the `initialize_particle` function was split into 2 parts for particle texture initialization.
The texture init part however also initializes birth times, which is now missing in the main init function
in some cases (notably when setting start/end directly without a subsequent time step).
|
|
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
|
|
|
|
use_modifier_stack enabled
Issue here is complex (Of course, this is particles!)
First issue is that use_modifier_stack will use the num parameter of the
particles instead of num_dmcache, something the brush code did not
account for at all. Now correctly set DMCACHE_ISCHILD in that case.
Second issue is that make_derived_deform will return a mesh with less
indices than the particle system derived mesh. This would mean that
subsequent sampling of the particle derived mesh to initialize the
particles woould also produce garbage. This was being done for
optimization but in that case it broke the system.
Reviewers: lukastoenne
Differential Revision: https://developer.blender.org/D429
|
|
Normals for each kdtree node were allocated but never used,
and search args only use in particles/boids code.
|
|
rB57dba739176153e052d77611ff0e554f05984686 unified pixel distance values
but omitted a factor 100 for particle edit.
|
|
|
|
|
|
|
|
of particles
Root of the issue goes to the order of particle initialization which does
texture evaluation (which does depend on particle coordinate) and particle
birth coordinate calculation. So basically what happened is:
* Changing number of particles re-allocated all the particles,
which sets their coordinate to (0,0,0)
* Texture evaluation used this non-initialized coordinate
* Coordinates were calculated for particles
Reshuffled code a bit so now texture evaluation happens after particles.
coordinate calculation. Basically moved texture evaluation to particle
reset function. Reset happens after initialization anyway and it does
know particle coordinates. Also, if reset is being called without init
then it's also kind of logical to re-evaluate texture because particle
coordinates might change.
|
|
|
|
It was wrong memory access in selection operators when point doesn't
have keys.
|
|
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
|
|
OPERATOR_CANCELLED.
|
|
Resetting the particle system without losing edit undo is not so easy. Just added a confirm message for now to warn user about loss of particle edit undo.
|
|
also replace callocs with mallocs since zeroing memory can be avoided.
|
|
this was only done in some cases before and it was possible to enable weightpaint+sculpt at the same time when enabling sculpt by directly running the mode switching operator.
add generic function to ensure a compatible mode before entering the new mode (added to each operators exec function)
|
|
|
|
- puff was interpolating hair that made longer strands cirl up.
- also fixed problem with puff-volume option, it was over-accumulating so unselected parts of the hair would have too much offset applied.
|
|
* Editing number of segments for particle hair did not update the viewport.
* Hidden particles were confusing, the paths were drawn but without the points.
Now it draws the path faded to indicate that they are hidden/locked.
* Select tips/roots operators now have options to select/deselect/toggle/invert.
|
|
add clip option to ED_view3d_win_to_ray(), ED_view3d_win_to_segment()
|
|
generator with a local one. It's not thread safe and will not give repeatable
results, so in most cases it should not be used.
Also fixes #34992 where the noise texture of a displacement modifier was not
properly random in opengl animation render, because the seed got reset to a
fixed value by an unrelated function while for final render it changed each
frame.
|
|
- bevel had incorrect cancel when initialization failed which could crash (own mistake).
- main particle poll function didnt check if the area/region were NULL.
- some uv operators needed space image but didnt check for it. also use uv_ prefix for most operator functions.
|
|
|
|
|
|
brushes, due to issues with color coded drawing or slow/buggy reading from such
a buffer on some systems.
In case multisample is enabled now, it uses an offscreen buffer for such drawing,
which is not multisampled and so should not cause issues. This does mean there is
some extra GPU memory usage when multisample is enabled, and we could optimize
triple buffer to work together here somehow to share buffers, but it's better than
having selection not working.
|
|
|
|
-> ED_view3d_calc_zfac() and have it return the zfac to use.
|
|
Fixes small precision problems.
|
|
|
|
|
|
MEM_recallocN() doesn't allocate memory when used on a null pointer.
Just revert commit since there is no real benefit to using
MEM_recallocN() in this case.
|
|
|
|
hairs.
|
|
|