Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Sun, 2 Dec 2018 03:15:43 +0000 (14:15 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 2 Dec 2018 03:16:09 +0000 (14:16 +1100)
15 files changed:
source/blender/blenkernel/BKE_effect.h
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/rigidbody.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_modifier.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_particle.c

index 3d4154c572b0cb61cc9e6bb5001fa7e90fdc5a3a..9ba1bbdee07f81aea6b274d0e80562f15d2f84cf 100644 (file)
@@ -47,8 +47,7 @@ struct ParticleKey;
 struct Depsgraph;
 struct ViewLayer;
 
-struct EffectorWeights *BKE_add_effector_weights(struct Collection *collection);
-struct PartDeflect *object_add_collision_fields(int type);
+struct EffectorWeights *BKE_effector_add_weights(struct Collection *collection);
 
 /* Input to effector code */
 typedef struct EffectedPoint {
@@ -120,7 +119,9 @@ typedef struct EffectorRelation {
        struct PartDeflect *pd;
 } EffectorRelation;
 
-void free_partdeflect(struct PartDeflect *pd);
+
+struct PartDeflect *BKE_partdeflect_new(int type);
+void                BKE_partdeflect_free(struct PartDeflect *pd);
 
 struct ListBase *BKE_effector_relations_create(
         struct Depsgraph *depsgraph,
index e10cfc381640a72a9b6a3ae01cbeafb21785b678..cf5b3d3a51b77d4cf843ff74339a6ec4a9adaf8c 100644 (file)
@@ -146,7 +146,7 @@ void cloth_init(ClothModifierData *clmd )
        clmd->sim_parms->bending_model = CLOTH_BENDING_ANGULAR;
 
        if (!clmd->sim_parms->effector_weights)
-               clmd->sim_parms->effector_weights = BKE_add_effector_weights(NULL);
+               clmd->sim_parms->effector_weights = BKE_effector_add_weights(NULL);
 
        if (clmd->point_cache)
                clmd->point_cache->step = 1;
index 5453982b07052abb688b68b84c5dbbed12b46333..590fe559ff048fccb84e84e673ccf0f45f2c32de 100644 (file)
@@ -1039,7 +1039,7 @@ DynamicPaintSurface *dynamicPaint_createNewSurface(DynamicPaintCanvasSettings *c
        /* Using ID_BRUSH i18n context, as we have no physics/dpaint one for now... */
        dynamicPaintSurface_setUniqueName(surface, CTX_DATA_(BLT_I18NCONTEXT_ID_BRUSH, "Surface"));
 
-       surface->effector_weights = BKE_add_effector_weights(NULL);
+       surface->effector_weights = BKE_effector_add_weights(NULL);
 
        dynamicPaintSurface_updateType(surface);
 
index f54082de153e3575612874edde34d5bd176a5b4e..0c8a47be4b4a064c4da76789debce606c6d6da10 100644 (file)
@@ -87,7 +87,7 @@
 #include <string.h>
 #endif // WITH_MOD_FLUID
 
-EffectorWeights *BKE_add_effector_weights(Collection *collection)
+EffectorWeights *BKE_effector_add_weights(Collection *collection)
 {
        EffectorWeights *weights = MEM_callocN(sizeof(EffectorWeights), "EffectorWeights");
        int i;
@@ -102,7 +102,7 @@ EffectorWeights *BKE_add_effector_weights(Collection *collection)
 
        return weights;
 }
-PartDeflect *object_add_collision_fields(int type)
+PartDeflect *BKE_partdeflect_new(int type)
 {
        PartDeflect *pd;
 
@@ -140,7 +140,7 @@ PartDeflect *object_add_collision_fields(int type)
 
 /************************ PARTICLES ***************************/
 
-void free_partdeflect(PartDeflect *pd)
+void BKE_partdeflect_free(PartDeflect *pd)
 {
        if (!pd) {
                return;
index 67edcff49a68587708997e4de1b9bcfec57cdd5c..3e2e890f54273694ecfa48c13316d4687fa2e0a4 100644 (file)
@@ -582,7 +582,7 @@ void BKE_object_free(Object *ob)
 
        BKE_constraints_free_ex(&ob->constraints, false);
 
-       free_partdeflect(ob->pd);
+       BKE_partdeflect_free(ob->pd);
        BKE_rigidbody_free_object(ob, NULL);
        BKE_rigidbody_free_constraint(ob);
 
index 6ceae2fdc2d2d642bff49d68607885fe97e2e46e..5a9722a867c5394d0e5e194a23d6f2e0ed9622b6 100644 (file)
@@ -442,8 +442,8 @@ void BKE_particlesettings_free(ParticleSettings *part)
        if (part->twistcurve)
                curvemapping_free(part->twistcurve);
 
-       free_partdeflect(part->pd);
-       free_partdeflect(part->pd2);
+       BKE_partdeflect_free(part->pd);
+       BKE_partdeflect_free(part->pd2);
 
        MEM_SAFE_FREE(part->effector_weights);
 
@@ -3212,7 +3212,7 @@ static void default_particle_settings(ParticleSettings *part)
        part->draw_col = PART_DRAW_COL_MAT;
 
        if (!part->effector_weights)
-               part->effector_weights = BKE_add_effector_weights(NULL);
+               part->effector_weights = BKE_effector_add_weights(NULL);
 
        part->omat = 1;
        part->use_modifier_stack = false;
index 919a0c5fa02117bfd885b35b0b93e5c6eb163e37..9ca8c834bb98a4b3a23a314aead805478ac8bc9c 100644 (file)
@@ -955,7 +955,7 @@ RigidBodyWorld *BKE_rigidbody_create_world(Scene *scene)
        rbw->shared = MEM_callocN(sizeof(*rbw->shared), "RigidBodyWorld_Shared");
 
        /* set default settings */
-       rbw->effector_weights = BKE_add_effector_weights(NULL);
+       rbw->effector_weights = BKE_effector_add_weights(NULL);
 
        rbw->ltime = PSFRA;
 
index 26d9f59853c8042f625eb734241181d8c8d15a1b..506725c89e8b48dbb133a4d1e68eb02d7c596c15 100644 (file)
@@ -538,7 +538,7 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
                        smd->domain->flame_smoke_color[2] = 0.7f;
 
                        smd->domain->viewsettings = MOD_SMOKE_VIEW_SHOWBIG;
-                       smd->domain->effector_weights = BKE_add_effector_weights(NULL);
+                       smd->domain->effector_weights = BKE_effector_add_weights(NULL);
 
 #ifdef WITH_OPENVDB_BLOSC
                        smd->domain->openvdb_comp = VDB_COMPRESSION_BLOSC;
index 4c1555e9451cd27630fa3c6fdf8a64dab8088cf0..2707e4eebd7d0079d1803318f2a0c8d71a2d55f2 100644 (file)
@@ -3280,7 +3280,7 @@ SoftBody *sbNew(Scene *scene)
        sb->shared->pointcache = BKE_ptcache_add(&sb->shared->ptcaches);
 
        if (!sb->effector_weights)
-               sb->effector_weights = BKE_add_effector_weights(NULL);
+               sb->effector_weights = BKE_effector_add_weights(NULL);
 
        sb->last_frame= MINFRAME-1;
 
index acf6ead7d962fc1d5e4a88e02c387bf4f1b69c55..076370c887743fc376d40b2f0d598430b6a5cf53 100644 (file)
@@ -4332,7 +4332,7 @@ static void lib_link_particlesettings(FileData *fd, Main *main)
                                part->effector_weights->group = newlibadr(fd, part->id.lib, part->effector_weights->group);
                        }
                        else {
-                               part->effector_weights = BKE_add_effector_weights(part->eff_group);
+                               part->effector_weights = BKE_effector_add_weights(part->eff_group);
                        }
 
                        if (part->dupliweights.first && part->dup_group) {
@@ -4411,7 +4411,7 @@ static void direct_link_particlesettings(FileData *fd, ParticleSettings *part)
 
        part->effector_weights = newdataadr(fd, part->effector_weights);
        if (!part->effector_weights)
-               part->effector_weights = BKE_add_effector_weights(part->eff_group);
+               part->effector_weights = BKE_effector_add_weights(part->eff_group);
 
        link_list(fd, &part->dupliweights);
 
@@ -5155,7 +5155,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
                                clmd->sim_parms->effector_weights = newdataadr(fd, clmd->sim_parms->effector_weights);
 
                                if (!clmd->sim_parms->effector_weights) {
-                                       clmd->sim_parms->effector_weights = BKE_add_effector_weights(NULL);
+                                       clmd->sim_parms->effector_weights = BKE_effector_add_weights(NULL);
                                }
                        }
 
@@ -5197,7 +5197,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
 
                                smd->domain->effector_weights = newdataadr(fd, smd->domain->effector_weights);
                                if (!smd->domain->effector_weights)
-                                       smd->domain->effector_weights = BKE_add_effector_weights(NULL);
+                                       smd->domain->effector_weights = BKE_effector_add_weights(NULL);
 
                                direct_link_pointcache_list(fd, &(smd->domain->ptcaches[0]), &(smd->domain->point_cache[0]), 1);
 
@@ -5264,7 +5264,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
                                                direct_link_pointcache_list(fd, &(surface->ptcaches), &(surface->pointcache), 1);
 
                                                if (!(surface->effector_weights = newdataadr(fd, surface->effector_weights)))
-                                                       surface->effector_weights = BKE_add_effector_weights(NULL);
+                                                       surface->effector_weights = BKE_effector_add_weights(NULL);
                                        }
                                }
                        }
@@ -5625,7 +5625,7 @@ static void direct_link_object(FileData *fd, Object *ob)
 
                sb->effector_weights = newdataadr(fd, sb->effector_weights);
                if (!sb->effector_weights)
-                       sb->effector_weights = BKE_add_effector_weights(NULL);
+                       sb->effector_weights = BKE_effector_add_weights(NULL);
 
                sb->shared = newdataadr(fd, sb->shared);
                if (sb->shared == NULL) {
@@ -6516,7 +6516,7 @@ static void direct_link_scene(FileData *fd, Scene *sce)
                /* set effector weights */
                rbw->effector_weights = newdataadr(fd, rbw->effector_weights);
                if (!rbw->effector_weights)
-                       rbw->effector_weights = BKE_add_effector_weights(NULL);
+                       rbw->effector_weights = BKE_effector_add_weights(NULL);
        }
 
        sce->preview = direct_link_preview_image(fd, sce->preview);
index 8abef6f6793a8587baf836a6f33a80eaeb9c29aa..09948d719f03ee64996056b64285f37c72229fc8 100644 (file)
@@ -587,7 +587,7 @@ static int effector_add_exec(bContext *C, wmOperator *op)
                        ob->empty_drawtype = OB_SINGLE_ARROW;
        }
 
-       ob->pd = object_add_collision_fields(type);
+       ob->pd = BKE_partdeflect_new(type);
 
        DEG_relations_tag_update(CTX_data_main(C));
 
index 2723198b27974b0759ac60bd6bdabefacefb5486..c5f55b138a6f1846e52a9058a51be9839fe074bd 100644 (file)
@@ -1197,7 +1197,7 @@ static int forcefield_toggle_exec(bContext *C, wmOperator *UNUSED(op))
        Object *ob = CTX_data_active_object(C);
 
        if (ob->pd == NULL)
-               ob->pd = object_add_collision_fields(PFIELD_FORCE);
+               ob->pd = BKE_partdeflect_new(PFIELD_FORCE);
        else if (ob->pd->forcefield == 0)
                ob->pd->forcefield = PFIELD_FORCE;
        else
index b0047d5db8edf4e27269f5def744bd18669eeaae..ec80ec98b21a99bd90dbefec26b61508ed8a2255 100644 (file)
@@ -172,7 +172,7 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc
                }
                else if (type == eModifierType_Collision) {
                        if (!ob->pd)
-                               ob->pd = object_add_collision_fields(0);
+                               ob->pd = BKE_partdeflect_new(0);
 
                        ob->pd->deflect = 1;
                }
index e2cce51fdcd770229abf4fa8ec548463039d4702..8506ff5bbd945c5fa1d664904be4baefc1f64ca6 100644 (file)
@@ -1161,7 +1161,7 @@ static PointerRNA rna_Object_field_get(PointerRNA *ptr)
 
        /* weak */
        if (!ob->pd)
-               ob->pd = object_add_collision_fields(0);
+               ob->pd = BKE_partdeflect_new(0);
 
        return rna_pointer_inherit_refine(ptr, &RNA_FieldSettings, ob->pd);
 }
