Cleanup: style, warning
This commit is contained in:
@@ -478,7 +478,7 @@ static void distribute_from_verts_exec(ParticleTask *thread, ParticleData *pa, i
|
||||
int w, maxw;
|
||||
|
||||
psys_particle_on_dm(ctx->mesh,from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co1,0,0,0,orco1,0);
|
||||
BKE_mesh_orco_verts_transform((Mesh*)ob->data, &orco1, 1, 1);
|
||||
BKE_mesh_orco_verts_transform(ob->data, &orco1, 1, 1);
|
||||
maxw = BLI_kdtree_find_nearest_n(ctx->tree,orco1,ptn,3);
|
||||
|
||||
for (w=0; w<maxw; w++) {
|
||||
@@ -671,7 +671,7 @@ static void distribute_children_exec(ParticleTask *thread, ChildParticle *cpa, i
|
||||
float pweight[10];
|
||||
|
||||
psys_particle_on_dm(mesh,cfrom,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,co1,nor1,NULL,NULL,orco1);
|
||||
BKE_mesh_orco_verts_transform((Mesh*)ob->data, &orco1, 1, 1);
|
||||
BKE_mesh_orco_verts_transform(ob->data, &orco1, 1, 1);
|
||||
maxw = BLI_kdtree_find_nearest_n(ctx->tree,orco1,ptn,3);
|
||||
|
||||
maxd=ptn[maxw-1].dist;
|
||||
@@ -903,7 +903,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti
|
||||
|
||||
for (p=0,pa=psys->particles; p<totpart; p++,pa++) {
|
||||
psys_particle_on_dm(mesh,part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,nor,0,0,orco);
|
||||
BKE_mesh_orco_verts_transform((Mesh*)ob->data, &orco, 1, 1);
|
||||
BKE_mesh_orco_verts_transform(ob->data, &orco, 1, 1);
|
||||
BLI_kdtree_insert(tree, p, orco);
|
||||
}
|
||||
|
||||
@@ -944,7 +944,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti
|
||||
for (p=0; p<totvert; p++) {
|
||||
if (orcodata) {
|
||||
copy_v3_v3(co,orcodata[p]);
|
||||
BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co, 1, 1);
|
||||
BKE_mesh_orco_verts_transform(ob->data, &co, 1, 1);
|
||||
}
|
||||
else
|
||||
copy_v3_v3(co,mv[p].co);
|
||||
@@ -977,7 +977,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti
|
||||
jitter_offset = MEM_callocN(sizeof(float) * totelem, "particle_distribution_jitoff");
|
||||
|
||||
/* Calculate weights from face areas */
|
||||
if ((part->flag&PART_EDISTR || children) && from != PART_FROM_VERT) {
|
||||
if ((part->flag & PART_EDISTR || children) && from != PART_FROM_VERT) {
|
||||
MVert *v1, *v2, *v3, *v4;
|
||||
float totarea=0.f, co1[3], co2[3], co3[3], co4[3];
|
||||
float (*orcodata)[3];
|
||||
@@ -991,12 +991,12 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti
|
||||
copy_v3_v3(co1, orcodata[mf->v1]);
|
||||
copy_v3_v3(co2, orcodata[mf->v2]);
|
||||
copy_v3_v3(co3, orcodata[mf->v3]);
|
||||
BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co1, 1, 1);
|
||||
BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co2, 1, 1);
|
||||
BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co3, 1, 1);
|
||||
BKE_mesh_orco_verts_transform(ob->data, &co1, 1, 1);
|
||||
BKE_mesh_orco_verts_transform(ob->data, &co2, 1, 1);
|
||||
BKE_mesh_orco_verts_transform(ob->data, &co3, 1, 1);
|
||||
if (mf->v4) {
|
||||
copy_v3_v3(co4, orcodata[mf->v4]);
|
||||
BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co4, 1, 1);
|
||||
BKE_mesh_orco_verts_transform(ob->data, &co4, 1, 1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1283,8 +1283,8 @@ void DRW_gpencil_populate_datablock(
|
||||
}
|
||||
else {
|
||||
int remap_cfra = BKE_gpencil_time_modifier(
|
||||
draw_ctx->depsgraph, scene,ob, gpl, cfra_eval,
|
||||
stl->storage->is_render);
|
||||
draw_ctx->depsgraph, scene, ob, gpl, cfra_eval,
|
||||
stl->storage->is_render);
|
||||
|
||||
gpf = BKE_gpencil_layer_getframe(gpl, remap_cfra, GP_GETFRAME_USE_PREV);
|
||||
}
|
||||
|
||||
@@ -698,7 +698,7 @@ void DRW_cache_object_face_wireframe_get(
|
||||
{
|
||||
switch (ob->type) {
|
||||
case OB_MESH:
|
||||
DRW_mesh_batch_cache_get_wireframes_face_texbuf((Mesh *)ob->data, r_vert_tx, r_faceid_tx, r_tri_count);
|
||||
DRW_mesh_batch_cache_get_wireframes_face_texbuf(ob->data, r_vert_tx, r_faceid_tx, r_tri_count);
|
||||
|
||||
/* TODO, should match 'DRW_cache_object_surface_get' */
|
||||
}
|
||||
|
||||
@@ -1663,7 +1663,7 @@ static uiLayout *gpencil_draw_modifier(
|
||||
uiLayoutSetEnabled(sub, false);
|
||||
}
|
||||
uiItemEnumO(sub, "OBJECT_OT_gpencil_modifier_apply", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Apply"),
|
||||
0, "apply_as", MODIFIER_APPLY_DATA);
|
||||
0, "apply_as", MODIFIER_APPLY_DATA);
|
||||
uiItemO(row, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy"), ICON_NONE,
|
||||
"OBJECT_OT_gpencil_modifier_copy");
|
||||
|
||||
|
||||
@@ -253,8 +253,8 @@ static bool parent_drop_allowed(SpaceOops *soops, TreeElement *te, Object *poten
|
||||
*/
|
||||
if (scene) {
|
||||
for (ViewLayer *view_layer = scene->view_layers.first;
|
||||
view_layer;
|
||||
view_layer = view_layer->next)
|
||||
view_layer;
|
||||
view_layer = view_layer->next)
|
||||
{
|
||||
if (BKE_view_layer_base_find(view_layer, potential_child)) {
|
||||
return true;
|
||||
|
||||
@@ -63,8 +63,9 @@ static void copyData(const GpencilModifierData *md, GpencilModifierData *target)
|
||||
BKE_gpencil_modifier_copyData_generic(md, target);
|
||||
}
|
||||
|
||||
static int remapTime(struct GpencilModifierData *md, struct Depsgraph *UNUSED(depsgraph),
|
||||
struct Scene *scene, struct Object *ob, struct bGPDlayer *gpl, int cfra)
|
||||
static int remapTime(
|
||||
struct GpencilModifierData *md, struct Depsgraph *UNUSED(depsgraph),
|
||||
struct Scene *scene, struct Object *UNUSED(ob), struct bGPDlayer *gpl, int cfra)
|
||||
{
|
||||
TimeGpencilModifierData *mmd = (TimeGpencilModifierData *)md;
|
||||
const int sfra = scene->r.sfra;
|
||||
@@ -107,7 +108,7 @@ GpencilModifierTypeInfo modifierType_Gpencil_Time = {
|
||||
/* structSize */ sizeof(TimeGpencilModifierData),
|
||||
/* type */ eGpencilModifierTypeType_Gpencil,
|
||||
/* flags */ eGpencilModifierTypeFlag_Single |
|
||||
eGpencilModifierTypeFlag_NoApply,
|
||||
eGpencilModifierTypeFlag_NoApply,
|
||||
|
||||
/* copyData */ copyData,
|
||||
|
||||
|
||||
@@ -746,13 +746,13 @@ static void rna_def_modifier_gpenciltime(BlenderRNA *brna)
|
||||
RNA_def_property_int_sdna(prop, NULL, "offset");
|
||||
RNA_def_property_range(prop, -INT_MAX, INT_MAX);
|
||||
RNA_def_property_ui_text(prop, "Offset",
|
||||
"Number of frames to offset original keyframe number");
|
||||
"Number of frames to offset original keyframe number");
|
||||
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
|
||||
|
||||
prop = RNA_def_property(srna, "use_keep_loop", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_TIME_KEEP_LOOP);
|
||||
RNA_def_property_ui_text(prop, "Keep Loop",
|
||||
"Retiming end frames and move to start of animation to keep loop");
|
||||
"Retiming end frames and move to start of animation to keep loop");
|
||||
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user