[Bf-blender-cvs] [843efe4] particles_refactor: A couple of small fixes for merge issues.
Lukas Tönne
noreply at git.blender.org
Tue Apr 22 12:07:08 CEST 2014
Commit: 843efe48ab53c54a2409d42e3bde78300cd1fe33
Author: Lukas Tönne
Date: Thu Jan 23 11:22:53 2014 +0100
https://developer.blender.org/rB843efe48ab53c54a2409d42e3bde78300cd1fe33
A couple of small fixes for merge issues.
===================================================================
M source/blender/blenkernel/intern/object_dupli.c
M source/blender/makesrna/intern/rna_nparticle.c
===================================================================
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index 8826cbd..30bbf5e 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -93,7 +93,7 @@ typedef struct DupliContext {
} DupliContext;
typedef struct DupliGenerator {
- short type; /* dupli type */
+ int type; /* dupli type */
void (*make_duplis)(const DupliContext *ctx);
} DupliGenerator;
@@ -1151,12 +1151,9 @@ static void make_duplis_nparticle_system(const DupliContext *ctx, NParticleSyste
int totdupli, i;
float loc[3], rot[4], scale[3], obmat[4][4];
- /* simple preventing of too deep nested groups */
- if (level > MAX_DUPLI_RECUR) return;
-
/* for faster index-based lookup make a temp array */
totdupli = BLI_countlist(&display->dupli_objects);
- dupli = MEM_mallocN(totdupli * sizeof(NParticleDisplayDupliObject), "dupli objects");
+ dupli = MEM_mallocN((unsigned int)totdupli * sizeof(NParticleDisplayDupliObject), "dupli objects");
for (dob = display->dupli_objects.first, i = 0; dob; dob = dob->next, ++i)
memcpy(&dupli[i], dob, sizeof(NParticleDisplayDupliObject));
@@ -1171,7 +1168,7 @@ static void make_duplis_nparticle_system(const DupliContext *ctx, NParticleSyste
BKE_nparticle_iter_get_quaternion(&iter, "rotation", rot);
loc_quat_size_to_mat4(obmat, loc, rot, scale);
- make_dupli(ctx, dupli[i].object, obmat, BKE_nparticle_iter_get_id(&iter), false, false);
+ make_dupli(ctx, dupli[i].object, obmat, (int)BKE_nparticle_iter_get_id(&iter), false, false);
}
MEM_freeN(dupli);
diff --git a/source/blender/makesrna/intern/rna_nparticle.c b/source/blender/makesrna/intern/rna_nparticle.c
index 64ad5f4..18ade0f 100644
--- a/source/blender/makesrna/intern/rna_nparticle.c
+++ b/source/blender/makesrna/intern/rna_nparticle.c
@@ -692,7 +692,7 @@ static void rna_def_nparticle_system_attributes_api(BlenderRNA *brna, PropertyRN
func = RNA_def_function(srna, "new", "rna_NParticleSystem_attributes_new");
RNA_def_function_ui_description(func, "Add a particle attribute");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm = RNA_def_string(func, "name", "", 64, "Name", "");
+ parm = RNA_def_string(func, "name", NULL, 64, "Name", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm = RNA_def_enum(func, "datatype", nparticle_attribute_datatype_user, PAR_ATTR_DATATYPE_FLOAT, "Data Type", "Base data type");
RNA_def_property_flag(parm, PROP_REQUIRED);
More information about the Bf-blender-cvs
mailing list