forked from bartvdbraak/blender
Cleanup: spelling
This commit is contained in:
parent
63b8cf4518
commit
36d6aa428f
@ -573,8 +573,8 @@ ccl_device_inline ssef quad_mix(avxf p, avxf q, ssef f)
|
||||
*
|
||||
* Point Offset from v0
|
||||
* v0 (0, 0, 0)
|
||||
* v1 (0, 0, 1) The full avx type is computed by inserting the following
|
||||
* v2 (0, 1, 0) sse types into both the low and high parts of the avx.
|
||||
* v1 (0, 0, 1) The full AVX type is computed by inserting the following
|
||||
* v2 (0, 1, 0) SSE types into both the low and high parts of the AVX.
|
||||
* v3 (0, 1, 1)
|
||||
* v4 (1, 0, 0)
|
||||
* v5 (1, 0, 1) (0, 1, 0, 1) = shuffle<0, 2, 0, 2>(shuffle<2, 2, 2, 2>(V, V + 1))
|
||||
|
@ -68,10 +68,10 @@ TEST(Projection, isInFrontOfCamera) {
|
||||
|
||||
Vec4 X_front = GetRandomPoint();
|
||||
Vec4 X_back = GetRandomPoint();
|
||||
X_front(2) = 10; // Any point in the positive Z direction
|
||||
// where Z > 1 is infront of the camera.
|
||||
X_back(2) = -10; // Any point int he negative Z dirstaion
|
||||
// is behind the camera.
|
||||
X_front(2) = 10; /* Any point in the positive Z direction
|
||||
* where Z > 1 is in front of the camera. */
|
||||
X_back(2) = -10; /* Any point in the negative Z direction
|
||||
* is behind the camera. */
|
||||
|
||||
bool res_front = isInFrontOfCamera(P, X_front);
|
||||
bool res_back = isInFrontOfCamera(P, X_back);
|
||||
|
@ -217,7 +217,7 @@ typedef struct ModifierTypeInfo {
|
||||
float (*vertexCos)[3],
|
||||
int numVerts);
|
||||
|
||||
/* Set deform matrix per vertex for crazyspace correction */
|
||||
/* Set deform matrix per vertex for crazy-space correction */
|
||||
void (*deformMatricesEM)(struct ModifierData *md,
|
||||
const struct ModifierEvalContext *ctx,
|
||||
struct BMEditMesh *editData,
|
||||
|
@ -355,10 +355,10 @@ typedef struct SculptSession {
|
||||
bool show_face_sets;
|
||||
|
||||
/* Painting on deformed mesh */
|
||||
bool deform_modifiers_active; /* object is deformed with some modifiers */
|
||||
float (*orig_cos)[3]; /* coords of undeformed mesh */
|
||||
float (*deform_cos)[3]; /* coords of deformed mesh but without stroke displacement */
|
||||
float (*deform_imats)[3][3]; /* crazyspace deformation matrices */
|
||||
bool deform_modifiers_active; /* Object is deformed with some modifiers. */
|
||||
float (*orig_cos)[3]; /* Coords of un-deformed mesh. */
|
||||
float (*deform_cos)[3]; /* Coords of deformed mesh but without stroke displacement. */
|
||||
float (*deform_imats)[3][3]; /* Crazy-space deformation matrices. */
|
||||
|
||||
/* Used to cache the render of the active texture */
|
||||
unsigned int texcache_side, *texcache, texcache_actual;
|
||||
|
@ -1119,7 +1119,7 @@ static bool collection_find_instance_recursive(Collection *collection,
|
||||
{
|
||||
LISTBASE_FOREACH (CollectionObject *, collection_object, &collection->gobject) {
|
||||
if (collection_object->ob != NULL &&
|
||||
/* Object from a given collection should never instanciate that collection either. */
|
||||
/* Object from a given collection should never instantiate that collection either. */
|
||||
ELEM(collection_object->ob->instance_collection, instance_collection, collection)) {
|
||||
return true;
|
||||
}
|
||||
@ -1146,7 +1146,7 @@ bool BKE_collection_find_cycle(Collection *new_ancestor, Collection *collection)
|
||||
}
|
||||
}
|
||||
|
||||
/* Find possible objects in collection or its children, that would instanciate the given ancestor
|
||||
/* Find possible objects in collection or its children, that would instantiate the given ancestor
|
||||
* collection (that would also make a fully invalid cycle of dependencies) .*/
|
||||
return collection_find_instance_recursive(collection, new_ancestor);
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ void BKE_crazyspace_set_quats_mesh(Mesh *me,
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of deform matrices for crazyspace correction,
|
||||
* Returns an array of deform matrices for crazy-space correction,
|
||||
* and the number of modifiers left.
|
||||
*/
|
||||
int BKE_crazyspace_get_first_deform_matrices_editbmesh(struct Depsgraph *depsgraph,
|
||||
@ -327,7 +327,7 @@ int BKE_crazyspace_get_first_deform_matrices_editbmesh(struct Depsgraph *depsgra
|
||||
}
|
||||
|
||||
/**
|
||||
* Crazyspace evaluation needs to have an object which has all the fields
|
||||
* Crazy-space evaluation needs to have an object which has all the fields
|
||||
* evaluated, but the mesh data being at undeformed state. This way it can
|
||||
* re-apply modifiers and also have proper pointers to key data blocks.
|
||||
*
|
||||
@ -455,8 +455,8 @@ void BKE_crazyspace_build_sculpt(struct Depsgraph *depsgraph,
|
||||
depsgraph, scene, object, deformmats, deformcos);
|
||||
|
||||
if (totleft) {
|
||||
/* there are deformation modifier which doesn't support deformation matrices
|
||||
* calculation. Need additional crazyspace correction */
|
||||
/* There are deformation modifier which doesn't support deformation matrices calculation.
|
||||
* Need additional crazy-space correction. */
|
||||
|
||||
Mesh *mesh = (Mesh *)object->data;
|
||||
Mesh *mesh_eval = NULL;
|
||||
|
@ -237,12 +237,13 @@ void BKE_editmesh_lnorspace_update(BMEditMesh *em, Mesh *me)
|
||||
{
|
||||
BMesh *bm = em->bm;
|
||||
|
||||
/* We need to create clnors data if none exist yet, otherwise there is no way to edit them.
|
||||
* Similar code to MESH_OT_customdata_custom_splitnormals_add operator,
|
||||
* we want to keep same shading in case we were using autosmooth so far.
|
||||
/* We need to create custom-loop-normals (CLNORS) data if none exist yet,
|
||||
* otherwise there is no way to edit them.
|
||||
* Similar code to #MESH_OT_customdata_custom_splitnormals_add operator,
|
||||
* we want to keep same shading in case we were using auto-smooth so far.
|
||||
* Note: there is a problem here, which is that if someone starts a normal editing operation on
|
||||
* previously autosmooth-ed mesh, and cancel that operation, generated clnors data remain,
|
||||
* with related sharp edges (and hence autosmooth is 'lost').
|
||||
* previously auto-smooth-ed mesh, and cancel that operation, generated CLNORS data remain,
|
||||
* with related sharp edges (and hence auto-smooth is 'lost').
|
||||
* Not sure how critical this is, and how to fix that issue? */
|
||||
if (!CustomData_has_layer(&bm->ldata, CD_CUSTOMLOOPNORMAL)) {
|
||||
if (me->flag & ME_AUTOSMOOTH) {
|
||||
|
@ -484,14 +484,14 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
|
||||
dtar->flag &= ~DTAR_FLAG_INVALID;
|
||||
}
|
||||
|
||||
/* try to get posechannel */
|
||||
/* Try to get pose-channel. */
|
||||
pchan = BKE_pose_channel_find_name(ob->pose, dtar->pchan_name);
|
||||
|
||||
/* check if object or bone, and get transform matrix accordingly
|
||||
* - "useEulers" code is used to prevent the problems associated with non-uniqueness
|
||||
* of euler decomposition from matrices [#20870]
|
||||
* - localspace is for [#21384], where parent results are not wanted
|
||||
* but local-consts is for all the common "corrective-shapes-for-limbs" situations
|
||||
/* Check if object or bone, and get transform matrix accordingly:
|
||||
* - "use_eulers" code is used to prevent the problems associated with non-uniqueness
|
||||
* of euler decomposition from matrices T20870.
|
||||
* - "local-space" is for T21384, where parent results are not wanted
|
||||
* but #DTAR_FLAG_LOCAL_CONSTS is for all the common "corrective-shapes-for-limbs" situations.
|
||||
*/
|
||||
if (pchan) {
|
||||
/* bone */
|
||||
@ -517,7 +517,7 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar)
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* worldspace matrix */
|
||||
/* World-space matrix. */
|
||||
mul_m4_m4m4(mat, ob->obmat, pchan->pose_mat);
|
||||
}
|
||||
}
|
||||
|
@ -1076,7 +1076,7 @@ void BKE_lib_override_library_update(Main *bmain, ID *local)
|
||||
local->tag |= LIB_TAG_OVERRIDE_LIBRARY_REFOK;
|
||||
|
||||
/* Full rebuild of Depsgraph! */
|
||||
/* Note: this is reallly brute force, in theory updates from RNA should have handle this already,
|
||||
/* Note: this is really brute force, in theory updates from RNA should have handle this already,
|
||||
* but for now let's play it safe. */
|
||||
DEG_relations_tag_update(bmain);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
* A specialization of `blender::DefaultHash<T>` provides a hash function for values of type T.
|
||||
* This hash function is used by default in hash table implementations in blenlib.
|
||||
*
|
||||
* The actual hash function is in the `operator()` method of DefaultHash<T>. The following code
|
||||
* The actual hash function is in the `operator()` method of `DefaultHash<T>`. The following code
|
||||
* computes the hash of some value using DefaultHash.
|
||||
*
|
||||
* T value = ...;
|
||||
@ -32,17 +32,17 @@
|
||||
*
|
||||
* Hash table implementations like blender::Set support heterogeneous key lookups. That means that
|
||||
* one can do a lookup with a key of type A in a hash table that stores keys of type B. This is
|
||||
* commonly done when B is std::string, because the conversion from e.g. a StringRef to std::string
|
||||
* can be costly and is unnecessary. To make this work, values of type A and B that compare equal
|
||||
* have to have the same hash value. This is achieved by defining potentially multiple `operator()`
|
||||
* in a specialization of DefaultHash. All those methods have to compute the same hash for values
|
||||
* that compare equal.
|
||||
* commonly done when B is std::string, because the conversion from e.g. a #StringRef to
|
||||
* std::string can be costly and is unnecessary. To make this work, values of type A and B that
|
||||
* compare equal have to have the same hash value. This is achieved by defining potentially
|
||||
* multiple `operator()` in a specialization of #DefaultHash. All those methods have to compute the
|
||||
* same hash for values that compare equal.
|
||||
*
|
||||
* The computed hash is an unsigned 32 bit integer. Ideally, the hash function would generate
|
||||
* uniformly random hash values for a set of keys. However, in many cases trivial hash functions
|
||||
* are faster and produce a good enough distribution. In general it is better when more information
|
||||
* is in the lower bits of the hash. By choosing a good probing strategy, the effects of a bad hash
|
||||
* function are less noticable though. In this context a good probing strategy is one that takes
|
||||
* function are less noticeable though. In this context a good probing strategy is one that takes
|
||||
* all bits of the hash into account eventually. One has to check on a case by case basis to see if
|
||||
* a better but more expensive or trivial hash function works better.
|
||||
*
|
||||
@ -50,11 +50,11 @@
|
||||
*
|
||||
* - When you want to provide a default hash function for your own custom type: Add a `hash`
|
||||
* member function to it. The function should return `uint32_t` and take no arguments. This
|
||||
* method will be called by the default implementation of DefaultHash. It will automatically be
|
||||
* method will be called by the default implementation of #DefaultHash. It will automatically be
|
||||
* used by hash table implementations.
|
||||
*
|
||||
* - When you want to provide a default hash function for a type that you cannot modify: Add a new
|
||||
* specialization to the DefaultHash struct. This can be done by writing code like below in
|
||||
* specialization to the #DefaultHash struct. This can be done by writing code like below in
|
||||
* either global or BLI namespace.
|
||||
*
|
||||
* template<> struct blender::DefaultHash<TheType> {
|
||||
@ -86,9 +86,9 @@
|
||||
namespace blender {
|
||||
|
||||
/**
|
||||
* If there is no other specialization of DefaultHash for a given type, try to call `hash()` on the
|
||||
* value. If there is no such method, this will result in a compiler error. Usually that means that
|
||||
* you have to implement a hash function using one of three strategies listed above.
|
||||
* If there is no other specialization of #DefaultHash for a given type, try to call `hash()` on
|
||||
* the value. If there is no such method, this will result in a compiler error. Usually that means
|
||||
* that you have to implement a hash function using one of three strategies listed above.
|
||||
*/
|
||||
template<typename T> struct DefaultHash {
|
||||
uint32_t operator()(const T &value) const
|
||||
@ -165,7 +165,7 @@ inline uint32_t hash_string(StringRef str)
|
||||
|
||||
template<> struct DefaultHash<std::string> {
|
||||
/**
|
||||
* Take a StringRef as parameter to support heterogeneous lookups in hash table implementations
|
||||
* Take a #StringRef as parameter to support heterogeneous lookups in hash table implementations
|
||||
* when std::string is used as key.
|
||||
*/
|
||||
uint32_t operator()(StringRef value) const
|
||||
|
@ -39,7 +39,7 @@ namespace blender {
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Constexpr Utility Functions
|
||||
*
|
||||
* Those should eventually be deduplicated with functions in BLI_math_base.h.
|
||||
* Those should eventually be de-duplicated with functions in BLI_math_base.h.
|
||||
* \{ */
|
||||
|
||||
inline constexpr int is_power_of_2_i_constexpr(int n)
|
||||
|
@ -2127,7 +2127,7 @@ void mul_v3m3_dq(float co[3], float mat[3][3], DualQuat *dq)
|
||||
co[1] = (co[1] + t[1]) * len2;
|
||||
co[2] = (co[2] + t[2]) * len2;
|
||||
|
||||
/* compute crazyspace correction mat */
|
||||
/* Compute crazy-space correction matrix. */
|
||||
if (mat) {
|
||||
if (dq->scale_weight) {
|
||||
copy_m3_m4(scalemat, dq->scale);
|
||||
|
@ -925,7 +925,7 @@ void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMesh
|
||||
else if ((oldkey != NULL) && (cd_shape_keyindex_offset != -1) &&
|
||||
((keyi = BM_ELEM_CD_GET_INT(eve, cd_shape_keyindex_offset)) != ORIGINDEX_NONE) &&
|
||||
(keyi < currkey->totelem)) {
|
||||
/* Old method of reconstructing keys via vertice's original key indices,
|
||||
/* Old method of reconstructing keys via vertices original key indices,
|
||||
* currently used if the new method above fails
|
||||
* (which is theoretically possible in certain cases of undo). */
|
||||
copy_v3_v3(fp, oldkey[keyi]);
|
||||
@ -938,9 +938,9 @@ void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMesh
|
||||
/* Propagate edited basis offsets to other shapes. */
|
||||
if (apply_offset) {
|
||||
add_v3_v3(fp, *ofs_pt++);
|
||||
/* Apply back new coordinates of offsetted shape-keys into BMesh.
|
||||
* Otherwise, in case we call again BM_mesh_bm_to_me on same BMesh,
|
||||
* we'll apply diff from previous call to BM_mesh_bm_to_me,
|
||||
/* Apply back new coordinates shape-keys that have offset into BMesh.
|
||||
* Otherwise, in case we call again #BM_mesh_bm_to_me on same BMesh,
|
||||
* we'll apply diff from previous call to #BM_mesh_bm_to_me,
|
||||
* to shape-key values from *original creation of the BMesh*. See T50524. */
|
||||
copy_v3_v3(BM_ELEM_CD_GET_VOID_P(eve, cd_shape_offset), fp);
|
||||
}
|
||||
@ -976,7 +976,7 @@ void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMesh
|
||||
MEM_freeN(oldverts);
|
||||
}
|
||||
|
||||
/* Topology could be changed, ensure mdisps are ok. */
|
||||
/* Topology could be changed, ensure #CD_MDISPS are ok. */
|
||||
multires_topology_changed(me);
|
||||
|
||||
/* To be removed as soon as COW is enabled by default.. */
|
||||
|
@ -4536,7 +4536,7 @@ static VMesh *pipe_adj_vmesh(BevelParams *bp, BevVert *bv, BoundVert *vpipe)
|
||||
bool even, midline;
|
||||
float *profile_point_pipe1, *profile_point_pipe2, f;
|
||||
|
||||
/* Some unecessary overhead running this subdivision with custom profile snapping later on. */
|
||||
/* Some unnecessary overhead running this subdivision with custom profile snapping later on. */
|
||||
vm = adj_vmesh(bp, bv);
|
||||
|
||||
/* Now snap all interior coordinates to be on the epipe profile. */
|
||||
|
@ -131,7 +131,7 @@ static void basic_cache_init(void *vedata)
|
||||
stl->g_data = MEM_callocN(sizeof(*stl->g_data), __func__);
|
||||
}
|
||||
|
||||
/* Twice for normal and infront objects. */
|
||||
/* Twice for normal and in front objects. */
|
||||
for (int i = 0; i < 2; i++) {
|
||||
DRWState clip_state = (draw_ctx->sh_cfg == GPU_SHADER_CFG_CLIPPED) ? DRW_STATE_CLIP_PLANES : 0;
|
||||
DRWState infront_state = (DRW_state_is_select() && (i == 1)) ? DRW_STATE_IN_FRONT_SELECT : 0;
|
||||
|
@ -159,7 +159,7 @@ void gpencil_object_cache_sort(GPENCIL_PrivateData *pd)
|
||||
}
|
||||
}
|
||||
|
||||
/* Join both lists, adding infront. */
|
||||
/* Join both lists, adding in front. */
|
||||
if (pd->tobjects_infront.first != NULL) {
|
||||
if (pd->tobjects.last != NULL) {
|
||||
pd->tobjects.last->next = pd->tobjects_infront.first;
|
||||
|
@ -423,7 +423,7 @@ static void OVERLAY_cache_finish(void *vedata)
|
||||
{
|
||||
/* TODO(fclem) Only do this when really needed. */
|
||||
{
|
||||
/* HACK we allocate the infront depth here to avoid the overhead when if is not needed. */
|
||||
/* HACK we allocate the in front depth here to avoid the overhead when if is not needed. */
|
||||
DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
|
||||
DefaultTextureList *dtxl = DRW_viewport_texture_list_get();
|
||||
|
||||
|
@ -23,7 +23,7 @@ void cavity_compute(vec2 screenco,
|
||||
|
||||
float depth = texture(depthBuffer, screenco).x;
|
||||
|
||||
/* Early out if background and infront. */
|
||||
/* Early out if background and in front. */
|
||||
if (depth == 1.0 || depth == 0.0) {
|
||||
return;
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ void workbench_cache_finish(void *ved)
|
||||
|
||||
/* TODO(fclem) Only do this when really needed. */
|
||||
{
|
||||
/* HACK we allocate the infront depth here to avoid the overhead when if is not needed. */
|
||||
/* HACK we allocate the in front depth here to avoid the overhead when if is not needed. */
|
||||
DefaultFramebufferList *dfbl = DRW_viewport_framebuffer_list_get();
|
||||
DefaultTextureList *dtxl = DRW_viewport_texture_list_get();
|
||||
|
||||
|
@ -293,7 +293,7 @@ typedef struct WORKBENCH_PrivateData {
|
||||
/** Object IDs buffer for curvature & outline. */
|
||||
struct GPUTexture *object_id_tx;
|
||||
|
||||
/** Prepass infos for each draw types [transparent][infront][hair]. */
|
||||
/** Pre-pass information for each draw types [transparent][infront][hair]. */
|
||||
WORKBENCH_Prepass prepass[2][2][2];
|
||||
|
||||
/* Materials */
|
||||
|
@ -165,14 +165,14 @@ void workbench_transparent_draw_depth_pass(WORKBENCH_Data *data)
|
||||
|
||||
if (!DRW_pass_is_empty(psl->transp_accum_ps)) {
|
||||
GPU_framebuffer_bind(fbl->opaque_fb);
|
||||
/* TODO(fclem) Disable writting to first two buffers. Unecessary waste of bandwidth. */
|
||||
/* TODO(fclem) Disable writing to first two buffers. Unnecessary waste of bandwidth. */
|
||||
DRW_pass_state_set(psl->transp_accum_ps, state | wpd->cull_state | wpd->clip_state);
|
||||
DRW_draw_pass(psl->transp_accum_ps);
|
||||
}
|
||||
|
||||
if (!DRW_pass_is_empty(psl->transp_accum_infront_ps)) {
|
||||
GPU_framebuffer_bind(fbl->opaque_infront_fb);
|
||||
/* TODO(fclem) Disable writting to first two buffers. Unecessary waste of bandwidth. */
|
||||
/* TODO(fclem) Disable writing to first two buffers. Unnecessary waste of bandwidth. */
|
||||
DRW_pass_state_set(psl->transp_accum_infront_ps, state | wpd->cull_state | wpd->clip_state);
|
||||
DRW_draw_pass(psl->transp_accum_infront_ps);
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ static void draw_call_sort(DRWCommand *array, DRWCommand *array_tmp, int array_l
|
||||
for (int i = 1; i < ARRAY_SIZE(idx); i++) {
|
||||
idx[i] += idx[i - 1];
|
||||
}
|
||||
/* Traverse in reverse to not change the order of the resource ids. */
|
||||
/* Traverse in reverse to not change the order of the resource ID's. */
|
||||
for (int src = array_len - 1; src >= 0; src--) {
|
||||
array_tmp[--idx[KEY(array[src])]] = array[src];
|
||||
}
|
||||
@ -116,7 +116,7 @@ void drw_resource_buffer_finish(ViewportMemoryPool *vmempool)
|
||||
vmempool->ubo_len = ubo_len;
|
||||
}
|
||||
|
||||
/* Remove unecessary buffers */
|
||||
/* Remove unnecessary buffers */
|
||||
for (int i = ubo_len; i < vmempool->ubo_len; i++) {
|
||||
GPU_uniformbuffer_free(vmempool->matrices_ubo[i]);
|
||||
GPU_uniformbuffer_free(vmempool->obinfos_ubo[i]);
|
||||
@ -151,7 +151,7 @@ void drw_resource_buffer_finish(ViewportMemoryPool *vmempool)
|
||||
BLI_memblock_iternew(vmempool->commands, &iter);
|
||||
while ((chunk = BLI_memblock_iterstep(&iter))) {
|
||||
bool sortable = true;
|
||||
/* We can only sort chunks that contain DRWCommandDraw only. */
|
||||
/* We can only sort chunks that contain #DRWCommandDraw only. */
|
||||
for (int i = 0; i < ARRAY_SIZE(chunk->command_type) && sortable; i++) {
|
||||
if (chunk->command_type[i] != 0) {
|
||||
sortable = false;
|
||||
@ -179,7 +179,7 @@ static void drw_shgroup_uniform_create_ex(DRWShadingGroup *shgroup,
|
||||
int arraysize)
|
||||
{
|
||||
if (loc == -1) {
|
||||
/* Nice to enable eventually, for now eevee uses uniforms that might not exist. */
|
||||
/* Nice to enable eventually, for now EEVEE uses uniforms that might not exist. */
|
||||
// BLI_assert(0);
|
||||
return;
|
||||
}
|
||||
@ -432,7 +432,7 @@ void DRW_shgroup_uniform_vec4_array_copy(DRWShadingGroup *shgroup,
|
||||
int location = GPU_shader_get_uniform(shgroup->shader, name);
|
||||
|
||||
if (location == -1) {
|
||||
/* Nice to enable eventually, for now eevee uses uniforms that might not exist. */
|
||||
/* Nice to enable eventually, for now EEVEE uses uniforms that might not exist. */
|
||||
// BLI_assert(0);
|
||||
return;
|
||||
}
|
||||
|
@ -304,10 +304,10 @@ int ED_armature_join_objects_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
/* Get editbones of active armature to add editbones to */
|
||||
/* Get edit-bones of active armature to add edit-bones to */
|
||||
ED_armature_to_edit(arm);
|
||||
|
||||
/* get pose of active object and move it out of posemode */
|
||||
/* Get pose of active object and move it out of pose-mode */
|
||||
pose = ob_active->pose;
|
||||
ob_active->mode &= ~OB_MODE_POSE;
|
||||
|
||||
@ -325,7 +325,7 @@ int ED_armature_join_objects_exec(bContext *C, wmOperator *op)
|
||||
afd.tarArm = ob_active;
|
||||
afd.names_map = BLI_ghash_str_new("join_armature_adt_fix");
|
||||
|
||||
/* Make a list of editbones in current armature */
|
||||
/* Make a list of edit-bones in current armature */
|
||||
ED_armature_to_edit(ob_iter->data);
|
||||
|
||||
/* Get Pose of current armature */
|
||||
@ -549,7 +549,7 @@ static void separated_armature_fix_links(Main *bmain, Object *origArm, Object *n
|
||||
|
||||
/* Helper function for armature separating - remove certain bones from the given armature
|
||||
* sel: remove selected bones from the armature, otherwise the unselected bones are removed
|
||||
* (ob is not in editmode)
|
||||
* (ob is not in edit-mode)
|
||||
*/
|
||||
static void separate_armature_bones(Main *bmain, Object *ob, const bool is_select)
|
||||
{
|
||||
@ -557,7 +557,7 @@ static void separate_armature_bones(Main *bmain, Object *ob, const bool is_selec
|
||||
bPoseChannel *pchan, *pchann;
|
||||
EditBone *curbone;
|
||||
|
||||
/* make local set of editbones to manipulate here */
|
||||
/* make local set of edit-bones to manipulate here */
|
||||
ED_armature_to_edit(arm);
|
||||
|
||||
/* go through pose-channels, checking if a bone should be removed */
|
||||
@ -591,7 +591,7 @@ static void separate_armature_bones(Main *bmain, Object *ob, const bool is_selec
|
||||
}
|
||||
}
|
||||
|
||||
/* free any of the extra-data this pchan might have */
|
||||
/* Free any of the extra-data this pchan might have. */
|
||||
BKE_pose_channel_free(pchan);
|
||||
BKE_pose_channels_hash_free(ob->pose);
|
||||
|
||||
@ -601,7 +601,7 @@ static void separate_armature_bones(Main *bmain, Object *ob, const bool is_selec
|
||||
}
|
||||
}
|
||||
|
||||
/* exit editmode (recalculates pchans too) */
|
||||
/* Exit edit-mode (recalculates pose-channels too). */
|
||||
ED_armature_edit_deselect_all(ob);
|
||||
ED_armature_from_edit(bmain, ob->data);
|
||||
ED_armature_edit_free(ob->data);
|
||||
@ -652,15 +652,15 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
/* We are going to do this as follows (unlike every other instance of separate):
|
||||
* 1. Exit editmode +posemode for active armature/base. Take note of what this is.
|
||||
* 1. Exit edit-mode & pose-mode for active armature/base. Take note of what this is.
|
||||
* 2. Duplicate base - BASACT is the new one now
|
||||
* 3. For each of the two armatures,
|
||||
* enter editmode -> remove appropriate bones -> exit editmode + recalc.
|
||||
* enter edit-mode -> remove appropriate bones -> exit edit-mode + recalculate.
|
||||
* 4. Fix constraint links
|
||||
* 5. Make original armature active and enter editmode
|
||||
* 5. Make original armature active and enter edit-mode
|
||||
*/
|
||||
|
||||
/* 1) store starting settings and exit editmode */
|
||||
/* 1) store starting settings and exit edit-mode */
|
||||
ob_old->mode &= ~OB_MODE_POSE;
|
||||
|
||||
ED_armature_from_edit(bmain, ob_old->data);
|
||||
@ -700,7 +700,7 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
MEM_freeN(bases);
|
||||
|
||||
/* recalc/redraw + cleanup */
|
||||
/* Recalculate/redraw + cleanup */
|
||||
WM_cursor_wait(0);
|
||||
|
||||
if (ok) {
|
||||
|
@ -1075,7 +1075,9 @@ static void annotation_free_stroke(bGPDframe *gpf, bGPDstroke *gps)
|
||||
BLI_freelinkN(&gpf->strokes, gps);
|
||||
}
|
||||
|
||||
/* which which point is infront (result should only be used for comparison) */
|
||||
/**
|
||||
* Which which point is in front (result should only be used for comparison).
|
||||
*/
|
||||
static float view3d_point_depth(const RegionView3D *rv3d, const float co[3])
|
||||
{
|
||||
if (rv3d->is_persp) {
|
||||
|
@ -2534,8 +2534,8 @@ static void gpencil_joined_fix_animdata_cb(ID *id, FCurve *fcu, void *user_data)
|
||||
if (dtar->id == src_id) {
|
||||
dtar->id = dst_id;
|
||||
|
||||
/* Also check on the subtarget...
|
||||
* We duplicate the logic from drivers_path_rename_fix() here, with our own
|
||||
/* Also check on the sub-target.
|
||||
* We duplicate the logic from #drivers_path_rename_fix() here, with our own
|
||||
* little twists so that we know that it isn't going to clobber the wrong data
|
||||
*/
|
||||
if (dtar->rna_path && strstr(dtar->rna_path, "layers[")) {
|
||||
|
@ -1295,7 +1295,9 @@ static void gpencil_stroke_newfrombuffer(tGPsdata *p)
|
||||
|
||||
/* --- 'Eraser' for 'Paint' Tool ------ */
|
||||
|
||||
/* which which point is infront (result should only be used for comparison) */
|
||||
/**
|
||||
* Which which point is in front (result should only be used for comparison).
|
||||
*/
|
||||
static float view3d_point_depth(const RegionView3D *rv3d, const float co[3])
|
||||
{
|
||||
if (rv3d->is_persp) {
|
||||
|
@ -131,7 +131,7 @@ enum {
|
||||
*/
|
||||
AZONE_FULLSCREEN,
|
||||
/**
|
||||
* Hotspot azone around scroll-bars to show/hide them.
|
||||
* Hot-spot #AZone around scroll-bars to show/hide them.
|
||||
* Only show the scroll-bars when the cursor is close.
|
||||
*/
|
||||
AZONE_REGION_SCROLL,
|
||||
|
@ -364,7 +364,7 @@ static bool id_search_add(const bContext *C,
|
||||
int iconid = ui_id_icon_get(C, id, template_ui->preview);
|
||||
bool has_sep_char = (id->lib != NULL);
|
||||
|
||||
/* When using previews, the library hint (linked, overriden, missing) is added with a
|
||||
/* When using previews, the library hint (linked, overridden, missing) is added with a
|
||||
* character prefix, otherwise we can use a icon. */
|
||||
BKE_id_full_name_ui_prefix_get(name_ui, id, template_ui->preview, UI_SEP_CHAR);
|
||||
if (!template_ui->preview) {
|
||||
|
@ -1895,12 +1895,12 @@ static BMFace *knife_find_closest_face(KnifeTool_OpData *kcd,
|
||||
|
||||
if (!f) {
|
||||
if (kcd->is_interactive) {
|
||||
/* try to use backbuffer selection method if ray casting failed */
|
||||
/* Try to use back-buffer selection method if ray casting failed. */
|
||||
f = EDBM_face_find_nearest(&kcd->vc, &dist);
|
||||
|
||||
/* cheat for now; just put in the origin instead
|
||||
* of a true coordinate on the face.
|
||||
* This just puts a point 1.0f infront of the view. */
|
||||
* This just puts a point 1.0f in front of the view. */
|
||||
add_v3_v3v3(co, origin, ray);
|
||||
}
|
||||
}
|
||||
@ -1908,8 +1908,10 @@ static BMFace *knife_find_closest_face(KnifeTool_OpData *kcd,
|
||||
return f;
|
||||
}
|
||||
|
||||
/* find the 2d screen space density of vertices within a radius. used to scale snapping
|
||||
* distance for picking edges/verts.*/
|
||||
/**
|
||||
* Find the 2d screen space density of vertices within a radius.
|
||||
* Used to scale snapping distance for picking edges/verts.
|
||||
*/
|
||||
static int knife_sample_screen_density(KnifeTool_OpData *kcd, const float radius)
|
||||
{
|
||||
BMFace *f;
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "screen_intern.h"
|
||||
|
||||
/**
|
||||
* Empty screen, with 1 dummy area without spacedata. Uses window size.
|
||||
* Empty screen, with 1 dummy area without space-data. Uses window size.
|
||||
*/
|
||||
WorkSpaceLayout *ED_workspace_layout_add(Main *bmain,
|
||||
WorkSpace *workspace,
|
||||
|
@ -811,7 +811,7 @@ static bool project_paint_PickColor(
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if 'pt' is infront of the 3 verts on the Z axis (used for screenspace occlusion test)
|
||||
* Check if 'pt' is in front of the 3 verts on the Z axis (used for screen-space occlusion test)
|
||||
* \return
|
||||
* - `0`: no occlusion
|
||||
* - `-1`: no occlusion but 2D intersection is true
|
||||
@ -836,7 +836,7 @@ static int project_paint_occlude_ptv(const float pt[3],
|
||||
}
|
||||
|
||||
/* From here on we know there IS an intersection */
|
||||
/* if ALL of the verts are infront of us then we know it intersects ? */
|
||||
/* if ALL of the verts are in front of us then we know it intersects ? */
|
||||
if (v1[2] < pt[2] && v2[2] < pt[2] && v3[2] < pt[2]) {
|
||||
return 1;
|
||||
}
|
||||
|
@ -1425,10 +1425,10 @@ static int wpaint_mode_toggle_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
}
|
||||
|
||||
/* Weightpaint works by overriding colors in mesh,
|
||||
* so need to make sure we recalc on enter and
|
||||
/* Weight-paint works by overriding colors in mesh,
|
||||
* so need to make sure we recalculate on enter and
|
||||
* exit (exit needs doing regardless because we
|
||||
* should redeform).
|
||||
* should re-deform).
|
||||
*/
|
||||
DEG_id_tag_update(&me->id, 0);
|
||||
|
||||
|
@ -182,7 +182,7 @@ struct View3DCameraControl *ED_view3d_cameracontrol_acquire(Depsgraph *depsgraph
|
||||
copy_qt_qt(vctrl->rot_backup, rv3d->viewquat);
|
||||
copy_v3_v3(vctrl->ofs_backup, rv3d->ofs);
|
||||
|
||||
/* the dist defines a vector that is infront of the offset
|
||||
/* The dist defines a vector that is in front of the offset
|
||||
* to rotate the view about.
|
||||
* this is no good for fly mode because we
|
||||
* want to rotate about the viewers center.
|
||||
|
@ -4988,7 +4988,7 @@ void ED_view3d_cursor3d_position(bContext *C,
|
||||
|
||||
ED_view3d_calc_zfac(rv3d, cursor_co, &flip);
|
||||
|
||||
/* reset the depth based on the view offset (we _know_ the offset is infront of us) */
|
||||
/* Reset the depth based on the view offset (we _know_ the offset is in front of us). */
|
||||
if (flip) {
|
||||
negate_v3_v3(cursor_co, rv3d->ofs);
|
||||
/* re initialize, no need to check flip again */
|
||||
|
@ -557,9 +557,9 @@ void ED_view3d_win_to_3d(const View3D *v3d,
|
||||
copy_v3_v3(ray_origin, rv3d->viewinv[3]);
|
||||
ED_view3d_win_to_vector(region, mval, ray_direction);
|
||||
|
||||
/* note, we could use isect_line_plane_v3()
|
||||
* however we want the intersection to be infront of the view no matter what,
|
||||
* so apply the unsigned factor instead */
|
||||
/* Note: we could use #isect_line_plane_v3()
|
||||
* however we want the intersection to be in front of the view no matter what,
|
||||
* so apply the unsigned factor instead. */
|
||||
plane_from_point_normal_v3(plane, depth_pt, rv3d->viewinv[2]);
|
||||
|
||||
isect_ray_plane_v3(ray_origin, ray_direction, plane, &lambda, false);
|
||||
|
@ -774,7 +774,7 @@ bool constraints_list_needinv(TransInfo *t, ListBase *list)
|
||||
bConstraint *con;
|
||||
|
||||
/* loop through constraints, checking if there's one of the mentioned
|
||||
* constraints needing special crazyspace corrections
|
||||
* constraints needing special crazy-space corrections
|
||||
*/
|
||||
if (list) {
|
||||
for (con = list->first; con; con = con->next) {
|
||||
|
@ -149,7 +149,7 @@ static void MaskPointToTransData(Scene *scene,
|
||||
|
||||
/* CV coords are scaled by aspects. this is needed for rotations and
|
||||
* proportional editing to be consistent with the stretched CV coords
|
||||
* that are displayed. this also means that for display and numinput,
|
||||
* that are displayed. this also means that for display and number-input,
|
||||
* and when the CV coords are flushed, these are converted each time */
|
||||
mul_v2_m3v2(td2d->loc, parent_matrix, bezt->vec[i]);
|
||||
td2d->loc[0] *= asp[0];
|
||||
|
@ -794,11 +794,11 @@ void createTransEditVerts(TransInfo *t)
|
||||
t->depsgraph, scene_eval, obedit_eval, em_eval, &defmats, &defcos);
|
||||
}
|
||||
|
||||
/* if we still have more modifiers, also do crazyspace
|
||||
* correction with quats, relative to the coordinates after
|
||||
* the modifiers that support deform matrices (defcos) */
|
||||
/* If we still have more modifiers, also do crazy-space
|
||||
* correction with \a quats, relative to the coordinates after
|
||||
* the modifiers that support deform matrices \a defcos. */
|
||||
|
||||
#if 0 /* TODO, fix crazyspace+extrude so it can be enabled for general use - campbell */
|
||||
#if 0 /* TODO, fix crazy-space & extrude so it can be enabled for general use - campbell */
|
||||
if ((totleft > 0) || (totleft == -1))
|
||||
#else
|
||||
if (totleft > 0)
|
||||
|
@ -88,8 +88,8 @@ typedef struct TransDataExtension {
|
||||
* It is the same but without the #Bone.bone_mat, see #TD_PBONE_LOCAL_MTX_C. */
|
||||
float l_smtx[3][3];
|
||||
/** The rotscale matrix of pose bone, to allow using snap-align in translation mode,
|
||||
* when td->mtx is the loc pose bone matrix (and hence can't be used to apply
|
||||
* rotation in some cases, namely when a bone is in "NoLocal" or "Hinge" mode)... */
|
||||
* when #TransData.mtx is the loc pose bone matrix (and hence can't be used to apply
|
||||
* rotation in some cases, namely when a bone is in "No-Local" or "Hinge" mode)... */
|
||||
float r_mtx[3][3];
|
||||
/** Inverse of previous one. */
|
||||
float r_smtx[3][3];
|
||||
|
@ -52,7 +52,7 @@ class ABCAbstractWriter : public AbstractHierarchyWriter {
|
||||
/* Returns true if the data to be written is actually supported. This would, for example, allow a
|
||||
* hypothetical camera writer accept a perspective camera but reject an orthogonal one.
|
||||
*
|
||||
* Returning false from a transform writer will prevent the object and all its decendants from
|
||||
* Returning false from a transform writer will prevent the object and all its descendants from
|
||||
* being exported. Returning false from a data writer (object data, hair, or particles) will
|
||||
* only prevent that data from being written (and thus cause the object to be exported as an
|
||||
* Empty). */
|
||||
|
@ -43,7 +43,7 @@ class ABCGenericMeshWriter : public ABCAbstractWriter {
|
||||
Alembic::AbcGeom::OSubDSchema abc_subdiv_schema_;
|
||||
|
||||
/* Determines whether a poly mesh or a subdivision surface is exported.
|
||||
* The value is set by an export option but only true if there is a subsdivision modifier on the
|
||||
* The value is set by an export option but only true if there is a subdivision modifier on the
|
||||
* exported object. */
|
||||
bool is_subd_;
|
||||
ModifierData *subsurf_modifier_;
|
||||
|
@ -296,10 +296,10 @@ static void panel_draw(const bContext *C, Panel *panel)
|
||||
|
||||
/**
|
||||
* Changing some of the properties can not be done once there is an
|
||||
* actual displacement stored for this multires modifier. This check
|
||||
* will disallow changes for those properties.
|
||||
* This check is a bit stupif but it should be sufficient for the usual
|
||||
* multires usage. It might become less strict and only disallow
|
||||
* actual displacement stored for this multi-resolution modifier.
|
||||
* This check will disallow changes for those properties.
|
||||
* This check is a bit stupid but it should be sufficient for the usual
|
||||
* multi-resolution usage. It might become less strict and only disallow
|
||||
* modifications if there is CD_MDISPS layer, or if there is actual
|
||||
* non-zero displacement, but such checks will be too slow to be done
|
||||
* on every redraw.
|
||||
|
@ -190,8 +190,8 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *UNUSED(ctx)
|
||||
break;
|
||||
}
|
||||
/* TODO(jbakker): Dualcon crashes when run in parallel. Could be related to incorrect
|
||||
* input data or that the library isn't thread safe. This was identified when changing the task
|
||||
* isolations during T76553. */
|
||||
* input data or that the library isn't thread safe.
|
||||
* This was identified when changing the task isolation's during T76553. */
|
||||
static ThreadMutex dualcon_mutex = BLI_MUTEX_INITIALIZER;
|
||||
BLI_mutex_lock(&dualcon_mutex);
|
||||
output = dualcon(&input,
|
||||
|
@ -153,12 +153,11 @@ static void verify_socket_template_list(bNodeTree *ntree,
|
||||
/* and we put back the verified sockets */
|
||||
stemp = stemp_first;
|
||||
if (socklist->first) {
|
||||
/* some dynamic sockets left, store the list start
|
||||
* so we can add static sockets infront of it.
|
||||
*/
|
||||
/* Some dynamic sockets left, store the list start
|
||||
* so we can add static sockets in front of it. */
|
||||
sock = (bNodeSocket *)socklist->first;
|
||||
while (stemp->type != -1) {
|
||||
/* put static sockets infront of dynamic */
|
||||
/* Put static sockets in front of dynamic. */
|
||||
BLI_insertlinkbefore(socklist, sock, stemp->sock);
|
||||
stemp++;
|
||||
}
|
||||
|
@ -165,10 +165,10 @@ void WM_operator_free_all_after(wmWindowManager *wm, struct wmOperator *op)
|
||||
|
||||
/**
|
||||
* Use with extreme care!,
|
||||
* properties, customdata etc - must be compatible.
|
||||
* properties, custom-data etc - must be compatible.
|
||||
*
|
||||
* \param op: Operator to assign the type to.
|
||||
* \param ot: OperatorType to assign.
|
||||
* \param ot: Operator type to assign.
|
||||
*/
|
||||
void WM_operator_type_set(wmOperator *op, wmOperatorType *ot)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user