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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c124
1 files changed, 124 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 5fc91622eba..1130b822f75 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -187,6 +187,7 @@ const EnumPropertyItem rna_enum_object_modifier_type_items[] = {
ICON_AUTOMERGE_OFF,
"Weld",
"Find groups of vertices closer then dist and merges them together"},
+ {eModifierType_FunctionPoints, "FUNCTION_POINTS", ICON_NONE, "Function Points", ""},
{eModifierType_Wireframe,
"WIREFRAME",
ICON_MOD_WIREFRAME,
@@ -266,6 +267,7 @@ const EnumPropertyItem rna_enum_object_modifier_type_items[] = {
ICON_MOD_WAVE,
"Wave",
"Adds a ripple-like motion to an object’s geometry"},
+ {eModifierType_FunctionDeform, "FUNCTION_DEFORM", ICON_NONE, "Function Deform", ""},
{0, "", 0, N_("Simulate"), ""},
{eModifierType_Cloth, "CLOTH", ICON_MOD_CLOTH, "Cloth", ""},
{eModifierType_Collision, "COLLISION", ICON_MOD_PHYSICS, "Collision", ""},
@@ -289,6 +291,8 @@ const EnumPropertyItem rna_enum_object_modifier_type_items[] = {
"Spawn particles from the shape"},
{eModifierType_Softbody, "SOFT_BODY", ICON_MOD_SOFT, "Soft Body", ""},
{eModifierType_Surface, "SURFACE", ICON_MODIFIER, "Surface", ""},
+ {eModifierType_BParticles, "BPARTICLES", ICON_NONE, "BParticles", ""},
+ {eModifierType_BParticlesOutput, "BPARTICLES_OUTPUT", ICON_NONE, "BParticles Output", ""},
{0, NULL, 0, NULL, NULL},
};
@@ -716,6 +720,14 @@ static StructRNA *rna_Modifier_refine(struct PointerRNA *ptr)
return &RNA_SurfaceDeformModifier;
case eModifierType_WeightedNormal:
return &RNA_WeightedNormalModifier;
+ case eModifierType_FunctionDeform:
+ return &RNA_FunctionDeformModifier;
+ case eModifierType_FunctionPoints:
+ return &RNA_FunctionPointsModifier;
+ case eModifierType_BParticles:
+ return &RNA_BParticlesModifier;
+ case eModifierType_BParticlesOutput:
+ return &RNA_BParticlesOutputModifier;
/* Default */
case eModifierType_Fluidsim: /* deprecated */
case eModifierType_None:
@@ -6530,6 +6542,114 @@ static void rna_def_modifier_weightednormal(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
+static void rna_def_modifier_function_deform(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "FunctionDeformModifier", "Modifier");
+ RNA_def_struct_ui_text(srna, "Function Deform Modifier", "");
+ RNA_def_struct_sdna(srna, "FunctionDeformModifierData");
+ RNA_def_struct_ui_icon(srna, ICON_NONE);
+
+ prop = RNA_def_float(srna, "control1", 0.0, -FLT_MAX, FLT_MAX, "Control 1", "", -10, 10);
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_int(srna, "control2", 0, INT_MIN, INT_MAX, "Control 2", "", -10, 10);
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_property(srna, "function_tree", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Function Tree", "Function node tree");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+}
+
+static void rna_def_modifier_function_points(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "FunctionPointsModifier", "Modifier");
+ RNA_def_struct_ui_text(srna, "Function Points Modifier", "");
+ RNA_def_struct_sdna(srna, "FunctionPointsModifierData");
+ RNA_def_struct_ui_icon(srna, ICON_NONE);
+
+ prop = RNA_def_float(srna, "control1", 0.0, -FLT_MAX, FLT_MAX, "Control 1", "", -10, 10);
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_int(srna, "control2", 0, INT_MIN, INT_MAX, "Control 2", "", -10, 10);
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_property(srna, "function_tree", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Function Tree", "Function node tree");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+}
+
+const static EnumPropertyItem bparticles_output_type_items[] = {
+ {MOD_BPARTICLES_OUTPUT_POINTS,
+ "POINTS",
+ 0,
+ "Points",
+ "Create a mesh containing only vertices"},
+ {MOD_BPARTICLES_OUTPUT_TETRAHEDONS,
+ "TETRAHEDONS",
+ 0,
+ "Tetrahedons",
+ "Create a mesh that has a tetrahedon at every vertex position"},
+ {MOD_BPARTICLES_OUTPUT_NONE, "NONE", 0, "None", "Create no output mesh"},
+ {0, NULL, 0, NULL, NULL},
+};
+
+static void rna_def_modifier_bparticles(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "BParticlesModifier", "Modifier");
+ RNA_def_struct_ui_text(srna, "BParticles Modifier", "");
+ RNA_def_struct_sdna(srna, "BParticlesModifierData");
+ RNA_def_struct_ui_icon(srna, ICON_NONE);
+
+ prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "BParticles Tree", "BParticles node tree");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+
+ prop = RNA_def_property(srna, "output_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, bparticles_output_type_items);
+ RNA_def_property_ui_text(
+ prop, "Output Type", "Method for creating the output mesh from the particle data");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+}
+
+static void rna_def_modifier_bparticles_output(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "BParticlesOutputModifier", "Modifier");
+ RNA_def_struct_ui_text(srna, "BParticles Output Modifier", "");
+ RNA_def_struct_sdna(srna, "BParticlesOutputModifierData");
+ RNA_def_struct_ui_icon(srna, ICON_NONE);
+
+ prop = RNA_def_property(srna, "source_object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Source Object", "Object to copy a particle system from");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+
+ prop = RNA_def_property(srna, "source_particle_system", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(
+ prop, "Particle System", "Name of the particle system that should be copied");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop = RNA_def_property(srna, "output_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, bparticles_output_type_items);
+ RNA_def_property_ui_text(
+ prop, "Output Type", "Method for creating the output mesh from the particle data");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+}
+
void RNA_def_modifier(BlenderRNA *brna)
{
StructRNA *srna;
@@ -6655,6 +6775,10 @@ void RNA_def_modifier(BlenderRNA *brna)
rna_def_modifier_meshseqcache(brna);
rna_def_modifier_surfacedeform(brna);
rna_def_modifier_weightednormal(brna);
+ rna_def_modifier_function_deform(brna);
+ rna_def_modifier_function_points(brna);
+ rna_def_modifier_bparticles(brna);
+ rna_def_modifier_bparticles_output(brna);
}
#endif