@@ -1175,7 +1175,7 @@ static PointerRNA rna_Object_collision_get(PointerRNA *ptr)
 
        /* weak */
        if (!ob->pd)
-               ob->pd = object_add_collision_fields(0);
+               ob->pd = BKE_partdeflect_new(0);
 
        return rna_pointer_inherit_refine(ptr, &RNA_CollisionSettings, ob->pd);
 }
index 4e9b738bfbda2831ee0826646e36841fe9e7169a..e5bd55f041c3b1959ea33e71fd15c37a3f1c8997 100644 (file)
@@ -1200,7 +1200,7 @@ static PointerRNA rna_Particle_field1_get(PointerRNA *ptr)
 
        /* weak */
        if (!part->pd)
-               part->pd = object_add_collision_fields(0);
+               part->pd = BKE_partdeflect_new(0);
 
        return rna_pointer_inherit_refine(ptr, &RNA_FieldSettings, part->pd);
 }
@@ -1211,7 +1211,7 @@ static PointerRNA rna_Particle_field2_get(PointerRNA *ptr)
 
        /* weak */
        if (!part->pd2)
-               part->pd2 = object_add_collision_fields(0);
+               part->pd2 = BKE_partdeflect_new(0);
 
        return rna_pointer_inherit_refine(ptr, &RNA_FieldSettings, part->pd2);
 }