forked from bartvdbraak/blender
Cleanup: spelling
This commit is contained in:
parent
0c58ad8a34
commit
bb6765f28f
@ -26,7 +26,7 @@ ccl_device void kernel_path_init(KernelGlobals *kg)
|
|||||||
int ray_index = ccl_global_id(0) + ccl_global_id(1) * ccl_global_size(0);
|
int ray_index = ccl_global_id(0) + ccl_global_id(1) * ccl_global_size(0);
|
||||||
|
|
||||||
/* This is the first assignment to ray_state;
|
/* This is the first assignment to ray_state;
|
||||||
* So we dont use ASSIGN_RAY_STATE macro.
|
* So we don't use ASSIGN_RAY_STATE macro.
|
||||||
*/
|
*/
|
||||||
kernel_split_state.ray_state[ray_index] = RAY_ACTIVE;
|
kernel_split_state.ray_state[ray_index] = RAY_ACTIVE;
|
||||||
|
|
||||||
|
@ -282,7 +282,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system,
|
|||||||
m_wintab.maxAzimuth = Orientation[0].axMax;
|
m_wintab.maxAzimuth = Orientation[0].axMax;
|
||||||
m_wintab.maxAltitude = Orientation[1].axMax;
|
m_wintab.maxAltitude = Orientation[1].axMax;
|
||||||
}
|
}
|
||||||
else { /* no so dont do tilt stuff */
|
else { /* No so don't do tilt stuff. */
|
||||||
m_wintab.maxAzimuth = m_wintab.maxAltitude = 0;
|
m_wintab.maxAzimuth = m_wintab.maxAltitude = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1057,7 +1057,7 @@ void GHOST_WindowWin32::processWin32TabletInitEvent()
|
|||||||
m_wintab.maxAzimuth = Orientation[0].axMax;
|
m_wintab.maxAzimuth = Orientation[0].axMax;
|
||||||
m_wintab.maxAltitude = Orientation[1].axMax;
|
m_wintab.maxAltitude = Orientation[1].axMax;
|
||||||
}
|
}
|
||||||
else { /* no so dont do tilt stuff */
|
else { /* No so don't do tilt stuff. */
|
||||||
m_wintab.maxAzimuth = m_wintab.maxAltitude = 0;
|
m_wintab.maxAzimuth = m_wintab.maxAltitude = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
#include <stdio.h> /* needed for FILE* */
|
#include <stdio.h> /* needed for FILE* */
|
||||||
|
|
||||||
/* needed for uintptr_t and attributes, exception, dont use BLI anywhere else in MEM_* */
|
/* Needed for uintptr_t and attributes, exception, don't use BLI anywhere else in `MEM_*` */
|
||||||
#include "../../source/blender/blenlib/BLI_compiler_attrs.h"
|
#include "../../source/blender/blenlib/BLI_compiler_attrs.h"
|
||||||
#include "../../source/blender/blenlib/BLI_sys_types.h"
|
#include "../../source/blender/blenlib/BLI_sys_types.h"
|
||||||
|
|
||||||
|
@ -359,7 +359,7 @@ void DM_init(DerivedMesh *dm,
|
|||||||
dm->needsFree = 1;
|
dm->needsFree = 1;
|
||||||
dm->dirty = (DMDirtyFlag)0;
|
dm->dirty = (DMDirtyFlag)0;
|
||||||
|
|
||||||
/* don't use CustomData_reset(...); because we dont want to touch customdata */
|
/* Don't use CustomData_reset(...); because we don't want to touch custom-data. */
|
||||||
copy_vn_i(dm->vertData.typemap, CD_NUMTYPES, -1);
|
copy_vn_i(dm->vertData.typemap, CD_NUMTYPES, -1);
|
||||||
copy_vn_i(dm->edgeData.typemap, CD_NUMTYPES, -1);
|
copy_vn_i(dm->edgeData.typemap, CD_NUMTYPES, -1);
|
||||||
copy_vn_i(dm->faceData.typemap, CD_NUMTYPES, -1);
|
copy_vn_i(dm->faceData.typemap, CD_NUMTYPES, -1);
|
||||||
|
@ -341,7 +341,7 @@ void BKE_editmesh_loop_tangent_calc(BMEditMesh *em,
|
|||||||
|
|
||||||
/* map faces to quads */
|
/* map faces to quads */
|
||||||
if (em->tottri != bm->totface) {
|
if (em->tottri != bm->totface) {
|
||||||
/* over alloc, since we dont know how many ngon or quads we have */
|
/* Over allocate, since we don't know how many ngon or quads we have. */
|
||||||
|
|
||||||
/* map fake face index to looptri */
|
/* map fake face index to looptri */
|
||||||
face_as_quad_map = MEM_mallocN(sizeof(int) * totface, __func__);
|
face_as_quad_map = MEM_mallocN(sizeof(int) * totface, __func__);
|
||||||
|
@ -2310,7 +2310,7 @@ static void adaptive_domain_adjust(
|
|||||||
z - fds->res_min[2]);
|
z - fds->res_min[2]);
|
||||||
max_den = (fuel) ? MAX2(density[index], fuel[index]) : density[index];
|
max_den = (fuel) ? MAX2(density[index], fuel[index]) : density[index];
|
||||||
|
|
||||||
/* check high resolution bounds if max density isnt already high enough */
|
/* Check high resolution bounds if max density isn't already high enough. */
|
||||||
if (max_den < fds->adapt_threshold && fds->flags & FLUID_DOMAIN_USE_NOISE && fds->fluid) {
|
if (max_den < fds->adapt_threshold && fds->flags & FLUID_DOMAIN_USE_NOISE && fds->fluid) {
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
/* high res grid index */
|
/* high res grid index */
|
||||||
|
@ -881,7 +881,7 @@ Mesh *BKE_mesh_new_nomain(
|
|||||||
NULL, ID_ME, BKE_idtype_idcode_to_name(ID_ME), LIB_ID_CREATE_LOCALIZE);
|
NULL, ID_ME, BKE_idtype_idcode_to_name(ID_ME), LIB_ID_CREATE_LOCALIZE);
|
||||||
BKE_libblock_init_empty(&mesh->id);
|
BKE_libblock_init_empty(&mesh->id);
|
||||||
|
|
||||||
/* don't use CustomData_reset(...); because we dont want to touch customdata */
|
/* Don't use CustomData_reset(...); because we don't want to touch custom-data. */
|
||||||
copy_vn_i(mesh->vdata.typemap, CD_NUMTYPES, -1);
|
copy_vn_i(mesh->vdata.typemap, CD_NUMTYPES, -1);
|
||||||
copy_vn_i(mesh->edata.typemap, CD_NUMTYPES, -1);
|
copy_vn_i(mesh->edata.typemap, CD_NUMTYPES, -1);
|
||||||
copy_vn_i(mesh->fdata.typemap, CD_NUMTYPES, -1);
|
copy_vn_i(mesh->fdata.typemap, CD_NUMTYPES, -1);
|
||||||
|
@ -635,7 +635,7 @@ void BKE_mesh_calc_loop_tangent_ex(const MVert *mvert,
|
|||||||
|
|
||||||
/* map faces to quads */
|
/* map faces to quads */
|
||||||
if (looptri_len != mpoly_len) {
|
if (looptri_len != mpoly_len) {
|
||||||
/* over alloc, since we dont know how many ngon or quads we have */
|
/* Over allocate, since we don't know how many ngon or quads we have. */
|
||||||
|
|
||||||
/* map fake face index to looptri */
|
/* map fake face index to looptri */
|
||||||
face_as_quad_map = MEM_mallocN(sizeof(int) * looptri_len, __func__);
|
face_as_quad_map = MEM_mallocN(sizeof(int) * looptri_len, __func__);
|
||||||
|
@ -22,7 +22,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* only include from header */
|
/* only include from header */
|
||||||
#ifndef __BLI_ENDIAN_SWITCH_H__
|
#ifndef __BLI_ENDIAN_SWITCH_H__
|
||||||
# error "this file isnt to be directly included"
|
# error "this file isn't to be directly included"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** \file
|
/** \file
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
* \brief Single link-list utility macros. (header only api).
|
* \brief Single link-list utility macros. (header only api).
|
||||||
*
|
*
|
||||||
* Use this api when the structure defines its own ``next`` pointer
|
* Use this api when the structure defines its own ``next`` pointer
|
||||||
* and a double linked list such as #ListBase isnt needed.
|
* and a double linked list such as #ListBase isn't needed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define BLI_LINKS_PREPEND(list, link) \
|
#define BLI_LINKS_PREPEND(list, link) \
|
||||||
|
@ -58,7 +58,7 @@ typedef intptr_t offset_t;
|
|||||||
* typically we rely on the 'count' to avoid iterating past the end. */
|
* typically we rely on the 'count' to avoid iterating past the end. */
|
||||||
// #define USE_TERMINATE_PARANOID
|
// #define USE_TERMINATE_PARANOID
|
||||||
|
|
||||||
/* Currently totalloc isnt used. */
|
/* Currently totalloc isn't used. */
|
||||||
// #define USE_TOTALLOC
|
// #define USE_TOTALLOC
|
||||||
|
|
||||||
/* pad must be power of two */
|
/* pad must be power of two */
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
*/
|
*/
|
||||||
#define USEDWORD MAKE_ID('u', 's', 'e', 'd')
|
#define USEDWORD MAKE_ID('u', 's', 'e', 'd')
|
||||||
|
|
||||||
/* currently totalloc isnt used */
|
/* Currently totalloc isn't used. */
|
||||||
// #define USE_TOTALLOC
|
// #define USE_TOTALLOC
|
||||||
|
|
||||||
/* optimize pool size */
|
/* optimize pool size */
|
||||||
|
@ -1289,7 +1289,7 @@ static BChunkList *bchunk_list_from_data_merge(const BArrayInfo *info,
|
|||||||
|
|
||||||
BLI_assert(i_prev <= data_len);
|
BLI_assert(i_prev <= data_len);
|
||||||
for (size_t i = i_prev; i < data_len;) {
|
for (size_t i = i_prev; i < data_len;) {
|
||||||
/* Assumes exiting chunk isnt a match! */
|
/* Assumes exiting chunk isn't a match! */
|
||||||
|
|
||||||
const BChunkRef *cref_found = table_lookup(
|
const BChunkRef *cref_found = table_lookup(
|
||||||
info, table, table_len, i_table_start, data, data_len, i, table_hash_array);
|
info, table, table_len, i_table_start, data, data_len, i, table_hash_array);
|
||||||
@ -1317,7 +1317,7 @@ static BChunkList *bchunk_list_from_data_merge(const BArrayInfo *info,
|
|||||||
BChunk *chunk_found = cref_found->link;
|
BChunk *chunk_found = cref_found->link;
|
||||||
|
|
||||||
if (bchunk_data_compare(chunk_found, data, data_len, i_prev)) {
|
if (bchunk_data_compare(chunk_found, data, data_len, i_prev)) {
|
||||||
/* may be useful to remove table data, assuming we dont have
|
/* May be useful to remove table data, assuming we don't have
|
||||||
* repeating memory where it would be useful to re-use chunks. */
|
* repeating memory where it would be useful to re-use chunks. */
|
||||||
i += chunk_found->data_len;
|
i += chunk_found->data_len;
|
||||||
bchunk_list_append(info, bs_mem, chunk_list, chunk_found);
|
bchunk_list_append(info, bs_mem, chunk_list, chunk_found);
|
||||||
|
@ -193,7 +193,7 @@ void _bli_array_binary_or(
|
|||||||
* \param span_step: Indices to iterate over,
|
* \param span_step: Indices to iterate over,
|
||||||
* initialize both values to the array length to initialize iteration.
|
* initialize both values to the array length to initialize iteration.
|
||||||
* \param r_span_len: The length of the span, useful when \a use_wrap is enabled,
|
* \param r_span_len: The length of the span, useful when \a use_wrap is enabled,
|
||||||
* where calculating the length isnt a simple subtraction.
|
* where calculating the length isn't a simple subtraction.
|
||||||
*/
|
*/
|
||||||
bool _bli_array_iter_span(const void *arr,
|
bool _bli_array_iter_span(const void *arr,
|
||||||
unsigned int arr_len,
|
unsigned int arr_len,
|
||||||
|
@ -167,7 +167,7 @@ bool BLI_tridiagonal_solve_cyclic(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prepare the noncyclic system; relies on tridiagonal_solve ignoring values */
|
/* Prepare the non-cyclic system; relies on tridiagonal_solve ignoring values. */
|
||||||
memcpy(b2, b, bytes);
|
memcpy(b2, b, bytes);
|
||||||
b2[0] -= a0;
|
b2[0] -= a0;
|
||||||
b2[count - 1] -= cN;
|
b2[count - 1] -= cN;
|
||||||
|
@ -939,7 +939,7 @@ void BM_data_layer_free(BMesh *bm, CustomData *data, int type)
|
|||||||
data->pool = NULL;
|
data->pool = NULL;
|
||||||
|
|
||||||
has_layer = CustomData_free_layer_active(data, type, 0);
|
has_layer = CustomData_free_layer_active(data, type, 0);
|
||||||
/* assert because its expensive to realloc - better not do if layer isnt present */
|
/* Assert because its expensive to realloc - better not do if layer isn't present. */
|
||||||
BLI_assert(has_layer != false);
|
BLI_assert(has_layer != false);
|
||||||
UNUSED_VARS_NDEBUG(has_layer);
|
UNUSED_VARS_NDEBUG(has_layer);
|
||||||
|
|
||||||
@ -961,7 +961,7 @@ void BM_data_layer_free_n(BMesh *bm, CustomData *data, int type, int n)
|
|||||||
data->pool = NULL;
|
data->pool = NULL;
|
||||||
|
|
||||||
has_layer = CustomData_free_layer(data, type, 0, CustomData_get_layer_index_n(data, type, n));
|
has_layer = CustomData_free_layer(data, type, 0, CustomData_get_layer_index_n(data, type, n));
|
||||||
/* assert because its expensive to realloc - better not do if layer isnt present */
|
/* Assert because its expensive to realloc - better not do if layer isn't present. */
|
||||||
BLI_assert(has_layer != false);
|
BLI_assert(has_layer != false);
|
||||||
UNUSED_VARS_NDEBUG(has_layer);
|
UNUSED_VARS_NDEBUG(has_layer);
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ int BMO_iter_as_array(BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
|
|||||||
/**
|
/**
|
||||||
* \brief Iterator as Array
|
* \brief Iterator as Array
|
||||||
*
|
*
|
||||||
* Allocates a new array, has the advantage that you dont need to know the size ahead of time.
|
* Allocates a new array, has the advantage that you don't need to know the size ahead of time.
|
||||||
*
|
*
|
||||||
* Takes advantage of less common iterator usage to avoid counting twice,
|
* Takes advantage of less common iterator usage to avoid counting twice,
|
||||||
* which you might end up doing when #BM_iter_as_array is used.
|
* which you might end up doing when #BM_iter_as_array is used.
|
||||||
@ -410,7 +410,7 @@ int BM_iter_mesh_count_flag(const char itype, BMesh *bm, const char hflag, const
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* see bug T36923 for why we need this,
|
/* see bug T36923 for why we need this,
|
||||||
* allow adding but not removing, this isnt _totally_ safe since
|
* allow adding but not removing, this isn't _totally_ safe since
|
||||||
* you could add/remove within the same loop, but catches common cases
|
* you could add/remove within the same loop, but catches common cases
|
||||||
*/
|
*/
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -58,7 +58,7 @@ static int bm_face_connect_verts(BMesh *bm, BMFace *f, const bool check_degenera
|
|||||||
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
|
l_iter = l_first = BM_FACE_FIRST_LOOP(f);
|
||||||
do {
|
do {
|
||||||
if (BMO_vert_flag_test(bm, l_iter->v, VERT_INPUT) &&
|
if (BMO_vert_flag_test(bm, l_iter->v, VERT_INPUT) &&
|
||||||
/* ensure this vertex isnt part of a contiguous group */
|
/* Ensure this vertex isn't part of a contiguous group. */
|
||||||
((BMO_vert_flag_test(bm, l_iter->prev->v, VERT_INPUT) == 0) ||
|
((BMO_vert_flag_test(bm, l_iter->prev->v, VERT_INPUT) == 0) ||
|
||||||
(BMO_vert_flag_test(bm, l_iter->next->v, VERT_INPUT) == 0))) {
|
(BMO_vert_flag_test(bm, l_iter->next->v, VERT_INPUT) == 0))) {
|
||||||
if (!l_tag_prev) {
|
if (!l_tag_prev) {
|
||||||
|
@ -586,8 +586,8 @@ static bool bm_edge_test_cb(BMEdge *e, void *bm_v)
|
|||||||
|
|
||||||
static bool bm_edge_test_rail_cb(BMEdge *e, void *UNUSED(bm_v))
|
static bool bm_edge_test_rail_cb(BMEdge *e, void *UNUSED(bm_v))
|
||||||
{
|
{
|
||||||
/* normally operators dont check for hidden state
|
/* Normally operators don't check for hidden state
|
||||||
* but alternative would be to pass slot of rail edges */
|
* but alternative would be to pass slot of rail edges. */
|
||||||
if (BM_elem_flag_test(e, BM_ELEM_HIDDEN)) {
|
if (BM_elem_flag_test(e, BM_ELEM_HIDDEN)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -599,7 +599,7 @@ void bmo_collapse_uvs_exec(BMesh *bm, BMOperator *op)
|
|||||||
const short oflag = EDGE_MARK;
|
const short oflag = EDGE_MARK;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* check flags dont change once set */
|
/* Check flags don't change once set. */
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
int tot_test;
|
int tot_test;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1344,7 +1344,7 @@ void BM_mesh_esubdivide(BMesh *bm,
|
|||||||
{
|
{
|
||||||
BMOperator op;
|
BMOperator op;
|
||||||
|
|
||||||
/* use_sphere isnt exposed here since its only used for new primitives */
|
/* `use_sphere` isn't exposed here since its only used for new primitives. */
|
||||||
BMO_op_initf(bm,
|
BMO_op_initf(bm,
|
||||||
&op,
|
&op,
|
||||||
BMO_FLAG_DEFAULTS,
|
BMO_FLAG_DEFAULTS,
|
||||||
|
@ -932,7 +932,7 @@ static void bm_edgering_pair_order(BMesh *bm,
|
|||||||
BLI_assert(bm_edgering_pair_order_is_flipped(bm, el_store_a, el_store_b) == false);
|
BLI_assert(bm_edgering_pair_order_is_flipped(bm, el_store_a, el_store_b) == false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* if we dont share and edge - flip */
|
/* If we don't share and edge - flip. */
|
||||||
BMEdge *e = BM_edge_exists(((LinkData *)lb_a->first)->data, ((LinkData *)lb_b->first)->data);
|
BMEdge *e = BM_edge_exists(((LinkData *)lb_a->first)->data, ((LinkData *)lb_b->first)->data);
|
||||||
if (e == NULL || !BMO_edge_flag_test(bm, e, EDGE_RING)) {
|
if (e == NULL || !BMO_edge_flag_test(bm, e, EDGE_RING)) {
|
||||||
BM_edgeloop_flip(bm, el_store_b);
|
BM_edgeloop_flip(bm, el_store_b);
|
||||||
|
@ -939,7 +939,7 @@ static bool bm_edge_collapse_is_degenerate_topology(BMEdge *e_first)
|
|||||||
* intended for speed over flexibility.
|
* intended for speed over flexibility.
|
||||||
* can only collapse edges connected to (1, 2) tris.
|
* can only collapse edges connected to (1, 2) tris.
|
||||||
*
|
*
|
||||||
* Important - dont add vert/edge/face data on collapsing!
|
* Important - don't add vert/edge/face data on collapsing!
|
||||||
*
|
*
|
||||||
* \param r_e_clear_other: Let caller know what edges we remove besides \a e_clear
|
* \param r_e_clear_other: Let caller know what edges we remove besides \a e_clear
|
||||||
* \param customdata_flag: Merge factor, scales from 0 - 1 ('v_clear' -> 'v_other')
|
* \param customdata_flag: Merge factor, scales from 0 - 1 ('v_clear' -> 'v_other')
|
||||||
@ -1394,7 +1394,7 @@ void BM_mesh_decimate_collapse(BMesh *bm,
|
|||||||
* \note
|
* \note
|
||||||
* - `eheap_table[e_index_mirr]` is only removed from the heap at the last moment
|
* - `eheap_table[e_index_mirr]` is only removed from the heap at the last moment
|
||||||
* since its possible (in theory) for collapsing `e` to remove `e_mirr`.
|
* since its possible (in theory) for collapsing `e` to remove `e_mirr`.
|
||||||
* - edges sharing a vertex are ignored, so the pivot vertex isnt moved to one side.
|
* - edges sharing a vertex are ignored, so the pivot vertex isn't moved to one side.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BMEdge *e = BLI_heap_pop_min(eheap);
|
BMEdge *e = BLI_heap_pop_min(eheap);
|
||||||
|
@ -401,7 +401,7 @@ void BM_mesh_decimate_dissolve_ex(BMesh *bm,
|
|||||||
earray[i] = e_iter;
|
earray[i] = e_iter;
|
||||||
}
|
}
|
||||||
/* Remove all edges/verts left behind from dissolving,
|
/* Remove all edges/verts left behind from dissolving,
|
||||||
* NULL'ing the vertex array so we dont re-use. */
|
* NULL'ing the vertex array so we don't re-use. */
|
||||||
for (i = bm->totedge - 1; i != -1; i--) {
|
for (i = bm->totedge - 1; i != -1; i--) {
|
||||||
e_iter = earray[i];
|
e_iter = earray[i];
|
||||||
|
|
||||||
|
@ -77,12 +77,12 @@ static bool bm_vert_dissolve_fan_test(BMVert *v)
|
|||||||
|
|
||||||
static bool bm_vert_dissolve_fan(BMesh *bm, BMVert *v)
|
static bool bm_vert_dissolve_fan(BMesh *bm, BMVert *v)
|
||||||
{
|
{
|
||||||
/* collapse under 2 conditions.
|
/* Collapse under 2 conditions:
|
||||||
* - vert connects to 4 manifold edges (and 4 faces).
|
* - vert connects to 4 manifold edges (and 4 faces).
|
||||||
* - vert connects to 1 manifold edge, 2 boundary edges (and 2 faces).
|
* - vert connects to 1 manifold edge, 2 boundary edges (and 2 faces).
|
||||||
*
|
*
|
||||||
* This covers boundary verts of a quad grid and center verts.
|
* This covers boundary verts of a quad grid and center verts.
|
||||||
* note that surrounding faces dont have to be quads.
|
* note that surrounding faces don't have to be quads.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BMIter iter;
|
BMIter iter;
|
||||||
|
@ -94,7 +94,7 @@ typedef enum OrderOfChunks {
|
|||||||
COM_TO_RANDOM = 1,
|
COM_TO_RANDOM = 1,
|
||||||
/** \brief no ordering */
|
/** \brief no ordering */
|
||||||
COM_TO_TOP_DOWN = 2,
|
COM_TO_TOP_DOWN = 2,
|
||||||
/** \brief experimental ordering with 9 hotspots */
|
/** \brief experimental ordering with 9 hot-spots. */
|
||||||
COM_TO_RULE_OF_THIRDS = 3,
|
COM_TO_RULE_OF_THIRDS = 3,
|
||||||
} OrderOfChunks;
|
} OrderOfChunks;
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include "BKE_global.h"
|
#include "BKE_global.h"
|
||||||
|
|
||||||
#if COM_CURRENT_THREADING_MODEL == COM_TM_NOTHREAD
|
#if COM_CURRENT_THREADING_MODEL == COM_TM_NOTHREAD
|
||||||
# ifndef DEBUG /* test this so we dont get warnings in debug builds */
|
# ifndef DEBUG /* Test this so we don't get warnings in debug builds. */
|
||||||
# warning COM_CURRENT_THREADING_MODEL COM_TM_NOTHREAD is activated. Use only for debugging.
|
# warning COM_CURRENT_THREADING_MODEL COM_TM_NOTHREAD is activated. Use only for debugging.
|
||||||
# endif
|
# endif
|
||||||
#elif COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE
|
#elif COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
inline float colorbalance_lgg(float in, float lift_lgg, float gamma_inv, float gain)
|
inline float colorbalance_lgg(float in, float lift_lgg, float gamma_inv, float gain)
|
||||||
{
|
{
|
||||||
/* 1:1 match with the sequencer with linear/srgb conversions, the conversion isnt pretty
|
/* 1:1 match with the sequencer with linear/srgb conversions, the conversion isn't pretty
|
||||||
* but best keep it this way, since testing for durian shows a similar calculation
|
* but best keep it this way, since testing for durian shows a similar calculation
|
||||||
* without lin/srgb conversions gives bad results (over-saturated shadows) with colors
|
* without lin/srgb conversions gives bad results (over-saturated shadows) with colors
|
||||||
* slightly below 1.0. some correction can be done but it ends up looking bad for shadows or
|
* slightly below 1.0. some correction can be done but it ends up looking bad for shadows or
|
||||||
|
@ -112,7 +112,7 @@ int main(int argc, char **argv)
|
|||||||
fprintf(fpout, "%3d,", getc(fpin));
|
fprintf(fpout, "%3d,", getc(fpin));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* trailing NULL terminator, this isnt needed in some cases and
|
/* Trailing NULL terminator, this isn't needed in some cases and
|
||||||
* won't be taken into account by the size variable, but its useful when dealing with
|
* won't be taken into account by the size variable, but its useful when dealing with
|
||||||
* NULL terminated string data */
|
* NULL terminated string data */
|
||||||
fprintf(fpout, "0\n};\n\n");
|
fprintf(fpout, "0\n};\n\n");
|
||||||
|
@ -164,7 +164,7 @@ static struct GPUTexture *image_camera_background_texture_get(CameraBGImage *bgp
|
|||||||
|
|
||||||
BKE_image_user_frame_calc(image, iuser, ctime);
|
BKE_image_user_frame_calc(image, iuser, ctime);
|
||||||
if (image->source == IMA_SRC_SEQUENCE && !(iuser->flag & IMA_USER_FRAME_IN_RANGE)) {
|
if (image->source == IMA_SRC_SEQUENCE && !(iuser->flag & IMA_USER_FRAME_IN_RANGE)) {
|
||||||
/* Frame is out of range, dont show. */
|
/* Frame is out of range, don't show. */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,8 @@ void main()
|
|||||||
fragColor *= line_coverage(dist, line_kernel);
|
fragColor *= line_coverage(dist, line_kernel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We dont order fragments but use alpha over/alpha under based on current minimum frag depth. */
|
/* We don't order fragments but use alpha over/alpha under based on current minimum frag depth.
|
||||||
|
*/
|
||||||
neighbor_blend(coverage.x, depths.x, neightbor_col0, depth, fragColor);
|
neighbor_blend(coverage.x, depths.x, neightbor_col0, depth, fragColor);
|
||||||
neighbor_blend(coverage.y, depths.y, neightbor_col1, depth, fragColor);
|
neighbor_blend(coverage.y, depths.y, neightbor_col1, depth, fragColor);
|
||||||
neighbor_blend(coverage.z, depths.z, neightbor_col2, depth, fragColor);
|
neighbor_blend(coverage.z, depths.z, neightbor_col2, depth, fragColor);
|
||||||
|
@ -15,10 +15,10 @@ in uint flag;
|
|||||||
/* ---- Per instance Attrs ---- */
|
/* ---- Per instance Attrs ---- */
|
||||||
in vec3 boneStart;
|
in vec3 boneStart;
|
||||||
in vec3 boneEnd;
|
in vec3 boneEnd;
|
||||||
in vec4 wireColor; /* alpha encode if we do wire. If 0.0 we dont. */
|
in vec4 wireColor; /* alpha encode if we do wire. If 0.0 we don't. */
|
||||||
in vec4 boneColor; /* alpha encode if we do bone. If 0.0 we dont. */
|
in vec4 boneColor; /* alpha encode if we do bone. If 0.0 we don't. */
|
||||||
in vec4 headColor; /* alpha encode if we do head. If 0.0 we dont. */
|
in vec4 headColor; /* alpha encode if we do head. If 0.0 we don't. */
|
||||||
in vec4 tailColor; /* alpha encode if we do tail. If 0.0 we dont. */
|
in vec4 tailColor; /* alpha encode if we do tail. If 0.0 we don't. */
|
||||||
|
|
||||||
#define do_wire (wireColor.a > 0.0)
|
#define do_wire (wireColor.a > 0.0)
|
||||||
#define is_head bool(flag & POS_HEAD)
|
#define is_head bool(flag & POS_HEAD)
|
||||||
|
@ -68,7 +68,7 @@ void workbench_engine_init(void *ved)
|
|||||||
wpd->object_id_tx = DRW_texture_pool_query_fullscreen(GPU_R16UI, &draw_engine_workbench);
|
wpd->object_id_tx = DRW_texture_pool_query_fullscreen(GPU_R16UI, &draw_engine_workbench);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Dont free because it's a pool texture. */
|
/* Don't free because it's a pool texture. */
|
||||||
wpd->object_id_tx = NULL;
|
wpd->object_id_tx = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ DRWView *DRW_view_create_with_zoffset(const DRWView *parent_view,
|
|||||||
|
|
||||||
float viewdist = rv3d->dist;
|
float viewdist = rv3d->dist;
|
||||||
|
|
||||||
/* special exception for ortho camera (viewdist isnt used for perspective cameras) */
|
/* special exception for ortho camera (`viewdist` isn't used for perspective cameras). */
|
||||||
if (rv3d->persp == RV3D_CAMOB && rv3d->is_persp == false) {
|
if (rv3d->persp == RV3D_CAMOB && rv3d->is_persp == false) {
|
||||||
viewdist = 1.0f / max_ff(fabsf(winmat[0][0]), fabsf(winmat[1][1]));
|
viewdist = 1.0f / max_ff(fabsf(winmat[0][0]), fabsf(winmat[1][1]));
|
||||||
}
|
}
|
||||||
|
@ -3092,7 +3092,7 @@ void DRW_opengl_context_destroy(void)
|
|||||||
void DRW_opengl_context_enable_ex(bool UNUSED(restore))
|
void DRW_opengl_context_enable_ex(bool UNUSED(restore))
|
||||||
{
|
{
|
||||||
if (DST.gl_context != NULL) {
|
if (DST.gl_context != NULL) {
|
||||||
/* IMPORTANT: We dont support immediate mode in render mode!
|
/* IMPORTANT: We don't support immediate mode in render mode!
|
||||||
* This shall remain in effect until immediate mode supports
|
* This shall remain in effect until immediate mode supports
|
||||||
* multiple threads. */
|
* multiple threads. */
|
||||||
BLI_ticket_mutex_lock(DST.gl_context_mutex);
|
BLI_ticket_mutex_lock(DST.gl_context_mutex);
|
||||||
|
@ -650,7 +650,7 @@ static void curve_draw_exec_precalc(wmOperator *op)
|
|||||||
prop = RNA_struct_find_property(op->ptr, "error_threshold");
|
prop = RNA_struct_find_property(op->ptr, "error_threshold");
|
||||||
if (!RNA_property_is_set(op->ptr, prop)) {
|
if (!RNA_property_is_set(op->ptr, prop)) {
|
||||||
|
|
||||||
/* error isnt set so we'll have to calculate it from the pixel values */
|
/* Error isn't set so we'll have to calculate it from the pixel values. */
|
||||||
BLI_mempool_iter iter;
|
BLI_mempool_iter iter;
|
||||||
const struct StrokeElem *selem, *selem_prev;
|
const struct StrokeElem *selem, *selem_prev;
|
||||||
|
|
||||||
|
@ -50,9 +50,12 @@ bool ED_transverts_poll(struct bContext *C);
|
|||||||
|
|
||||||
/* currently only used for bmesh index values */
|
/* currently only used for bmesh index values */
|
||||||
enum {
|
enum {
|
||||||
TM_INDEX_ON = 1, /* tag to make trans verts */
|
/** Tag to make trans verts. */
|
||||||
TM_INDEX_OFF = 0, /* don't make verts */
|
TM_INDEX_ON = 1,
|
||||||
TM_INDEX_SKIP = -1, /* dont make verts (when the index values point to trans-verts) */
|
/** Don't make verts. */
|
||||||
|
TM_INDEX_OFF = 0,
|
||||||
|
/** Don't make verts (when the index values point to trans-verts). */
|
||||||
|
TM_INDEX_SKIP = -1,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* mode flags: */
|
/* mode flags: */
|
||||||
|
@ -4162,7 +4162,7 @@ static void ui_def_but_rna__menu(bContext *UNUSED(C), uiLayout *layout, void *bu
|
|||||||
RNA_property_enum_items_gettexted(
|
RNA_property_enum_items_gettexted(
|
||||||
block->evil_C, &but->rnapoin, but->rnaprop, &item_array, NULL, &free);
|
block->evil_C, &but->rnapoin, but->rnaprop, &item_array, NULL, &free);
|
||||||
|
|
||||||
/* we dont want nested rows, cols in menus */
|
/* We don't want nested rows, cols in menus. */
|
||||||
UI_block_layout_set_current(block, layout);
|
UI_block_layout_set_current(block, layout);
|
||||||
|
|
||||||
int totitems = 0;
|
int totitems = 0;
|
||||||
|
@ -2097,7 +2097,7 @@ static void ui_apply_but(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data->select_others.elems_len == 0) {
|
if (data->select_others.elems_len == 0) {
|
||||||
/* dont check again */
|
/* Don't check again. */
|
||||||
data->select_others.elems_len = -1;
|
data->select_others.elems_len = -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -4894,7 +4894,7 @@ static bool ui_numedit_but_NUM(uiButNumber *number_but,
|
|||||||
else {
|
else {
|
||||||
/* only scale large int buttons */
|
/* only scale large int buttons */
|
||||||
non_linear_range_limit = 129.0f;
|
non_linear_range_limit = 129.0f;
|
||||||
/* larger for ints, we dont need to fine tune them */
|
/* Larger for ints, we don't need to fine tune them. */
|
||||||
non_linear_pixel_map = 250.0f;
|
non_linear_pixel_map = 250.0f;
|
||||||
|
|
||||||
/* prevent large ranges from getting too out of control */
|
/* prevent large ranges from getting too out of control */
|
||||||
@ -7779,7 +7779,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent *
|
|||||||
else if (data->multi_data.init == BUTTON_MULTI_INIT_SETUP) {
|
else if (data->multi_data.init == BUTTON_MULTI_INIT_SETUP) {
|
||||||
/* --> (BUTTON_MULTI_INIT_ENABLE) */
|
/* --> (BUTTON_MULTI_INIT_ENABLE) */
|
||||||
const float margin_x = DRAG_MULTINUM_THRESHOLD_DRAG_X / sqrtf(block->aspect);
|
const float margin_x = DRAG_MULTINUM_THRESHOLD_DRAG_X / sqrtf(block->aspect);
|
||||||
/* check if we're dont setting buttons */
|
/* Check if we're don't setting buttons. */
|
||||||
if ((data->str &&
|
if ((data->str &&
|
||||||
ELEM(data->state, BUTTON_STATE_TEXT_EDITING, BUTTON_STATE_NUM_EDITING)) ||
|
ELEM(data->state, BUTTON_STATE_TEXT_EDITING, BUTTON_STATE_NUM_EDITING)) ||
|
||||||
((abs(data->multi_data.drag_lock_x - event->x) > margin_x) &&
|
((abs(data->multi_data.drag_lock_x - event->x) > margin_x) &&
|
||||||
|
@ -813,7 +813,7 @@ static void ui_item_enum_expand_exec(uiLayout *layout,
|
|||||||
RNA_property_enum_items_gettexted(block->evil_C, ptr, prop, &item_array, NULL, &free);
|
RNA_property_enum_items_gettexted(block->evil_C, ptr, prop, &item_array, NULL, &free);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we dont want nested rows, cols in menus */
|
/* We don't want nested rows, cols in menus. */
|
||||||
uiLayout *layout_radial = NULL;
|
uiLayout *layout_radial = NULL;
|
||||||
if (radial) {
|
if (radial) {
|
||||||
if (layout->root->layout == layout) {
|
if (layout->root->layout == layout) {
|
||||||
|
@ -240,7 +240,7 @@ static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *region
|
|||||||
fstyle_mono.uifont_id = blf_mono_font;
|
fstyle_mono.uifont_id = blf_mono_font;
|
||||||
|
|
||||||
UI_fontstyle_set(&fstyle_mono);
|
UI_fontstyle_set(&fstyle_mono);
|
||||||
/* XXX, needed because we dont have mono in 'U.uifonts' */
|
/* XXX, needed because we don't have mono in 'U.uifonts' */
|
||||||
BLF_size(fstyle_mono.uifont_id, fstyle_mono.points * U.pixelsize, U.dpi);
|
BLF_size(fstyle_mono.uifont_id, fstyle_mono.points * U.pixelsize, U.dpi);
|
||||||
rgb_float_to_uchar(drawcol, tip_colors[field->format.color_id]);
|
rgb_float_to_uchar(drawcol, tip_colors[field->format.color_id]);
|
||||||
UI_fontstyle_draw(&fstyle_mono, &bbox, field->text, drawcol, &fs_params);
|
UI_fontstyle_draw(&fstyle_mono, &bbox, field->text, drawcol, &fs_params);
|
||||||
|
@ -2083,11 +2083,11 @@ void uiTemplateConstraints(uiLayout *UNUSED(layout), bContext *C, bool use_bone_
|
|||||||
UI_panels_free_instanced(C, region);
|
UI_panels_free_instanced(C, region);
|
||||||
bConstraint *con = (constraints == NULL) ? NULL : constraints->first;
|
bConstraint *con = (constraints == NULL) ? NULL : constraints->first;
|
||||||
for (int i = 0; con; i++, con = con->next) {
|
for (int i = 0; con; i++, con = con->next) {
|
||||||
/* Dont show invalid/legacy constraints. */
|
/* Don't show invalid/legacy constraints. */
|
||||||
if (con->type == CONSTRAINT_TYPE_NULL) {
|
if (con->type == CONSTRAINT_TYPE_NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Dont show temporary constraints (AutoIK and targetless IK constraints). */
|
/* Don't show temporary constraints (AutoIK and target-less IK constraints). */
|
||||||
if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
|
if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
|
||||||
bKinematicConstraint *data = con->data;
|
bKinematicConstraint *data = con->data;
|
||||||
if (data->flag & CONSTRAINT_IK_TEMP) {
|
if (data->flag & CONSTRAINT_IK_TEMP) {
|
||||||
@ -2116,11 +2116,11 @@ void uiTemplateConstraints(uiLayout *UNUSED(layout), bContext *C, bool use_bone_
|
|||||||
/* Assuming there's only one group of instanced panels, update the custom data pointers. */
|
/* Assuming there's only one group of instanced panels, update the custom data pointers. */
|
||||||
Panel *panel = region->panels.first;
|
Panel *panel = region->panels.first;
|
||||||
LISTBASE_FOREACH (bConstraint *, con, constraints) {
|
LISTBASE_FOREACH (bConstraint *, con, constraints) {
|
||||||
/* Dont show invalid/legacy constraints. */
|
/* Don't show invalid/legacy constraints. */
|
||||||
if (con->type == CONSTRAINT_TYPE_NULL) {
|
if (con->type == CONSTRAINT_TYPE_NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Dont show temporary constraints (AutoIK and targetless IK constraints). */
|
/* Don't show temporary constraints (AutoIK and target-less IK constraints). */
|
||||||
if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
|
if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
|
||||||
bKinematicConstraint *data = con->data;
|
bKinematicConstraint *data = con->data;
|
||||||
if (data->flag & CONSTRAINT_IK_TEMP) {
|
if (data->flag & CONSTRAINT_IK_TEMP) {
|
||||||
|
@ -1475,8 +1475,8 @@ static int delete_exec(bContext *C, wmOperator *UNUSED(op))
|
|||||||
spline = next_spline;
|
spline = next_spline;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* not essential but confuses users when there are keys with no data!
|
/* Not essential but confuses users when there are keys with no data!
|
||||||
* assume if they delete all data from the layer they also dont care about keys */
|
* Assume if they delete all data from the layer they also don't care about keys. */
|
||||||
if (BLI_listbase_is_empty(&mask_layer->splines)) {
|
if (BLI_listbase_is_empty(&mask_layer->splines)) {
|
||||||
BKE_mask_layer_free_shapes(mask_layer);
|
BKE_mask_layer_free_shapes(mask_layer);
|
||||||
}
|
}
|
||||||
|
@ -2548,7 +2548,7 @@ static void knifetool_finish_ex(KnifeTool_OpData *kcd)
|
|||||||
EDBM_mesh_normals_update(kcd->em);
|
EDBM_mesh_normals_update(kcd->em);
|
||||||
EDBM_update_generic(kcd->ob->data, true, true);
|
EDBM_update_generic(kcd->ob->data, true, true);
|
||||||
|
|
||||||
/* re-tessellating makes this invalid, dont use again by accident */
|
/* Re-tessellating makes this invalid, don't use again by accident. */
|
||||||
knifetool_free_bmbvh(kcd);
|
knifetool_free_bmbvh(kcd);
|
||||||
}
|
}
|
||||||
static void knifetool_finish(wmOperator *op)
|
static void knifetool_finish(wmOperator *op)
|
||||||
|
@ -386,7 +386,7 @@ static void edbm_ripsel_deselect_helper(BMesh *bm,
|
|||||||
* use for rebuilding face-fill
|
* use for rebuilding face-fill
|
||||||
*
|
*
|
||||||
* \note the method currently used fails for edges with 3+ face users and gives
|
* \note the method currently used fails for edges with 3+ face users and gives
|
||||||
* nasty holes in the mesh, there isnt a good way of knowing ahead of time
|
* nasty holes in the mesh, there isn't a good way of knowing ahead of time
|
||||||
* which loops will be split apart (its possible to figure out but quite involved).
|
* which loops will be split apart (its possible to figure out but quite involved).
|
||||||
* So for now this is a known limitation of current rip-fill option.
|
* So for now this is a known limitation of current rip-fill option.
|
||||||
*/
|
*/
|
||||||
|
@ -853,7 +853,7 @@ static BMElem *edbm_add_edge_face_exec__tricky_extend_sel(BMesh *bm)
|
|||||||
}
|
}
|
||||||
static void edbm_add_edge_face_exec__tricky_finalize_sel(BMesh *bm, BMElem *ele_desel, BMFace *f)
|
static void edbm_add_edge_face_exec__tricky_finalize_sel(BMesh *bm, BMElem *ele_desel, BMFace *f)
|
||||||
{
|
{
|
||||||
/* now we need to find the edge that isnt connected to this element */
|
/* Now we need to find the edge that isn't connected to this element. */
|
||||||
BM_select_history_clear(bm);
|
BM_select_history_clear(bm);
|
||||||
|
|
||||||
/* Notes on hidden geometry:
|
/* Notes on hidden geometry:
|
||||||
@ -896,7 +896,7 @@ static void edbm_add_edge_face_exec__tricky_finalize_sel(BMesh *bm, BMElem *ele_
|
|||||||
|
|
||||||
static int edbm_add_edge_face_exec(bContext *C, wmOperator *op)
|
static int edbm_add_edge_face_exec(bContext *C, wmOperator *op)
|
||||||
{
|
{
|
||||||
/* when this is used to dissolve we could avoid this, but checking isnt too slow */
|
/* When this is used to dissolve we could avoid this, but checking isn't too slow. */
|
||||||
bool changed_multi = false;
|
bool changed_multi = false;
|
||||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||||
uint objects_len = 0;
|
uint objects_len = 0;
|
||||||
@ -4815,11 +4815,11 @@ static bool edbm_fill_grid_prepare(BMesh *bm, int offset, int *span_p, const boo
|
|||||||
|
|
||||||
if (span_calc) {
|
if (span_calc) {
|
||||||
/* calculate the span by finding the next corner in 'verts'
|
/* calculate the span by finding the next corner in 'verts'
|
||||||
* we dont know what defines a corner exactly so find the 4 verts
|
* we don't know what defines a corner exactly so find the 4 verts
|
||||||
* in the loop with the greatest angle.
|
* in the loop with the greatest angle.
|
||||||
* Tag them and use the first tagged vertex to calculate the span.
|
* Tag them and use the first tagged vertex to calculate the span.
|
||||||
*
|
*
|
||||||
* note: we may have already checked 'edbm_fill_grid_vert_tag_angle()' on each
|
* NOTE: we may have already checked 'edbm_fill_grid_vert_tag_angle()' on each
|
||||||
* vert, but advantage of de-duplicating is minimal. */
|
* vert, but advantage of de-duplicating is minimal. */
|
||||||
struct SortPtrByFloat *ele_sort = MEM_mallocN(sizeof(*ele_sort) * verts_len, __func__);
|
struct SortPtrByFloat *ele_sort = MEM_mallocN(sizeof(*ele_sort) * verts_len, __func__);
|
||||||
LinkData *v_link;
|
LinkData *v_link;
|
||||||
|
@ -156,8 +156,10 @@ static int bake_modal(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
|
|||||||
return OPERATOR_PASS_THROUGH;
|
return OPERATOR_PASS_THROUGH;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* for exec() when there is no render job
|
/**
|
||||||
* note: this wont check for the escape key being pressed, but doing so isnt threadsafe */
|
* for exec() when there is no render job
|
||||||
|
* note: this wont check for the escape key being pressed, but doing so isn't thread-safe.
|
||||||
|
*/
|
||||||
static int bake_break(void *UNUSED(rjv))
|
static int bake_break(void *UNUSED(rjv))
|
||||||
{
|
{
|
||||||
if (G.is_break) {
|
if (G.is_break) {
|
||||||
|
@ -4731,7 +4731,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
|
|||||||
(dx != 0 || dy != 0)) ||
|
(dx != 0 || dy != 0)) ||
|
||||||
bedit->first) {
|
bedit->first) {
|
||||||
PEData data = bedit->data;
|
PEData data = bedit->data;
|
||||||
data.context = C; /* TODO(mai): why isnt this set in bedit->data? */
|
data.context = C; /* TODO(mai): why isn't this set in bedit->data? */
|
||||||
|
|
||||||
view3d_operator_needs_opengl(C);
|
view3d_operator_needs_opengl(C);
|
||||||
selected = (short)count_selected_keys(scene, edit);
|
selected = (short)count_selected_keys(scene, edit);
|
||||||
|
@ -788,8 +788,10 @@ static int render_breakjob(void *rjv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* for exec() when there is no render job
|
/**
|
||||||
* note: this wont check for the escape key being pressed, but doing so isnt threadsafe */
|
* For exec() when there is no render job
|
||||||
|
* note: this wont check for the escape key being pressed, but doing so isn't thread-safe.
|
||||||
|
*/
|
||||||
static int render_break(void *UNUSED(rjv))
|
static int render_break(void *UNUSED(rjv))
|
||||||
{
|
{
|
||||||
if (G.is_break) {
|
if (G.is_break) {
|
||||||
|
@ -1733,7 +1733,7 @@ static float project_paint_uvpixel_mask(const ProjPaintState *ps,
|
|||||||
ps->mvert_eval[lt_vtri[1]].co,
|
ps->mvert_eval[lt_vtri[1]].co,
|
||||||
ps->mvert_eval[lt_vtri[2]].co);
|
ps->mvert_eval[lt_vtri[2]].co);
|
||||||
#else
|
#else
|
||||||
/* don't use because some modifiers dont have normal data (subsurf for eg) */
|
/* Don't use because some modifiers don't have normal data (subsurf for eg). */
|
||||||
copy_v3_v3(no, (float *)ps->dm->getTessFaceData(ps->dm, tri_index, CD_NORMAL));
|
copy_v3_v3(no, (float *)ps->dm->getTessFaceData(ps->dm, tri_index, CD_NORMAL));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,7 @@ static int file_browse_exec(bContext *C, wmOperator *op)
|
|||||||
BLI_path_abs(path, id ? ID_BLEND_PATH(bmain, id) : BKE_main_blendfile_path(bmain));
|
BLI_path_abs(path, id ? ID_BLEND_PATH(bmain, id) : BKE_main_blendfile_path(bmain));
|
||||||
|
|
||||||
if (BLI_is_dir(path)) {
|
if (BLI_is_dir(path)) {
|
||||||
/* Do this first so '//' isnt converted to '//\' on windows. */
|
/* Do this first so '//' isn't converted to '//\' on windows. */
|
||||||
BLI_path_slash_ensure(path);
|
BLI_path_slash_ensure(path);
|
||||||
if (is_relative) {
|
if (is_relative) {
|
||||||
BLI_strncpy(path, str, FILE_MAX);
|
BLI_strncpy(path, str, FILE_MAX);
|
||||||
|
@ -452,7 +452,7 @@ static int file_box_select_modal(bContext *C, wmOperator *op, const wmEvent *eve
|
|||||||
for (idx = sel.last; idx >= 0; idx--) {
|
for (idx = sel.last; idx >= 0; idx--) {
|
||||||
const FileDirEntry *file = filelist_file(sfile->files, idx);
|
const FileDirEntry *file = filelist_file(sfile->files, idx);
|
||||||
|
|
||||||
/* dont highlight readonly file (".." or ".") on box select */
|
/* Don't highlight read-only file (".." or ".") on box select. */
|
||||||
if (FILENAME_IS_CURRPAR(file->relpath)) {
|
if (FILENAME_IS_CURRPAR(file->relpath)) {
|
||||||
filelist_entry_select_set(
|
filelist_entry_select_set(
|
||||||
sfile->files, file, FILE_SEL_REMOVE, FILE_SEL_HIGHLIGHTED, CHECK_ALL);
|
sfile->files, file, FILE_SEL_REMOVE, FILE_SEL_HIGHLIGHTED, CHECK_ALL);
|
||||||
|
@ -639,7 +639,7 @@ int ED_fileselect_layout_numfiles(FileLayout *layout, ARegion *region)
|
|||||||
*
|
*
|
||||||
* - *_item: size of each (row|col), (including padding)
|
* - *_item: size of each (row|col), (including padding)
|
||||||
* - *_view: (x|y) size of the view.
|
* - *_view: (x|y) size of the view.
|
||||||
* - *_over: extra pixels, to take into account, when the fit isnt exact
|
* - *_over: extra pixels, to take into account, when the fit isn't exact
|
||||||
* (needed since you may see the end of the previous column and the beginning of the next).
|
* (needed since you may see the end of the previous column and the beginning of the next).
|
||||||
*
|
*
|
||||||
* Could be more clever and take scrolling into account,
|
* Could be more clever and take scrolling into account,
|
||||||
|
@ -923,12 +923,12 @@ static void calc_text_rcts(SpaceText *st, ARegion *region, rcti *scroll, rcti *b
|
|||||||
hlstart = (lhlstart * pix_available) / ltexth;
|
hlstart = (lhlstart * pix_available) / ltexth;
|
||||||
hlend = (lhlend * pix_available) / ltexth;
|
hlend = (lhlend * pix_available) / ltexth;
|
||||||
|
|
||||||
/* the scrollbar is non-linear sized */
|
/* The scrollbar is non-linear sized. */
|
||||||
if (pix_bardiff > 0) {
|
if (pix_bardiff > 0) {
|
||||||
/* the start of the highlight is in the current viewport */
|
/* the start of the highlight is in the current viewport */
|
||||||
if (st->runtime.viewlines && lhlstart >= st->top &&
|
if (st->runtime.viewlines && lhlstart >= st->top &&
|
||||||
lhlstart <= st->top + st->runtime.viewlines) {
|
lhlstart <= st->top + st->runtime.viewlines) {
|
||||||
/* speed the progresion of the start of the highlight through the scrollbar */
|
/* Speed the progression of the start of the highlight through the scrollbar. */
|
||||||
hlstart = (((pix_available - pix_bardiff) * lhlstart) / ltexth) +
|
hlstart = (((pix_available - pix_bardiff) * lhlstart) / ltexth) +
|
||||||
(pix_bardiff * (lhlstart - st->top) / st->runtime.viewlines);
|
(pix_bardiff * (lhlstart - st->top) / st->runtime.viewlines);
|
||||||
}
|
}
|
||||||
@ -949,7 +949,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *region, rcti *scroll, rcti *b
|
|||||||
/* the end of the highlight is in the current viewport */
|
/* the end of the highlight is in the current viewport */
|
||||||
if (st->runtime.viewlines && lhlend >= st->top &&
|
if (st->runtime.viewlines && lhlend >= st->top &&
|
||||||
lhlend <= st->top + st->runtime.viewlines) {
|
lhlend <= st->top + st->runtime.viewlines) {
|
||||||
/* speed the progresion of the end of the highlight through the scrollbar */
|
/* Speed the progression of the end of the highlight through the scrollbar. */
|
||||||
hlend = (((pix_available - pix_bardiff) * lhlend) / ltexth) +
|
hlend = (((pix_available - pix_bardiff) * lhlend) / ltexth) +
|
||||||
(pix_bardiff * (lhlend - st->top) / st->runtime.viewlines);
|
(pix_bardiff * (lhlend - st->top) / st->runtime.viewlines);
|
||||||
}
|
}
|
||||||
@ -1433,7 +1433,7 @@ static void draw_brackets(const SpaceText *st, const TextDrawContext *tdc, ARegi
|
|||||||
find = -b;
|
find = -b;
|
||||||
stack = 0;
|
stack = 0;
|
||||||
|
|
||||||
/* Don't highlight backets if syntax HL is off or bracket in string or comment. */
|
/* Don't highlight brackets if syntax HL is off or bracket in string or comment. */
|
||||||
if (!linep->format || linep->format[fc] == FMT_TYPE_STRING ||
|
if (!linep->format || linep->format[fc] == FMT_TYPE_STRING ||
|
||||||
linep->format[fc] == FMT_TYPE_COMMENT) {
|
linep->format[fc] == FMT_TYPE_COMMENT) {
|
||||||
return;
|
return;
|
||||||
|
@ -571,7 +571,7 @@ void armature_foreachScreenBone(struct ViewContext *vc,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
screen_co_a[0] = IS_CLIPPED; /* weak */
|
screen_co_a[0] = IS_CLIPPED; /* weak */
|
||||||
/* screen_co_a[1]: intentionally dont set this so we get errors on misuse */
|
/* screen_co_a[1]: intentionally don't set this so we get errors on misuse */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* project tail location to screenspace */
|
/* project tail location to screenspace */
|
||||||
@ -581,7 +581,7 @@ void armature_foreachScreenBone(struct ViewContext *vc,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
screen_co_b[0] = IS_CLIPPED; /* weak */
|
screen_co_b[0] = IS_CLIPPED; /* weak */
|
||||||
/* screen_co_b[1]: intentionally dont set this so we get errors on misuse */
|
/* screen_co_b[1]: intentionally don't set this so we get errors on misuse */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (points_proj_tot) { /* at least one point's projection worked */
|
if (points_proj_tot) { /* at least one point's projection worked */
|
||||||
@ -623,7 +623,7 @@ void pose_foreachScreenBone(struct ViewContext *vc,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
screen_co_a[0] = IS_CLIPPED; /* weak */
|
screen_co_a[0] = IS_CLIPPED; /* weak */
|
||||||
/* screen_co_a[1]: intentionally dont set this so we get errors on misuse */
|
/* screen_co_a[1]: intentionally don't set this so we get errors on misuse */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* project tail location to screenspace */
|
/* project tail location to screenspace */
|
||||||
@ -633,7 +633,7 @@ void pose_foreachScreenBone(struct ViewContext *vc,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
screen_co_b[0] = IS_CLIPPED; /* weak */
|
screen_co_b[0] = IS_CLIPPED; /* weak */
|
||||||
/* screen_co_b[1]: intentionally dont set this so we get errors on misuse */
|
/* screen_co_b[1]: intentionally don't set this so we get errors on misuse */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (points_proj_tot) { /* at least one point's projection worked */
|
if (points_proj_tot) { /* at least one point's projection worked */
|
||||||
|
@ -228,7 +228,7 @@ void ED_view3d_polygon_offset(const RegionView3D *rv3d, const float dist)
|
|||||||
|
|
||||||
float viewdist = rv3d->dist;
|
float viewdist = rv3d->dist;
|
||||||
|
|
||||||
/* special exception for ortho camera (viewdist isnt used for perspective cameras) */
|
/* Special exception for orthographic camera (`viewdist` isn't used for perspective cameras). */
|
||||||
if (dist != 0.0f) {
|
if (dist != 0.0f) {
|
||||||
if (rv3d->persp == RV3D_CAMOB) {
|
if (rv3d->persp == RV3D_CAMOB) {
|
||||||
if (rv3d->is_persp == false) {
|
if (rv3d->is_persp == false) {
|
||||||
|
@ -480,7 +480,7 @@ void special_aftertrans_update__mask(bContext *C, TransInfo *t)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO - dont key all masks... */
|
/* TODO: don't key all masks. */
|
||||||
if (IS_AUTOKEY_ON(t->scene)) {
|
if (IS_AUTOKEY_ON(t->scene)) {
|
||||||
Scene *scene = t->scene;
|
Scene *scene = t->scene;
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ void createTransNodeData(TransInfo *t)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* nodes dont support PET and probably never will */
|
/* Nodes don't support PET and probably never will. */
|
||||||
t->flag &= ~T_PROP_EDIT_ALL;
|
t->flag &= ~T_PROP_EDIT_ALL;
|
||||||
|
|
||||||
/* set transform flags on nodes */
|
/* set transform flags on nodes */
|
||||||
|
@ -97,7 +97,7 @@ static void Bend(TransInfo *t, const int UNUSED(mval[2]))
|
|||||||
snapGrid(t, angle_rad);
|
snapGrid(t, angle_rad);
|
||||||
#else
|
#else
|
||||||
/* hrmf, snapping radius is using 'angle' steps, need to convert to something else
|
/* hrmf, snapping radius is using 'angle' steps, need to convert to something else
|
||||||
* this isnt essential but nicer to give reasonable snapping values for radius */
|
* this isn't essential but nicer to give reasonable snapping values for radius. */
|
||||||
if (t->tsnap.mode & SCE_SNAP_MODE_INCREMENT) {
|
if (t->tsnap.mode & SCE_SNAP_MODE_INCREMENT) {
|
||||||
const float radius_snap = 0.1f;
|
const float radius_snap = 0.1f;
|
||||||
const float snap_hack = (t->snap[0] * data->warp_init_dist) / radius_snap;
|
const float snap_hack = (t->snap[0] * data->warp_init_dist) / radius_snap;
|
||||||
|
@ -944,7 +944,7 @@ static EdgeSlideData *createEdgeSlideVerts_single_side(TransInfo *t, TransDataCo
|
|||||||
/* over alloc */
|
/* over alloc */
|
||||||
sv_array = MEM_callocN(sizeof(TransDataEdgeSlideVert) * bm->totvertsel, "sv_array");
|
sv_array = MEM_callocN(sizeof(TransDataEdgeSlideVert) * bm->totvertsel, "sv_array");
|
||||||
|
|
||||||
/* same loop for all loops, weak but we dont connect loops in this case */
|
/* Same loop for all loops, weak but we don't connect loops in this case. */
|
||||||
loop_nr = 1;
|
loop_nr = 1;
|
||||||
|
|
||||||
sv_table = MEM_mallocN(sizeof(*sv_table) * bm->totvert, __func__);
|
sv_table = MEM_mallocN(sizeof(*sv_table) * bm->totvert, __func__);
|
||||||
|
@ -97,7 +97,7 @@ static void applyTimeTranslateValue(TransInfo *t, const float deltax)
|
|||||||
/* It is assumed that td->extra is a pointer to the AnimData,
|
/* It is assumed that td->extra is a pointer to the AnimData,
|
||||||
* whose active action is where this keyframe comes from.
|
* whose active action is where this keyframe comes from.
|
||||||
* (this is only valid when not in NLA)
|
* (this is only valid when not in NLA)
|
||||||
* (also: masks and gpencil dont have animadata)
|
* (also: masks and gpencil don't have animadata)
|
||||||
*/
|
*/
|
||||||
AnimData *adt = (t->spacetype != SPACE_NLA) ? td->extra : NULL;
|
AnimData *adt = (t->spacetype != SPACE_NLA) ? td->extra : NULL;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ using GPUvoidptr = void *;
|
|||||||
|
|
||||||
namespace blender::gpu::debug {
|
namespace blender::gpu::debug {
|
||||||
|
|
||||||
/* List of wrapped functions. We dont have to support all of them.
|
/* List of wrapped functions. We don't have to support all of them.
|
||||||
* Some functions might be declared as `extern` in GLEW. We cannot override them in this case.
|
* Some functions might be declared as `extern` in GLEW. We cannot override them in this case.
|
||||||
* Keep the list in alphabetical order. */
|
* Keep the list in alphabetical order. */
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ typedef struct EditMeshData {
|
|||||||
/** lazy initialize (when \a vertexCos is set) */
|
/** lazy initialize (when \a vertexCos is set) */
|
||||||
float const (*vertexNos)[3];
|
float const (*vertexNos)[3];
|
||||||
float const (*polyNos)[3];
|
float const (*polyNos)[3];
|
||||||
/** also lazy init but dont depend on \a vertexCos */
|
/** also lazy init but don't depend on \a vertexCos */
|
||||||
const float (*polyCos)[3];
|
const float (*polyCos)[3];
|
||||||
} EditMeshData;
|
} EditMeshData;
|
||||||
|
|
||||||
|
@ -637,7 +637,7 @@ typedef struct DecimateModifierData {
|
|||||||
|
|
||||||
enum {
|
enum {
|
||||||
MOD_DECIM_FLAG_INVERT_VGROUP = (1 << 0),
|
MOD_DECIM_FLAG_INVERT_VGROUP = (1 << 0),
|
||||||
/** for collapse only. dont convert tri pairs back to quads */
|
/** For collapse only. don't convert triangle pairs back to quads. */
|
||||||
MOD_DECIM_FLAG_TRIANGULATE = (1 << 1),
|
MOD_DECIM_FLAG_TRIANGULATE = (1 << 1),
|
||||||
/** for dissolve only. collapse all verts between 2 faces */
|
/** for dissolve only. collapse all verts between 2 faces */
|
||||||
MOD_DECIM_FLAG_ALL_BOUNDARY_VERTS = (1 << 2),
|
MOD_DECIM_FLAG_ALL_BOUNDARY_VERTS = (1 << 2),
|
||||||
|
@ -402,7 +402,7 @@ typedef struct bNodeLink {
|
|||||||
#define NODE_LINK_VALID (1 << 1)
|
#define NODE_LINK_VALID (1 << 1)
|
||||||
#define NODE_LINK_TEST (1 << 2) /* free test flag, undefined */
|
#define NODE_LINK_TEST (1 << 2) /* free test flag, undefined */
|
||||||
#define NODE_LINK_TEMP_HIGHLIGHT (1 << 3) /* Link is highlighted for picking. */
|
#define NODE_LINK_TEMP_HIGHLIGHT (1 << 3) /* Link is highlighted for picking. */
|
||||||
#define NODE_LINK_MUTED (1 << 4) /* Link is muted. */
|
#define NODE_LINK_MUTED (1 << 4) /* Link is muted. */
|
||||||
|
|
||||||
/* tree->edit_quality/tree->render_quality */
|
/* tree->edit_quality/tree->render_quality */
|
||||||
#define NTREE_QUALITY_HIGH 0
|
#define NTREE_QUALITY_HIGH 0
|
||||||
|
@ -2093,7 +2093,7 @@ void RNA_def_property_string_default(PropertyRNA *prop, const char *value)
|
|||||||
|
|
||||||
if (value == NULL) {
|
if (value == NULL) {
|
||||||
CLOG_ERROR(&LOG,
|
CLOG_ERROR(&LOG,
|
||||||
"\"%s.%s\", NULL string passed (dont call in this case).",
|
"\"%s.%s\", NULL string passed (don't call in this case).",
|
||||||
srna->identifier,
|
srna->identifier,
|
||||||
prop->identifier);
|
prop->identifier);
|
||||||
DefRNA.error = true;
|
DefRNA.error = true;
|
||||||
@ -2102,7 +2102,7 @@ void RNA_def_property_string_default(PropertyRNA *prop, const char *value)
|
|||||||
|
|
||||||
if (!value[0]) {
|
if (!value[0]) {
|
||||||
CLOG_ERROR(&LOG,
|
CLOG_ERROR(&LOG,
|
||||||
"\"%s.%s\", empty string passed (dont call in this case).",
|
"\"%s.%s\", empty string passed (don't call in this case).",
|
||||||
srna->identifier,
|
srna->identifier,
|
||||||
prop->identifier);
|
prop->identifier);
|
||||||
DefRNA.error = true;
|
DefRNA.error = true;
|
||||||
|
@ -1424,7 +1424,7 @@ static int rna_MeshPolygonStringPropertyLayer_data_length(PointerRNA *ptr)
|
|||||||
return me->totpoly;
|
return me->totpoly;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX, we dont have proper byte string support yet, so for now use the (bytes + 1)
|
/* XXX, we don't have proper byte string support yet, so for now use the (bytes + 1)
|
||||||
* bmesh API exposes correct python/byte-string access. */
|
* bmesh API exposes correct python/byte-string access. */
|
||||||
void rna_MeshStringProperty_s_get(PointerRNA *ptr, char *value)
|
void rna_MeshStringProperty_s_get(PointerRNA *ptr, char *value)
|
||||||
{
|
{
|
||||||
|
@ -113,7 +113,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
|
|||||||
TIMEIT_START(decim);
|
TIMEIT_START(decim);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* set up front so we dont show invalid info in the UI */
|
/* Set up front so we don't show invalid info in the UI. */
|
||||||
updateFaceCount(ctx, dmd, mesh->totpoly);
|
updateFaceCount(ctx, dmd, mesh->totpoly);
|
||||||
|
|
||||||
switch (dmd->mode) {
|
switch (dmd->mode) {
|
||||||
|
@ -118,7 +118,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
|
|||||||
{
|
{
|
||||||
DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md;
|
DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md;
|
||||||
|
|
||||||
/* dont apply dynamic paint on orco mesh stack */
|
/* Don't apply dynamic paint on ORCO mesh stack. */
|
||||||
if (!(ctx->flag & MOD_APPLY_ORCO)) {
|
if (!(ctx->flag & MOD_APPLY_ORCO)) {
|
||||||
Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph);
|
Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph);
|
||||||
return dynamicPaint_Modifier_do(pmd, ctx->depsgraph, scene, ctx->object, mesh);
|
return dynamicPaint_Modifier_do(pmd, ctx->depsgraph, scene, ctx->object, mesh);
|
||||||
|
@ -75,7 +75,7 @@ static bool meshcache_read_pc2_head(FILE *fp,
|
|||||||
*err_str = "Invalid frame total";
|
*err_str = "Invalid frame total";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/* intentionally dont seek back */
|
/* Intentionally don't seek back. */
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@ const char *PyC_StringEnum_FindIDFromValue(const struct PyC_StringEnumItems *ite
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* silly function, we dont use arg. just check its compatible with __deepcopy__ */
|
/* Silly function, we don't use arg. just check its compatible with `__deepcopy__`. */
|
||||||
int PyC_CheckArgs_DeepCopy(PyObject *args)
|
int PyC_CheckArgs_DeepCopy(PyObject *args)
|
||||||
{
|
{
|
||||||
PyObject *dummy_pydict;
|
PyObject *dummy_pydict;
|
||||||
|
@ -118,7 +118,7 @@ static void gizmo_properties_init(wmGizmoType *gzt)
|
|||||||
{
|
{
|
||||||
/* Picky developers will notice that 'bl_targets' won't work with inheritance
|
/* Picky developers will notice that 'bl_targets' won't work with inheritance
|
||||||
* get direct from the dict to avoid raising a load of attribute errors
|
* get direct from the dict to avoid raising a load of attribute errors
|
||||||
* (yes this isnt ideal) - campbell. */
|
* (yes this isn't ideal) - campbell. */
|
||||||
PyObject *py_class_dict = py_class->tp_dict;
|
PyObject *py_class_dict = py_class->tp_dict;
|
||||||
PyObject *bl_target_properties = PyDict_GetItem(py_class_dict,
|
PyObject *bl_target_properties = PyDict_GetItem(py_class_dict,
|
||||||
bpy_intern_str_bl_target_properties);
|
bpy_intern_str_bl_target_properties);
|
||||||
|
@ -727,7 +727,7 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Identifying jobs by owner alone is unreliable, this isnt saved,
|
* Identifying jobs by owner alone is unreliable, this isn't saved,
|
||||||
* order can change (keep 0 for 'any').
|
* order can change (keep 0 for 'any').
|
||||||
*/
|
*/
|
||||||
enum {
|
enum {
|
||||||
|
@ -561,7 +561,7 @@ char *WM_prop_pystring_assign(bContext *C, PointerRNA *ptr, PropertyRNA *prop, i
|
|||||||
char *lhs = C ? wm_prop_pystring_from_context(C, ptr, prop, index) : NULL;
|
char *lhs = C ? wm_prop_pystring_from_context(C, ptr, prop, index) : NULL;
|
||||||
|
|
||||||
if (lhs == NULL) {
|
if (lhs == NULL) {
|
||||||
/* fallback to bpy.data.foo[id] if we dont find in the context */
|
/* Fallback to `bpy.data.foo[id]` if we don't find in the context. */
|
||||||
lhs = RNA_path_full_property_py(CTX_data_main(C), ptr, prop, index);
|
lhs = RNA_path_full_property_py(CTX_data_main(C), ptr, prop, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1149,7 +1149,7 @@ int WM_operator_filesel(bContext *C, wmOperator *op, const wmEvent *UNUSED(event
|
|||||||
bool WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const struct ImageFormatData *im_format)
|
bool WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const struct ImageFormatData *im_format)
|
||||||
{
|
{
|
||||||
char filepath[FILE_MAX];
|
char filepath[FILE_MAX];
|
||||||
/* dont NULL check prop, this can only run on ops with a 'filepath' */
|
/* Don't NULL check prop, this can only run on ops with a 'filepath'. */
|
||||||
PropertyRNA *prop = RNA_struct_find_property(op->ptr, "filepath");
|
PropertyRNA *prop = RNA_struct_find_property(op->ptr, "filepath");
|
||||||
RNA_property_string_get(op->ptr, prop, filepath);
|
RNA_property_string_get(op->ptr, prop, filepath);
|
||||||
if (BKE_image_path_ensure_ext_from_imformat(filepath, im_format)) {
|
if (BKE_image_path_ensure_ext_from_imformat(filepath, im_format)) {
|
||||||
|
@ -701,8 +701,8 @@ void wm_window_ghostwindows_ensure(wmWindowManager *wm)
|
|||||||
if (wm_init_state.size_x == 0) {
|
if (wm_init_state.size_x == 0) {
|
||||||
wm_get_screensize(&wm_init_state.size_x, &wm_init_state.size_y);
|
wm_get_screensize(&wm_init_state.size_x, &wm_init_state.size_y);
|
||||||
|
|
||||||
/* note!, this isnt quite correct, active screen maybe offset 1000s if PX,
|
/* NOTE: this isn't quite correct, active screen maybe offset 1000s if PX,
|
||||||
* we'd need a wm_get_screensize like function that gives offset,
|
* we'd need a #wm_get_screensize like function that gives offset,
|
||||||
* in practice the window manager will likely move to the correct monitor */
|
* in practice the window manager will likely move to the correct monitor */
|
||||||
wm_init_state.start_x = 0;
|
wm_init_state.start_x = 0;
|
||||||
wm_init_state.start_y = 0;
|
wm_init_state.start_y = 0;
|
||||||
@ -1694,7 +1694,7 @@ void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *
|
|||||||
LISTBASE_FOREACH (wmEvent *, event, &win->event_queue) {
|
LISTBASE_FOREACH (wmEvent *, event, &win->event_queue) {
|
||||||
if (event->customdata == wt) {
|
if (event->customdata == wt) {
|
||||||
event->customdata = NULL;
|
event->customdata = NULL;
|
||||||
event->type = EVENT_NONE; /* timer users customdata, dont want NULL == NULL */
|
event->type = EVENT_NONE; /* Timer users customdata, don't want `NULL == NULL`. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user