Age | Commit message (Collapse) | Author |
|
python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
|
|
==========================
Removed limitation of armatured-only objects for sculpting -- now all
deformation modifiers are allowed in sculpt mode. Use crazyspace corrections
like from transformation modules was used to support all deformation modifiers.
Internal change: all crazyspace-related functions were noved to crazyspace.c
P.S. Brush could make quite unexpected deformation for meshes which are
deformed in specified way. Got patch for this and discussing with Brecht
if it's really needed or maybe it could be done in better way.
|
|
deformed PBVH to the base mesh.
It's not real bottleneck, but crazyspace corrections looks nicer now.
Real bottleneck is normals re-calculation, which calls plenty of
fsqrt's. We could avoid this for some modifiers (which don't use
normals), but such checking would make code less controllable.
|
|
artifacts in some cases (enter edit mode/disabling modifiers after undo)
|
|
values from ID-Props.
Probably wouldn't cause a problem but manually editing these types through python could easily crash blender.
also changed cmake, stub-makefile default build dir to be lower case and leave out architecture string, easier for documentation.
Use ../build/linux/ rather then ../build/Linux_i686/
|
|
Rotation brush used to be crazy because it depends on normal of area
under brush, which is used as axis to rotate vertexes around and
this normal used to change during stroke.
Calculate normal from original mesh state for rotation tool too.
|
|
Used a crazyspace approach (like in edit mode), but only modifiers with
deformMatricies are allowed atm (currently shapekeys and armature modifiers only).
All the rest modifiers had an warning message that they aren't applied because
of sculpt mode. Deformation of multires is also unsupported.
With all this restictions users will always see the actual "layer" (or maybe
mesh state would be more correct word) they are sculpting on.
Internal changes:
- All modifiers could have deformMatricies callback (the same as deformMatriciesEM but
for non-edit mode usage)
- Added function to build crazyspace for sculpting (sculpt_get_deform_matrices), but it
could be generalized for usage in other painting modes (particle edit mode, i.e)
Todo:
- Implement crazyspace correction to support all kinds of deformation modifiers
- Maybe deformation of multires isn't so difficult?
- And maybe we could avoid extra bad-level-stub for ED_sculpt_modifiers_changed
without code duplicating?
|
|
|
|
|
|
Three code fixes for 1 report. User experienced crashes while
painting on float buffer + having preview renders on.
- Texture Nodes: Image was re-allocated without using
proper thread lock
- Paint code: old convention to free the byte rect from
a float image as signal to re-create now is a proper
flag. This keeps image memory unchanged. Nice for render.
- Imbuf: call to make a byte rect from float was freeing
mipmaps unnecessary.
|
|
McGrath (troubled)
Quite silly fix, not sure if it could be smarter with current events/brushes design.
Use pressure_value from first brush step for brushes which don't support strokes -- thumb.
brush, brushes with anchored stroke method.
Should be fixed in nicer way after events redesigning.
P.S. Tried to place pressure saving into invaliants update fuunction, but it seens
that this function wouldn't know about pressure yet.
|
|
Small cleanup, de-duplicated the code for combining proxies
|
|
The tool-redo depends on a working undo system, so it can rewind
a step and then redo operator with new settings. When a user
disables undo, this won't work.
Now the properties for redo operator (toolbar, F6) will grey out
when a redo isn't possible.
|
|
also minor functional changes
- OBJECT_OT_make_links_data() type property is now assigned to the operator property (so popup menu can find it)
- removing BG image now returns cancelled if no image is removed.
|
|
Pressure sensitivity for Sculpt 'strength' got lost in code cleanup.
Added warning in code, the function call is confusing.
|
|
When pressure was zero, a sculpt brush was still being executed
with step amount divided by zero, and thus entering eternal loop.
Maybe tablet-specific this but I wonder how this never got reported...
|
|
Using texture brush in Sculpt, was calling to use "osa tex"
without giving it osa sample vectors. This crashed in using
texture nodes.
|
|
More cleanups: moved a function declaration to the correct module,
removed old/incorrect comments, marked more things with TODO where
appropriate, refactored copy-pasted function, de-duplicated code.
|
|
More cleanups to the cursor drawing code; factored out another
sculpt-related function, replaced float calculations with bitwise
flags, removed unnecessary GL changes, de-duplicated some lines,
removed unused parameters, and added more comments.
|
|
Pulled out the paint brush overlay drawing code into its own
function, brush drawing function was before ~250 lines.
|
|
More minor cleanups: fixed names and factored out a function that was
copy-pasted into paint stroke.
|
|
Some minor cleanups: removed `#if 0' code and moved a function into paint_util to avoid `extern' declaration.
|
|
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
|
|
MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
|
|
|
|
|
|
Set special brush flag when inversion stroke was started, not wery nice, but
we can't make better with current events system implementation.
|
|
flags which only apply to objects. harmless but misleading.
|
|
Sculpt: brush type "Grab" with option "Frontface only" was flipping
back and forth when grabbing outside of original brush area.
Reason: it was calling a function that used deformed coordinates
for getting normal, clipped by brush area. Now it uses original
coordinates, so it always finds normal.
Nicholas can determine better if tag "cache->original" should be
set as default for this brush type, this far I don't dare to go :)
|
|
need for each view to store every views combine data mask.
|
|
|
|
Adding weightgroup in weight-paint now sends notifier, so buttons
update
|
|
Undoing in sculpt mode with drawing mode not set to solid didn't
redraw correctly.
Problem was that the non-PBVH VBOs need to be remade in that case.
|
|
Noise texture moved the edges of multires grids different, causing
tears in the mesh. Fixed with a call to re-stitch grids (but only done
if the brush texture is set to noise)
|
|
Old bug report:
Image Editor, Painting: crash when texture was visible in
Material or Texture preview. Was caused by paint code
freeing mipmaps. Now replaced with a mipmap tag (to be done
again), and a new mipmap function that doesn't re-allocate.
|
|
sculpt normal was used un-initialized, this also affected snake/hook brush.
|
|
this could be confusing later on, now swap the pointers rather then changing their values.
|
|
and endif() which is no longer needed.
|
|
only tags the ID and does the actual flush/update delayed, before the next
redraw. For objects the update was already delayed, just flushing wasn't
yet.
This should help performance in python and animation editors, by making
calls to RNA property update quicker. Still need to add calls in a few
places where this was previously avoided due to bad performance.
|
|
- remove some redundant declarations
- changed VertexTangent and Path structs to avoid compiler alignment padding.
|
|
'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
|
|
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
|
|
|
|
reporting missing headers & C files.
this is important so IDE's using CMake integration always get blender headers. - QtCreator & MSVC for eg, probably others too.
|
|
- pep8 script was giving an error on non utf8 scons source files.
- use PyList_SET_ITEM macro when list type is ensured.
- all mathutils types use subtypes to create new types when available.
- use defines MAT3_UNITY, MAT4_UNITY to initialize unit matrices.
|
|
rotate_m4() was being called with axis=0
|
|
an extern into a define.
|
|
- MSVC CFLAGS were being set by only checking WIN32, (breaking non-msvc win32 builds)
|
|
Disable projection painting for soften tools.
Also it looks like smear tools support projection in the code, so
enabled project paint menu for such tools
|
|
rotate_m4 was being called with a zero axis.
|