Cleanup: style, whitespace
This commit is contained in:
parent
67cf4cb5ec
commit
ac476375b1
@ -1025,7 +1025,7 @@ void BKE_lattice_modifiers_calc(struct Depsgraph *depsgraph, Scene *scene, Objec
|
||||
{
|
||||
Lattice *lt = ob->data;
|
||||
/* Get vertex coordinates from the original copy; otherwise we get already-modified coordinates. */
|
||||
Object *orig_ob = DEG_get_original_object(ob);
|
||||
Object *ob_orig = DEG_get_original_object(ob);
|
||||
VirtualModifierData virtualModifierData;
|
||||
ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
|
||||
float (*vertexCos)[3] = NULL;
|
||||
@ -1050,7 +1050,7 @@ void BKE_lattice_modifiers_calc(struct Depsgraph *depsgraph, Scene *scene, Objec
|
||||
if (mti->isDisabled && mti->isDisabled(md, 0)) continue;
|
||||
if (mti->type != eModifierTypeType_OnlyDeform) continue;
|
||||
|
||||
if (!vertexCos) vertexCos = BKE_lattice_vertexcos_get(orig_ob, &numVerts);
|
||||
if (!vertexCos) vertexCos = BKE_lattice_vertexcos_get(ob_orig, &numVerts);
|
||||
modifier_deformVerts_DM_deprecated(md, &mectx, NULL, vertexCos, numVerts);
|
||||
}
|
||||
|
||||
@ -1062,7 +1062,7 @@ void BKE_lattice_modifiers_calc(struct Depsgraph *depsgraph, Scene *scene, Objec
|
||||
}
|
||||
else {
|
||||
/* Displist won't do anything; this is just for posterity's sake until we remove it. */
|
||||
if (!vertexCos) vertexCos = BKE_lattice_vertexcos_get(orig_ob, &numVerts);
|
||||
if (!vertexCos) vertexCos = BKE_lattice_vertexcos_get(ob_orig, &numVerts);
|
||||
|
||||
DispList *dl = MEM_callocN(sizeof(*dl), "lt_dl");
|
||||
dl->type = DL_VERTS;
|
||||
|
@ -1892,22 +1892,22 @@ Gwn_Batch *DRW_cache_bone_envelope_outline_get(void)
|
||||
for (int a = 0; a < CIRCLE_RESOL; a++) {
|
||||
v2[0] = radius * sinf((2.0f * M_PI * a) / ((float)CIRCLE_RESOL));
|
||||
v2[1] = radius * cosf((2.0f * M_PI * a) / ((float)CIRCLE_RESOL));
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v , v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos1, v , v1);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v, v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos1, v, v1);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos2, v++, v2);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v , v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos1, v , v1);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v, v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos1, v, v1);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos2, v++, v2);
|
||||
copy_v2_v2(v0, v1);
|
||||
copy_v2_v2(v1, v2);
|
||||
}
|
||||
v2[0] = 0.0f;
|
||||
v2[1] = radius;
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v , v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos1, v , v1);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v, v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos1, v, v1);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos2, v++, v2);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v , v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos1, v , v1);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v, v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos1, v, v1);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos2, v++, v2);
|
||||
|
||||
SHC.drw_bone_envelope_outline = GWN_batch_create_ex(GWN_PRIM_TRI_STRIP, vbo, NULL, GWN_BATCH_OWNS_VBO);
|
||||
@ -2022,9 +2022,9 @@ Gwn_Batch *DRW_cache_bone_point_wire_outline_get(void)
|
||||
}
|
||||
v1[0] = 0.0f;
|
||||
v1[1] = radius;
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v , v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v, v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos1, v++, v1);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v , v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos0, v, v0);
|
||||
GWN_vertbuf_attr_set(vbo, attr_id.pos1, v++, v1);
|
||||
|
||||
SHC.drw_bone_point_wire = GWN_batch_create_ex(GWN_PRIM_TRI_STRIP, vbo, NULL, GWN_BATCH_OWNS_VBO);
|
||||
|
@ -3247,15 +3247,15 @@ static Gwn_IndexBuf *mesh_batch_cache_get_edges_adjacency(MeshRenderData *rdata,
|
||||
break;
|
||||
}
|
||||
v0 = BM_elem_index_get(bm_looptri[e]->v);
|
||||
v1 = BM_elem_index_get(bm_looptri[(e+1)%3]->v);
|
||||
v2 = BM_elem_index_get(bm_looptri[(e+2)%3]->v);
|
||||
v1 = BM_elem_index_get(bm_looptri[(e + 1) % 3]->v);
|
||||
v2 = BM_elem_index_get(bm_looptri[(e + 2) % 3]->v);
|
||||
}
|
||||
else {
|
||||
MLoop *mloop = rdata->mloop;
|
||||
MLoopTri *mlt = rdata->mlooptri + i;
|
||||
v0 = mloop[mlt->tri[e]].v;
|
||||
v1 = mloop[mlt->tri[(e+1)%3]].v;
|
||||
v2 = mloop[mlt->tri[(e+2)%3]].v;
|
||||
v1 = mloop[mlt->tri[(e + 1) % 3]].v;
|
||||
v2 = mloop[mlt->tri[(e + 2) % 3]].v;
|
||||
}
|
||||
bool inv_indices = (v1 > v2);
|
||||
void **pval;
|
||||
|
@ -109,7 +109,7 @@ int insert_vert_fcurve(struct FCurve *fcu, float x, float y, eBezTriple_Keyframe
|
||||
* Use this to insert a keyframe using the current value being keyframed, in the
|
||||
* nominated F-Curve (no creation of animation data performed). Returns success.
|
||||
*/
|
||||
bool insert_keyframe_direct(struct Depsgraph *depsgraph,struct ReportList *reports, struct PointerRNA ptr, struct PropertyRNA *prop, struct FCurve *fcu, float cfra, eBezTriple_KeyframeType keytype, eInsertKeyFlags flag);
|
||||
bool insert_keyframe_direct(struct Depsgraph *depsgraph, struct ReportList *reports, struct PointerRNA ptr, struct PropertyRNA *prop, struct FCurve *fcu, float cfra, eBezTriple_KeyframeType keytype, eInsertKeyFlags flag);
|
||||
|
||||
/* -------- */
|
||||
|
||||
|
@ -110,7 +110,8 @@ void ED_view3d_from_m4(float mat[4][4], float ofs[3], float quat[4], float *dist
|
||||
|
||||
void ED_view3d_from_object(struct Object *ob, float ofs[3], float quat[4], float *dist, float *lens);
|
||||
void ED_view3d_to_object(
|
||||
const struct Depsgraph *depsgraph, struct Object *ob, const float ofs[3], const float quat[4], const float dist);
|
||||
const struct Depsgraph *depsgraph, struct Object *ob,
|
||||
const float ofs[3], const float quat[4], const float dist);
|
||||
|
||||
void ED_view3d_lastview_store(struct RegionView3D *rv3d);
|
||||
|
||||
@ -380,7 +381,8 @@ int ED_view3d_view_layer_set(int lay, const int *values, int *active);
|
||||
struct RV3DMatrixStore *ED_view3d_mats_rv3d_backup(struct RegionView3D *rv3d);
|
||||
void ED_view3d_mats_rv3d_restore(struct RegionView3D *rv3d, struct RV3DMatrixStore *rv3dmat);
|
||||
|
||||
void ED_draw_object_facemap(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, const float col[4], const int facemap);
|
||||
void ED_draw_object_facemap(
|
||||
struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, const float col[4], const int facemap);
|
||||
|
||||
struct RenderEngineType *ED_view3d_engine_type(struct Scene *scene, int drawtype);
|
||||
|
||||
@ -437,20 +439,24 @@ uint64_t ED_view3d_datamask(const struct Scene *scene, const struct View3D *v3d)
|
||||
uint64_t ED_view3d_screen_datamask(const struct Scene *scene, const struct bScreen *screen);
|
||||
|
||||
bool ED_view3d_offset_lock_check(const struct View3D *v3d, const struct RegionView3D *rv3d);
|
||||
void ED_view3d_persp_switch_from_camera(const struct Depsgraph *depsgraph,
|
||||
void ED_view3d_persp_switch_from_camera(
|
||||
const struct Depsgraph *depsgraph,
|
||||
struct View3D *v3d, struct RegionView3D *rv3d, const char persp);
|
||||
bool ED_view3d_persp_ensure(const struct Depsgraph *depsgraph,
|
||||
bool ED_view3d_persp_ensure(
|
||||
const struct Depsgraph *depsgraph,
|
||||
struct View3D *v3d, struct ARegion *ar);
|
||||
|
||||
|
||||
/* camera lock functions */
|
||||
bool ED_view3d_camera_lock_check(const struct View3D *v3d, const struct RegionView3D *rv3d);
|
||||
/* copy the camera to the view before starting a view transformation */
|
||||
void ED_view3d_camera_lock_init_ex(const struct Depsgraph *depsgraph,
|
||||
void ED_view3d_camera_lock_init_ex(
|
||||
const struct Depsgraph *depsgraph,
|
||||
struct View3D *v3d, struct RegionView3D *rv3d, const bool calc_dist);
|
||||
void ED_view3d_camera_lock_init(const struct Depsgraph *depsgraph, struct View3D *v3d, struct RegionView3D *rv3d);
|
||||
/* copy the view to the camera, return true if */
|
||||
bool ED_view3d_camera_lock_sync(const struct Depsgraph *depsgraph,
|
||||
bool ED_view3d_camera_lock_sync(
|
||||
const struct Depsgraph *depsgraph,
|
||||
struct View3D *v3d, struct RegionView3D *rv3d);
|
||||
|
||||
bool ED_view3d_camera_autokey(
|
||||
|
@ -86,8 +86,6 @@
|
||||
|
||||
#include "view3d_intern.h" /* own include */
|
||||
|
||||
#include "DEG_depsgraph_query.h"
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Generic View Operator Properties
|
||||
* \{ */
|
||||
|
@ -464,7 +464,7 @@ bool ED_view3d_camera_lock_check(const View3D *v3d, const RegionView3D *rv3d)
|
||||
* Apply the camera object transformation to the view-port.
|
||||
* (needed so we can use regular view-port manipulation operators, that sync back to the camera).
|
||||
*/
|
||||
void ED_view3d_camera_lock_init_ex(const Depsgraph* depsgraph, View3D *v3d, RegionView3D *rv3d, const bool calc_dist)
|
||||
void ED_view3d_camera_lock_init_ex(const Depsgraph *depsgraph, View3D *v3d, RegionView3D *rv3d, const bool calc_dist)
|
||||
{
|
||||
if (ED_view3d_camera_lock_check(v3d, rv3d)) {
|
||||
Object *camera_eval = DEG_get_evaluated_object(depsgraph, v3d->camera);
|
||||
@ -1354,7 +1354,7 @@ void ED_view3d_to_object(const Depsgraph *depsgraph, Object *ob, const float ofs
|
||||
ED_view3d_to_m4(mat, ofs, quat, dist);
|
||||
|
||||
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
|
||||
BKE_object_apply_mat4_ex(ob, mat, ob_eval->parent, ob_eval->parentinv , true);
|
||||
BKE_object_apply_mat4_ex(ob, mat, ob_eval->parent, ob_eval->parentinv, true);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
Loading…
Reference in New Issue
Block a user