forked from bartvdbraak/blender
Cleanup: spelling in comments, comment block formatting
This commit is contained in:
parent
acc800d24d
commit
1143bf281a
@ -243,7 +243,7 @@ string HIPDevice::compile_kernel(const uint kernel_features, const char *name, c
|
||||
hipGetDeviceProperties(&props, hipDevId);
|
||||
|
||||
/* gcnArchName can contain tokens after the arch name with features, ie.
|
||||
"gfx1010:sramecc-:xnack-" so we tokenize it to get the first part. */
|
||||
* `gfx1010:sramecc-:xnack-` so we tokenize it to get the first part. */
|
||||
char *arch = strtok(props.gcnArchName, ":");
|
||||
if (arch == NULL) {
|
||||
arch = props.gcnArchName;
|
||||
|
@ -73,7 +73,8 @@ using namespace metal;
|
||||
#define ccl_gpu_kernel(block_num_threads, thread_num_registers)
|
||||
#define ccl_gpu_kernel_threads(block_num_threads)
|
||||
|
||||
/* convert a comma-separated list into a semicolon-separated list (so that we can generate a struct based on kernel entrypoint parameters) */
|
||||
/* Convert a comma-separated list into a semicolon-separated list
|
||||
* (so that we can generate a struct based on kernel entry-point parameters). */
|
||||
#define FN0()
|
||||
#define FN1(p1) p1;
|
||||
#define FN2(p1, p2) p1; p2;
|
||||
@ -94,7 +95,8 @@ using namespace metal;
|
||||
#define GET_LAST_ARG(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, ...) p16
|
||||
#define PARAMS_MAKER(...) GET_LAST_ARG(__VA_ARGS__, FN16, FN15, FN14, FN13, FN12, FN11, FN10, FN9, FN8, FN7, FN6, FN5, FN4, FN3, FN2, FN1, FN0)
|
||||
|
||||
/* generate a struct containing the entrypoint parameters and a "run" method which can access them implicitly via this-> */
|
||||
/* Generate a struct containing the entry-point parameters and a "run"
|
||||
* method which can access them implicitly via this-> */
|
||||
#define ccl_gpu_kernel_signature(name, ...) \
|
||||
struct kernel_gpu_##name \
|
||||
{ \
|
||||
|
@ -17,7 +17,7 @@
|
||||
; /* end of MetalKernelContext class definition */
|
||||
|
||||
/* Silently redirect into the MetalKernelContext instance */
|
||||
/* NOTE: These macros will need maintaining as entrypoints change */
|
||||
/* NOTE: These macros will need maintaining as entry-points change. */
|
||||
|
||||
#undef kernel_integrator_state
|
||||
#define kernel_integrator_state context.launch_params_metal.__integrator_state
|
||||
|
@ -654,8 +654,8 @@ enum {
|
||||
GHOST_kXrContextDebug = (1 << 0),
|
||||
GHOST_kXrContextDebugTime = (1 << 1),
|
||||
# ifdef WIN32
|
||||
/* Needed to avoid issues with the SteamVR OpenGL graphics binding (use DirectX fallback
|
||||
instead). */
|
||||
/* Needed to avoid issues with the SteamVR OpenGL graphics binding
|
||||
* (use DirectX fallback instead). */
|
||||
GHOST_kXrContextGpuNVIDIA = (1 << 2),
|
||||
# endif
|
||||
};
|
||||
|
@ -1245,7 +1245,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType
|
||||
|
||||
/* Convert the image in a RGBA 32bit format */
|
||||
/* As Core Graphics does not support contexts with non premutliplied alpha,
|
||||
we need to get alpha key values in a separate batch */
|
||||
* we need to get alpha key values in a separate batch */
|
||||
|
||||
/* First get RGB values w/o Alpha to avoid pre-multiplication,
|
||||
* 32bit but last byte is unused */
|
||||
@ -1479,8 +1479,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
|
||||
CocoaWindow *cocoawindow;
|
||||
|
||||
/* [event window] returns other windows if mouse-over, that's OSX input standard
|
||||
however, if mouse exits window(s), the windows become inactive, until you click.
|
||||
We then fall back to the active window from ghost */
|
||||
* however, if mouse exits window(s), the windows become inactive, until you click.
|
||||
* We then fall back to the active window from ghost. */
|
||||
window = (GHOST_WindowCocoa *)m_windowManager->getWindowAssociatedWithOSWindow(
|
||||
(void *)[event window]);
|
||||
if (!window) {
|
||||
|
@ -216,8 +216,9 @@ GHOST_XrAction::GHOST_XrAction(XrInstance instance,
|
||||
|
||||
XrActionCreateInfo action_info{XR_TYPE_ACTION_CREATE_INFO};
|
||||
strcpy(action_info.actionName, info.name);
|
||||
strcpy(action_info.localizedActionName, info.name); /* Just use same name for localized. This can
|
||||
be changed in the future if necessary. */
|
||||
|
||||
/* Just use same name for localized. This can be changed in the future if necessary. */
|
||||
strcpy(action_info.localizedActionName, info.name);
|
||||
|
||||
switch (info.type) {
|
||||
case GHOST_kXrActionTypeBooleanInput:
|
||||
|
@ -97,8 +97,8 @@ static void read_vertices(const tinygltf::Accessor &accessor,
|
||||
validate_accessor(accessor, buffer_view, buffer, stride, packed_size);
|
||||
|
||||
/* Resize the vertices vector, if necessary, to include room for the attribute data.
|
||||
If there are multiple attributes for a primitive, the first one will resize, and the
|
||||
subsequent will not need to. */
|
||||
* If there are multiple attributes for a primitive, the first one will resize, and the
|
||||
* subsequent will not need to. */
|
||||
primitive.vertices.resize(accessor.count);
|
||||
|
||||
/* Copy the attribute value over from the glTF buffer into the appropriate vertex field. */
|
||||
@ -147,9 +147,9 @@ static void read_indices(const tinygltf::Accessor &accessor,
|
||||
const tinygltf::Buffer &buffer,
|
||||
GHOST_XrPrimitive &primitive)
|
||||
{
|
||||
if (buffer_view.target != TINYGLTF_TARGET_ELEMENT_ARRAY_BUFFER &&
|
||||
buffer_view.target != 0) { /* Allow 0 (not specified) even though spec doesn't seem to allow
|
||||
this (BoomBox GLB fails). */
|
||||
|
||||
/* Allow 0 (not specified) even though spec doesn't seem to allow this (BoomBox GLB fails). */
|
||||
if (buffer_view.target != TINYGLTF_TARGET_ELEMENT_ARRAY_BUFFER && buffer_view.target != 0) {
|
||||
throw GHOST_XrException(
|
||||
"glTF: Accessor for indices uses bufferview with invalid 'target' type.");
|
||||
}
|
||||
@ -164,8 +164,8 @@ static void read_indices(const tinygltf::Accessor &accessor,
|
||||
|
||||
validate_accessor(accessor, buffer_view, buffer, component_size_bytes, component_size_bytes);
|
||||
|
||||
if ((accessor.count % 3) != 0) { /* Since only triangles are supported, enforce that the number
|
||||
of indices is divisible by 3. */
|
||||
/* Since only triangles are supported, enforce that the number of indices is divisible by 3. */
|
||||
if ((accessor.count % 3) != 0) {
|
||||
throw GHOST_XrException("glTF: Unexpected number of indices for triangle primitive");
|
||||
}
|
||||
|
||||
|
@ -128,11 +128,12 @@ void action_groups_clear_tempflags(struct bAction *act);
|
||||
/**
|
||||
* Return whether the action has one unique point in time keyed.
|
||||
*
|
||||
* This is mostly for the pose library, which will have different behaviour depending on whether an
|
||||
* This is mostly for the pose library, which will have different behavior depending on whether an
|
||||
* Action corresponds to a "pose" (one keyframe) or "animation snippet" (multiple keyframes).
|
||||
*
|
||||
* \return `false` when there is no keyframe at all or keys on different points in time, `true`
|
||||
* when exactly one point in time is keyed. */
|
||||
* when exactly one point in time is keyed.
|
||||
*/
|
||||
bool BKE_action_has_single_frame(const struct bAction *act);
|
||||
|
||||
/* Pose API ----------------- */
|
||||
|
@ -134,8 +134,10 @@ enum {
|
||||
LIB_ID_COPY_SHAPEKEY = 1 << 26,
|
||||
/** EXCEPTION! Specific deep-copy of node trees used e.g. for rendering purposes. */
|
||||
LIB_ID_COPY_NODETREE_LOCALIZE = 1 << 27,
|
||||
/** EXCEPTION! Specific handling of RB objects regarding collections differs depending whether we
|
||||
duplicate scene/collections, or objects. */
|
||||
/**
|
||||
* EXCEPTION! Specific handling of RB objects regarding collections differs depending whether we
|
||||
* duplicate scene/collections, or objects.
|
||||
*/
|
||||
LIB_ID_COPY_RIGID_BODY_NO_COLLECTION_HANDLING = 1 << 28,
|
||||
|
||||
/* *** Helper 'defines' gathering most common flag sets. *** */
|
||||
|
@ -307,20 +307,20 @@ class BezierSpline final : public Spline {
|
||||
blender::MutableSpan<HandleType> handle_types_left();
|
||||
blender::Span<blender::float3> handle_positions_left() const;
|
||||
/**
|
||||
* Get writable access to the hande position.
|
||||
* Get writable access to the handle position.
|
||||
*
|
||||
* \param write_only: pass true for an uninitialized spline, this prevents accessing
|
||||
* uninitialized memory while autogenerating handles.
|
||||
* uninitialized memory while auto-generating handles.
|
||||
*/
|
||||
blender::MutableSpan<blender::float3> handle_positions_left(bool write_only = false);
|
||||
blender::Span<HandleType> handle_types_right() const;
|
||||
blender::MutableSpan<HandleType> handle_types_right();
|
||||
blender::Span<blender::float3> handle_positions_right() const;
|
||||
/**
|
||||
* Get writable access to the hande position.
|
||||
* Get writable access to the handle position.
|
||||
*
|
||||
* \param write_only: pass true for an uninitialized spline, this prevents accessing
|
||||
* uninitialized memory while autogenerating handles.
|
||||
* uninitialized memory while auto-generating handles.
|
||||
*/
|
||||
blender::MutableSpan<blender::float3> handle_positions_right(bool write_only = false);
|
||||
void ensure_auto_handles() const;
|
||||
|
@ -422,7 +422,7 @@ static float dvar_eval_locDiff(ChannelDriver *driver, DriverVar *dvar)
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Convert to worldspace. */
|
||||
/* Convert to world-space. */
|
||||
copy_v3_v3(tmp_loc, pchan->pose_head);
|
||||
mul_m4_v3(ob->obmat, tmp_loc);
|
||||
}
|
||||
|
@ -176,11 +176,11 @@ static void motionpaths_calc_bake_targets(ListBase *targets, int cframe)
|
||||
copy_v3_v3(mpv->co, pchan_eval->pose_tail);
|
||||
}
|
||||
|
||||
/* result must be in worldspace */
|
||||
/* Result must be in world-space. */
|
||||
mul_m4_v3(ob_eval->obmat, mpv->co);
|
||||
}
|
||||
else {
|
||||
/* worldspace object location */
|
||||
/* World-space object location. */
|
||||
copy_v3_v3(mpv->co, ob_eval->obmat[3]);
|
||||
}
|
||||
|
||||
|
@ -4909,7 +4909,9 @@ bool ED_curve_editnurb_select_pick(
|
||||
/** \name Spin Operator
|
||||
* \{ */
|
||||
|
||||
/* 'cent' is in object space and 'dvec' in worldspace.
|
||||
/**
|
||||
* \param axis: is in world-space.
|
||||
* \param cent: is in object-space.
|
||||
*/
|
||||
bool ed_editnurb_spin(
|
||||
float viewmat[4][4], View3D *v3d, Object *obedit, const float axis[3], const float cent[3])
|
||||
|
@ -102,7 +102,7 @@ struct CurveDrawData {
|
||||
|
||||
/* offset projection by this value */
|
||||
bool use_offset;
|
||||
float offset[3]; /* worldspace */
|
||||
float offset[3]; /* world-space */
|
||||
float surface_offset;
|
||||
bool use_surface_offset_absolute;
|
||||
} project;
|
||||
|
@ -821,8 +821,8 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w
|
||||
float view_vec[3], cross[3];
|
||||
|
||||
/* convert the 2D normal into 3D */
|
||||
mul_mat3_m4_v3(vc.rv3d->viewinv, nor); /* worldspace */
|
||||
mul_mat3_m4_v3(vc.obedit->imat, nor); /* local space */
|
||||
mul_mat3_m4_v3(vc.rv3d->viewinv, nor); /* World-space. */
|
||||
mul_mat3_m4_v3(vc.obedit->imat, nor); /* Local-space. */
|
||||
|
||||
/* correct the normal to be aligned on the view plane */
|
||||
mul_v3_mat3_m4v3(view_vec, vc.obedit->imat, vc.rv3d->viewinv[2]);
|
||||
|
@ -80,7 +80,7 @@ static int edbm_spin_exec(bContext *C, wmOperator *op)
|
||||
BMesh *bm = em->bm;
|
||||
BMOperator spinop;
|
||||
|
||||
/* keep the values in worldspace since we're passing the obmat */
|
||||
/* Keep the values in world-space since we're passing the `obmat`. */
|
||||
if (!EDBM_op_init(em,
|
||||
&spinop,
|
||||
op,
|
||||
|
@ -3903,8 +3903,8 @@ static void brush_puff(PEData *data, int point_index, float mouse_distance)
|
||||
copy_v3_v3(co, key->co);
|
||||
mul_m4_v3(mat, co);
|
||||
|
||||
/* use 'kco' as the object space version of worldspace 'co',
|
||||
* ob->imat is set before calling */
|
||||
/* Use `kco` as the object space version of world-space `co`,
|
||||
* `ob->imat` is set before calling. */
|
||||
mul_v3_m4v3(kco, data->ob->imat, co);
|
||||
|
||||
point_index = BLI_kdtree_3d_find_nearest(edit->emitter_field, kco, NULL);
|
||||
@ -3993,15 +3993,15 @@ static void brush_puff(PEData *data, int point_index, float mouse_distance)
|
||||
copy_v3_v3(oco, key->co);
|
||||
mul_m4_v3(mat, oco);
|
||||
|
||||
/* use 'kco' as the object space version of worldspace 'co',
|
||||
* ob->imat is set before calling */
|
||||
/* Use `kco` as the object space version of world-space `co`,
|
||||
* `ob->imat` is set before calling. */
|
||||
mul_v3_m4v3(kco, data->ob->imat, oco);
|
||||
|
||||
point_index = BLI_kdtree_3d_find_nearest(edit->emitter_field, kco, NULL);
|
||||
if (point_index != -1) {
|
||||
copy_v3_v3(onor, &edit->emitter_cosnos[point_index * 6 + 3]);
|
||||
mul_mat3_m4_v3(data->ob->obmat, onor); /* normal into worldspace */
|
||||
mul_mat3_m4_v3(imat, onor); /* worldspace into particle space */
|
||||
mul_mat3_m4_v3(data->ob->obmat, onor); /* Normal into world-space. */
|
||||
mul_mat3_m4_v3(imat, onor); /* World-space into particle-space. */
|
||||
normalize_v3(onor);
|
||||
}
|
||||
else {
|
||||
|
@ -3125,7 +3125,8 @@ static void project_paint_face_init(const ProjPaintState *ps,
|
||||
uv, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, pixelScreenCo, w);
|
||||
}
|
||||
|
||||
/* a pity we need to get the worldspace pixel location here */
|
||||
/* A pity we need to get the world-space pixel location here
|
||||
* because it is a relatively expensive operation. */
|
||||
if (do_clip || do_3d_mapping) {
|
||||
interp_v3_v3v3v3(wco,
|
||||
ps->mvert_eval[lt_vtri[0]].co,
|
||||
@ -3208,7 +3209,10 @@ static void project_paint_face_init(const ProjPaintState *ps,
|
||||
else {
|
||||
/* we have a seam - deal with it! */
|
||||
|
||||
/* inset face coords. NOTE!!! ScreenSace for ortho, Worldspace in perspective view */
|
||||
/* Inset face coords.
|
||||
* - screen-space in orthographic view.
|
||||
* - world-space in perspective view.
|
||||
*/
|
||||
float insetCos[3][3];
|
||||
|
||||
/* Vertex screen-space coords. */
|
||||
@ -3373,8 +3377,8 @@ static void project_paint_face_init(const ProjPaintState *ps,
|
||||
if ((ps->do_occlude == false) ||
|
||||
!project_bucket_point_occluded(
|
||||
ps, bucketFaceNodes, tri_index, pixel_on_edge)) {
|
||||
/* a pity we need to get the worldspace
|
||||
* pixel location here */
|
||||
/* A pity we need to get the world-space pixel location here
|
||||
* because it is a relatively expensive operation. */
|
||||
if (do_clip || do_3d_mapping) {
|
||||
interp_v3_v3v3v3(wco, vCo[0], vCo[1], vCo[2], w);
|
||||
|
||||
|
@ -366,10 +366,12 @@ float *SCULPT_boundary_automasking_init(Object *ob,
|
||||
|
||||
/* Geodesic distances. */
|
||||
|
||||
/* Returns an array indexed by vertex index containing the geodesic distance to the closest vertex
|
||||
in the initial vertex set. The caller is responsible for freeing the array.
|
||||
Geodesic distances will only work when used with PBVH_FACES, for other types of PBVH it will
|
||||
fallback to euclidean distances to one of the initial vertices in the set. */
|
||||
/**
|
||||
* Returns an array indexed by vertex index containing the geodesic distance to the closest vertex
|
||||
* in the initial vertex set. The caller is responsible for freeing the array.
|
||||
* Geodesic distances will only work when used with PBVH_FACES, for other types of PBVH it will
|
||||
* fallback to euclidean distances to one of the initial vertices in the set.
|
||||
*/
|
||||
float *SCULPT_geodesic_distances_create(struct Object *ob,
|
||||
struct GSet *initial_vertices,
|
||||
const float limit_radius);
|
||||
|
@ -175,7 +175,7 @@ static void stats_object(Object *ob,
|
||||
if (stats_mesheval(me_eval, is_selected, stats)) {
|
||||
break;
|
||||
}
|
||||
ATTR_FALLTHROUGH; /* Fallthrough to displist. */
|
||||
ATTR_FALLTHROUGH; /* Fall-through to displist. */
|
||||
}
|
||||
case OB_MBALL: {
|
||||
int totv = 0, totf = 0, tottri = 0;
|
||||
|
@ -2369,8 +2369,8 @@ static void node_link_insert_offset_ntree(NodeInsertOfsData *iofsd,
|
||||
/* NODE_TEST will be used later, so disable for all nodes */
|
||||
ntreeNodeFlagSet(ntree, NODE_TEST, false);
|
||||
|
||||
/* insert->totr isn't updated yet,
|
||||
* so totr_insert is used to get the correct worldspace coords */
|
||||
/* `insert->totr` isn't updated yet,
|
||||
* so `totr_insert` is used to get the correct world-space coords. */
|
||||
rctf totr_insert;
|
||||
node_to_updated_rect(insert, &totr_insert);
|
||||
|
||||
|
@ -902,7 +902,7 @@ static int /*eContextResult*/ node_context(const bContext *C,
|
||||
|
||||
static void node_widgets()
|
||||
{
|
||||
/* create the widgetmap for the area here */
|
||||
/* Create the widget-map for the area here. */
|
||||
wmGizmoMapType_Params params{SPACE_NODE, RGN_TYPE_WINDOW};
|
||||
wmGizmoMapType *gzmap_type = WM_gizmomaptype_ensure(¶ms);
|
||||
WM_gizmogrouptype_append_and_link(gzmap_type, NODE_GGT_backdrop_transform);
|
||||
|
@ -115,8 +115,10 @@ enum {
|
||||
CONSTRAIN_AXIS_Z = 2,
|
||||
};
|
||||
|
||||
/* Constraining modes.
|
||||
Off / Scene orientation / Global (or Local if Scene orientation is Global) */
|
||||
/**
|
||||
* Constraining modes.
|
||||
* Off / Scene orientation / Global (or Local if Scene orientation is Global).
|
||||
*/
|
||||
enum {
|
||||
CONSTRAIN_MODE_OFF = 0,
|
||||
CONSTRAIN_MODE_1 = 1,
|
||||
@ -163,7 +165,7 @@ typedef struct RulerInfo {
|
||||
typedef struct RulerItem {
|
||||
wmGizmo gz;
|
||||
|
||||
/* worldspace coords, middle being optional */
|
||||
/** World-space coords, middle being optional. */
|
||||
float co[3][3];
|
||||
|
||||
int flag;
|
||||
|
@ -1731,9 +1731,9 @@ void ED_view3d_xr_shading_update(wmWindowManager *wm, const View3D *v3d, const S
|
||||
View3DShading *xr_shading = &wm->xr.session_settings.shading;
|
||||
/* Flags that shouldn't be overridden by the 3D View shading. */
|
||||
int flag_copy = 0;
|
||||
if (v3d->shading.type !=
|
||||
OB_SOLID) { /* Don't set V3D_SHADING_WORLD_ORIENTATION for solid shading since it results
|
||||
in distorted lighting when the view matrix has a scale factor. */
|
||||
if (v3d->shading.type != OB_SOLID) {
|
||||
/* Don't set V3D_SHADING_WORLD_ORIENTATION for solid shading since it results in distorted
|
||||
* lighting when the view matrix has a scale factor. */
|
||||
flag_copy |= V3D_SHADING_WORLD_ORIENTATION;
|
||||
}
|
||||
|
||||
|
@ -159,8 +159,11 @@ static void TimeToTransData(
|
||||
copy_v2_v2(td2d->ih2, td2d->h2);
|
||||
|
||||
/* Setup #TransData. */
|
||||
td->loc = time; /* Usually #td2d->loc is used here. But this is for when the original location is
|
||||
not float[3]. */
|
||||
|
||||
/* Usually #td2d->loc is used here.
|
||||
* But this is for when the original location is not float[3]. */
|
||||
td->loc = time;
|
||||
|
||||
copy_v3_v3(td->iloc, td->loc);
|
||||
td->val = time;
|
||||
td->ival = *(time);
|
||||
|
@ -581,15 +581,15 @@ static void raycast_all_cb(void *userdata, int index, const BVHTreeRay *ray, BVH
|
||||
struct RayCastAll_Data *data = userdata;
|
||||
data->raycast_callback(data->bvhdata, index, ray, hit);
|
||||
if (hit->index != -1) {
|
||||
/* get all values in worldspace */
|
||||
/* Get all values in world-space. */
|
||||
float location[3], normal[3];
|
||||
float depth;
|
||||
|
||||
/* worldspace location */
|
||||
/* World-space location. */
|
||||
mul_v3_m4v3(location, (float(*)[4])data->obmat, hit->co);
|
||||
depth = (hit->dist + data->len_diff) / data->local_scale;
|
||||
|
||||
/* worldspace normal */
|
||||
/* World-space normal. */
|
||||
copy_v3_v3(normal, hit->no);
|
||||
mul_m3_v3((float(*)[3])data->timat, normal);
|
||||
normalize_v3(normal);
|
||||
@ -783,7 +783,7 @@ static bool raycastMesh(SnapObjectContext *sctx,
|
||||
*ray_depth = hit.dist;
|
||||
copy_v3_v3(r_loc, hit.co);
|
||||
|
||||
/* back to worldspace */
|
||||
/* Back to world-space. */
|
||||
mul_m4_v3(obmat, r_loc);
|
||||
|
||||
if (r_no) {
|
||||
@ -953,7 +953,7 @@ static bool raycastEditMesh(SnapObjectContext *sctx,
|
||||
*ray_depth = hit.dist;
|
||||
copy_v3_v3(r_loc, hit.co);
|
||||
|
||||
/* back to worldspace */
|
||||
/* Back to world-space. */
|
||||
mul_m4_v3(obmat, r_loc);
|
||||
|
||||
if (r_no) {
|
||||
|
@ -728,7 +728,7 @@ typedef enum eBConstraint_Flags {
|
||||
|
||||
/* bConstraint->ownspace/tarspace */
|
||||
typedef enum eBConstraint_SpaceTypes {
|
||||
/** Default for all - worldspace. */
|
||||
/** Default for all - world-space. */
|
||||
CONSTRAINT_SPACE_WORLD = 0,
|
||||
/** For all - custom space. */
|
||||
CONSTRAINT_SPACE_CUSTOM = 5,
|
||||
|
@ -302,7 +302,7 @@ typedef struct bNode {
|
||||
|
||||
char _pad1[4];
|
||||
|
||||
/** Entire boundbox (worldspace). */
|
||||
/** Entire boundbox (world-space). */
|
||||
rctf totr;
|
||||
/** Optional buttons area. */
|
||||
rctf butr;
|
||||
|
@ -311,7 +311,7 @@ typedef struct Object {
|
||||
float rotAxis[3], drotAxis[3];
|
||||
/** Axis angle rotation - angle part. */
|
||||
float rotAngle, drotAngle;
|
||||
/** Final worldspace matrix with constraints & animsys applied. */
|
||||
/** Final world-space matrix with constraints & animsys applied. */
|
||||
float obmat[4][4];
|
||||
/** Inverse result of parent, so that object doesn't 'stick' to parent. */
|
||||
float parentinv[4][4];
|
||||
|
@ -667,7 +667,7 @@ typedef enum eRegion_Type {
|
||||
RGN_TYPE_FOOTER = 11,
|
||||
RGN_TYPE_TOOL_HEADER = 12,
|
||||
/* Region type used exclusively by internal code and add-ons to register draw callbacks to the XR
|
||||
context (surface, mirror view). Does not represent any real region. */
|
||||
* context (surface, mirror view). Does not represent any real region. */
|
||||
RGN_TYPE_XR = 13,
|
||||
|
||||
#define RGN_TYPE_LEN (RGN_TYPE_XR + 1)
|
||||
|
@ -128,9 +128,9 @@ typedef struct PointDensity {
|
||||
struct Object *object;
|
||||
/** `index + 1` in ob.particlesystem, non-ID pointer not allowed */
|
||||
int psys;
|
||||
/** cache points in worldspace, object space, ... ? */
|
||||
/** cache points in world-space, object space, ... ? */
|
||||
short psys_cache_space;
|
||||
/** cache points in worldspace, object space, ... ? */
|
||||
/** cache points in world-space, object space, ... ? */
|
||||
short ob_cache_space;
|
||||
/** vertex attribute layer for color source, MAX_CUSTOMDATA_LAYER_NAME */
|
||||
char vertex_attribute_name[64];
|
||||
|
@ -64,8 +64,10 @@ typedef struct RegionView3D {
|
||||
|
||||
/** User defined clipping planes. */
|
||||
float clip[6][4];
|
||||
/** Clip in object space,
|
||||
* means we can test for clipping in editmode without first going into worldspace. */
|
||||
/**
|
||||
* Clip in object space,
|
||||
* means we can test for clipping in edit-mode without first going into world-space.
|
||||
*/
|
||||
float clip_local[6][4];
|
||||
struct BoundBox *clipbb;
|
||||
|
||||
@ -94,8 +96,8 @@ typedef struct RegionView3D {
|
||||
/** Runtime only. */
|
||||
float pixsize;
|
||||
/**
|
||||
* View center & orbit pivot, negative of worldspace location,
|
||||
* also matches -viewinv[3][0:3] in ortho mode.
|
||||
* View center & orbit pivot, negative of world-space location,
|
||||
* also matches `-viewinv[3][0:3]` in orthographic mode.
|
||||
*/
|
||||
float ofs[3];
|
||||
/** Viewport zoom on the camera frame, see BKE_screen_view3d_zoom_to_fac. */
|
||||
|
@ -117,7 +117,7 @@ static void rna_def_animviz_motion_path(BlenderRNA *brna)
|
||||
srna = RNA_def_struct(brna, "MotionPath", NULL);
|
||||
RNA_def_struct_sdna(srna, "bMotionPath");
|
||||
RNA_def_struct_ui_text(
|
||||
srna, "Motion Path", "Cache of the worldspace positions of an element over a frame range");
|
||||
srna, "Motion Path", "Cache of the world-space positions of an element over a frame range");
|
||||
|
||||
/* Collections */
|
||||
prop = RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
|
||||
|
@ -426,7 +426,7 @@ static void meshdeformModifier_do(ModifierData *md,
|
||||
bindcagecos = (float(*)[3])mmd->bindcagecos;
|
||||
|
||||
for (a = 0; a < totcagevert; a++) {
|
||||
/* get cage vertex in world space with binding transform */
|
||||
/* Get cage vertex in world-space with binding transform. */
|
||||
float co[3];
|
||||
mul_v3_m4v3(co, mmd->bindmat, dco[a]);
|
||||
/* compute difference with world space bind coord */
|
||||
|
@ -192,7 +192,7 @@ static Mesh *uvprojectModifier_do(UVProjectModifierData *umd,
|
||||
|
||||
mul_m4_m4m4(projectors[i].projmat, offsetmat, tmpmat);
|
||||
|
||||
/* calculate worldspace projector normal (for best projector test) */
|
||||
/* Calculate world-space projector normal (for best projector test). */
|
||||
projectors[i].normal[0] = 0;
|
||||
projectors[i].normal[1] = 0;
|
||||
projectors[i].normal[2] = 1;
|
||||
@ -208,7 +208,7 @@ static Mesh *uvprojectModifier_do(UVProjectModifierData *umd,
|
||||
|
||||
coords = BKE_mesh_vert_coords_alloc(mesh, &numVerts);
|
||||
|
||||
/* convert coords to world space */
|
||||
/* Convert coords to world-space. */
|
||||
for (i = 0, co = coords; i < numVerts; i++, co++) {
|
||||
mul_m4_v3(ob->obmat, *co);
|
||||
}
|
||||
|
@ -432,10 +432,10 @@ static bool wm_xr_navigation_grab_can_do_bimanual(const wmXrActionData *actionda
|
||||
const XrGrabData *data)
|
||||
{
|
||||
/* Returns true if: 1) Bimanual interaction is currently occurring (i.e. inputs on both
|
||||
controllers are pressed) and 2) bimanual interaction occurred on the last update. This second
|
||||
part is needed to avoid "jumpy" navigation changes when transitioning from one-handed to
|
||||
two-handed interaction (see #wm_xr_grab_compute/compute_bimanual() for how navigation deltas
|
||||
are calculated). */
|
||||
* controllers are pressed) and 2) bimanual interaction occurred on the last update. This second
|
||||
* part is needed to avoid "jumpy" navigation changes when transitioning from one-handed to
|
||||
* two-handed interaction (see #wm_xr_grab_compute/compute_bimanual() for how navigation deltas
|
||||
* are calculated). */
|
||||
return (actiondata->bimanual && data->bimanual_prev);
|
||||
}
|
||||
|
||||
@ -545,7 +545,7 @@ static int wm_xr_navigation_grab_modal(bContext *C, wmOperator *op, const wmEven
|
||||
/* Check if navigation is locked. */
|
||||
if (!wm_xr_navigation_grab_is_locked(data, do_bimanual)) {
|
||||
/* Prevent unwanted snapping (i.e. "jumpy" navigation changes when transitioning from
|
||||
two-handed to one-handed interaction) at the end of a bimanual interaction. */
|
||||
* two-handed to one-handed interaction) at the end of a bimanual interaction. */
|
||||
if (!wm_xr_navigation_grab_is_bimanual_ending(actiondata, data)) {
|
||||
wm_xr_navigation_grab_apply(xr, actiondata, data, do_bimanual);
|
||||
}
|
||||
@ -554,9 +554,9 @@ static int wm_xr_navigation_grab_modal(bContext *C, wmOperator *op, const wmEven
|
||||
wm_xr_navigation_grab_bimanual_state_update(actiondata, data);
|
||||
|
||||
/* Note: KM_PRESS and KM_RELEASE are the only two values supported by XR events during event
|
||||
dispatching (see #wm_xr_session_action_states_interpret()). For modal XR operators, modal
|
||||
handling starts when an input is "pressed" (action state exceeds the action threshold) and
|
||||
ends when the input is "released" (state falls below the threshold). */
|
||||
* dispatching (see #wm_xr_session_action_states_interpret()). For modal XR operators, modal
|
||||
* handling starts when an input is "pressed" (action state exceeds the action threshold) and
|
||||
* ends when the input is "released" (state falls below the threshold). */
|
||||
switch (event->val) {
|
||||
case KM_PRESS:
|
||||
return OPERATOR_RUNNING_MODAL;
|
||||
|
Loading…
Reference in New Issue
Block a user