Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-02-17 11:00:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-17 11:00:54 +0300
commit319b9d6501f2170dcf06b10de0add340d0be83a3 (patch)
treed43beea169beef1fae3c2f253e4aab7fc116bad8 /source/blender/makesrna
parent19a703b0db1687aac2e887f32b225e897a3fac88 (diff)
DNA: rename dup_* struct members to instance_*
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_object.c10
-rw-r--r--source/blender/makesrna/intern/rna_particle.c13
-rw-r--r--source/blender/makesrna/intern/rna_scene.c4
3 files changed, 13 insertions, 14 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 9a4d1a00940..c2c05984f2c 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -553,9 +553,9 @@ static void rna_Object_dup_collection_set(PointerRNA *ptr, PointerRNA value)
*/
if (BKE_collection_has_object_recursive(grp, ob) == 0) {
if (ob->type == OB_EMPTY) {
- id_us_min(&ob->dup_group->id);
- ob->dup_group = grp;
- id_us_plus(&ob->dup_group->id);
+ id_us_min(&ob->instance_collection->id);
+ ob->instance_collection = grp;
+ id_us_plus(&ob->instance_collection->id);
}
else {
BKE_report(NULL, RPT_ERROR,
@@ -2620,14 +2620,14 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update");
prop = RNA_def_property(srna, "instance_faces_scale", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "dupfacesca");
+ RNA_def_property_float_sdna(prop, NULL, "instance_faces_scale");
RNA_def_property_range(prop, 0.001f, 10000.0f);
RNA_def_property_ui_text(prop, "Instance Faces Scale", "Scale the face instance objects");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_internal_update");
prop = RNA_def_property(srna, "instance_collection", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Collection");
- RNA_def_property_pointer_sdna(prop, NULL, "dup_group");
+ RNA_def_property_pointer_sdna(prop, NULL, "instance_collection");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_dup_collection_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Instance Collection", "Instance an existing collection");
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 7ceee878b06..6f7367dd8c7 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -1082,7 +1082,7 @@ static bool rna_ParticleSystem_edited_get(PointerRNA *ptr)
static PointerRNA rna_ParticleDupliWeight_active_get(PointerRNA *ptr)
{
ParticleSettings *part = (ParticleSettings *)ptr->id.data;
- ParticleDupliWeight *dw = part->dupliweights.first;
+ ParticleDupliWeight *dw = part->instance_weights.first;
for (; dw; dw = dw->next) {
if (dw->flag & PART_DUPLIW_CURRENT)
@@ -1095,13 +1095,13 @@ static void rna_ParticleDupliWeight_active_index_range(PointerRNA *ptr, int *min
{
ParticleSettings *part = (ParticleSettings *)ptr->id.data;
*min = 0;
- *max = max_ii(0, BLI_listbase_count(&part->dupliweights) - 1);
+ *max = max_ii(0, BLI_listbase_count(&part->instance_weights) - 1);
}
static int rna_ParticleDupliWeight_active_index_get(PointerRNA *ptr)
{
ParticleSettings *part = (ParticleSettings *)ptr->id.data;
- ParticleDupliWeight *dw = part->dupliweights.first;
+ ParticleDupliWeight *dw = part->instance_weights.first;
int i = 0;
for (; dw; dw = dw->next, i++)
@@ -1114,7 +1114,7 @@ static int rna_ParticleDupliWeight_active_index_get(PointerRNA *ptr)
static void rna_ParticleDupliWeight_active_index_set(struct PointerRNA *ptr, int value)
{
ParticleSettings *part = (ParticleSettings *)ptr->id.data;
- ParticleDupliWeight *dw = part->dupliweights.first;
+ ParticleDupliWeight *dw = part->instance_weights.first;
int i = 0;
for (; dw; dw = dw->next, i++) {
@@ -3094,14 +3094,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* draw objects & collections */
prop = RNA_def_property(srna, "instance_collection", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "dup_group");
+ RNA_def_property_pointer_sdna(prop, NULL, "instance_collection");
RNA_def_property_struct_type(prop, "Collection");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dupli Collection", "Show Objects in this collection in place of particles");
RNA_def_property_update(prop, 0, "rna_Particle_redo_count");
prop = RNA_def_property(srna, "instance_weights", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_sdna(prop, NULL, "dupliweights", NULL);
+ RNA_def_property_collection_sdna(prop, NULL, "instance_weights", NULL);
RNA_def_property_struct_type(prop, "ParticleDupliWeight");
RNA_def_property_ui_text(prop, "Dupli Collection Weights", "Weights for all of the objects in the dupli collection");
@@ -3117,7 +3117,6 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Active Dupli Object Index", "");
prop = RNA_def_property(srna, "instance_object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "dup_ob");
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Instance Object", "Show this Object in place of particles");
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 83fb7154998..4b7a0b8b685 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1530,10 +1530,10 @@ static void object_simplify_update(Object *ob)
for (psys = ob->particlesystem.first; psys; psys = psys->next)
psys->recalc |= ID_RECALC_PSYS_CHILD;
- if (ob->dup_group) {
+ if (ob->instance_collection) {
CollectionObject *cob;
- for (cob = ob->dup_group->gobject.first; cob; cob = cob->next)
+ for (cob = ob->instance_collection->gobject.first; cob; cob = cob->next)
object_simplify_update(cob->ob);
}
}