Age | Commit message (Collapse) | Author |
|
Any identifier that looks like an OpenGL identifier, but isn't, causes a false alarm by the glreport.py tool. Most of these were in comments so I just rephrased the comments. There were a couple of static functions/macros that were easy enough to rename. Only the glTexco and glIndex fields of the DMVertexAttribs struct was public and had non-local uses.
|
|
|
|
face smoothing flags correctly. In fact it would do an invalid memory access,
using the -1 original index.
|
|
to BLI_array macros.
|
|
|
|
|
|
|
|
4 vertices per face code in some places.
|
|
|
|
|
|
* Array modifier creates BMesh from DM; add missing CD_CREASE layer
for edge creases.
* With a modifier stack like mirror+subsurf+array, face normals were
wrong. Fix by removing CD_NORMAL layer from CCGDM output. Previously
the elements in this layer were simply copied, so they did not
reflect subdivision correctly.
* Minor style fixes in bmo_dupe.c.
Issues not yet addressed:
* Subsurf's optimal draw setting for hiding subdivision edges is not
respected by the array output.
* Slowdown issue; array modifier is much slower than in 2.62.
|
|
Patch by Nicholas Bishop, thanks!
|
|
else if's
|
|
this layer is now also used for various preview tasks in Object mode.
“Cleanup” commit, no functional changes.
|
|
|
|
modifiers stack.
Should also fix [#30266], [#29451], and partly [#30316].
Here are the changes made by this commit:
* It adds a "dirty" flag to DerivedMesh struct (for now, only DM_DIRTY_TESS_CDLAYERS, but more might be added as needed).
* It adds a new func, DM_update_tessface_data, which assumes tessfaces themselves are valid, but updates tessellated customdata from their poly/loop counter parts.
* At end of modstack, when valid tessellated faces are present in finaldm , but the cdlayers dirty flag is set, call that function (instead of recomputing the whole tessellation).
* Edits to the codes concerned (UVProject, DynamicPaint, and Subsurf modifiers).
* Also add to subsurf dm generation code the creation of a CD_POLYINDEX layer (mandatory for DM_update_tessface_data to work well, and imho all tessellated dm should have one).
Note: some pieces of old code are just #if 0’ed, will clean them later.
|
|
|
|
* replace 2D vector copy with copy_v2_v2().
* use puts rather then printf for single strings.
* style cleanup for drawobject.c indentation.
|
|
old mesh MCol 'r' was blue, 'b' was red, but theres no reason to keep this for bmesh with MLoopCol.
Loading old files works, saving legacy format works too.
What wont work is loading a file after this revision and loading it in an older revision since the bmesh merge.
(it wont crash but the blue and red will be swapped on vertex color layers).
|
|
|
|
Changed the create_vert_poly_map function to return a more compact
structure. Memory saved will vary depending on the mesh, but typically
it should be about one third of the old size.
|
|
|
|
|
|
|
|
ccg_gridsize() converts a level into gridsize, ccg_factor() is for
converting coordinates between different multires levels.
|
|
Renamed the multiresModifier_update() function to
multires_modifier_update_mdisps() and made it visible to subsurf_ccg.c
so it can be called directly. No functional change, just a bit simpler.
|
|
also remove large, duplicate comments from sunsky.h
|
|
The DMSetDrawOptions[Tex] callbacks return 0 (skip), 1 (draw), or 2
(either stipple or skip mcols.) In the CDDM, EDDM, and CCGDM draw
functions, as well as the callbacks in drawmesh/drawobject, replace
these numbers with values from an enum, DMDrawOptions.
|
|
|
|
This function pointer's 'setDrawOptions' parameter took a slightly
different type than the other drawing callbacks. In particular, it
could set a 'drawSmooth' value to indicate that smoothing should
always be enabled, overriding the face flag. However, all callbacks
either did not set this value, or set it unconditionally to
1. Replaced this by adding a new 'flag' parameter to drawFacesMapped,
which can be set to DM_DRAW_ALWAYS_SMOOTH where appropriate.
Also removed the 'useColors' parameter and replaced it with another
flag value, DM_DRAW_USE_COLORS.
Removed the 'wpaint__setSolidDrawOptions' callback, was only being
used to set the shading to smooth.
|
|
There are still fairly bewildering set of callbacks being tossed
around, but it's at least a little less verbose now.
|
|
|
|
Previously, the shading and material was set once per PBVHNode when
drawing. This is still the case, but PBVHNodes are now built to
contain only one material and shading mode.
This is done with an extra partitioning step; once the number of
primitives in the node falls below the PBVH leaf limit, it's
primitives are checked for matching materials. If more than one
material or shading mode is present in the node, it is split and
partitioned (partitioned by material rather than 3D location.)
Given a sufficiently 'annoying' input, like a dense mesh with
thousands of materials randomly scattered across it, this could
greatly increase PBVH build time (since nodes might end up containing
a single primitive), but in general this shouldn't come up.
In order to support materials for grids, the CCGDM is building another
grid array (of DMFaceMat structs). This could be used to replace
CCGDM.faceFlag for some small memory savings (TODO).
|
|
Remove 'CCGSubSurf *ss' parameter from ccgSubSurf_getFaceFaceHandle,
ccgSubSurf_getFaceVert, and ccgSubSurf_getFaceEdge.
|
|
Previously this was just a character array that stored face/poly flags
and mat_nr. Since mat_nr should be a short, this would have truncated
for higher values.
Replaced with a new DMFaceFlags struct.
|
|
This function pointer isn't called anymore, so removing it and the
cddm/ccgdm/gpu code associated with it.
|
|
|
|
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
|
|
|
|
Not used anymore, both have BMesh replacements (DerivedMesh.getPolyMap
and create_vert_poly_map.)
|
|
|
|
spelling 'impliment' -> 'implement'
|
|
macro for copying polygon settings
|
|
|
|
- more efficient array growing
- use BM_NGON_STACK_SIZE for more static arrays
- dont use BLI_array for bevel code where size is known.
|
|
|
|
currently only works for 3/4 sided faces.
|
|
|
|
- renamed vars
- calloc --> malloc
- remove some redundant code
|
|
|