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:
authorAntony Riakiotakis <kalast@gmail.com>2014-05-16 02:23:05 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-05-16 02:23:25 +0400
commit57e1ec23088f2a4a16bdd27c301e2ffd8bee6cb1 (patch)
tree9e11b3a08c3ef34bd800d411110915d98faed9dc
parent8b0729a7314324e1aea6655de8bd16bb3e5ff5cc (diff)
Fix part of T39708, don't overupdate particles when changine active
particle texture slot
-rw-r--r--source/blender/makesrna/intern/rna_internal.h2
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c3
-rw-r--r--source/blender/makesrna/intern/rna_linestyle.c3
-rw-r--r--source/blender/makesrna/intern/rna_material.c8
-rw-r--r--source/blender/makesrna/intern/rna_particle.c2
-rw-r--r--source/blender/makesrna/intern/rna_world.c3
6 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index ecfb7f5e5f5..38f46c88e37 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -201,7 +201,7 @@ void rna_def_motionpath_common(struct StructRNA *srna);
void rna_def_texmat_common(struct StructRNA *srna, const char *texspace_editable);
void rna_def_mtex_common(struct BlenderRNA *brna, struct StructRNA *srna, const char *begin, const char *activeget,
const char *activeset, const char *activeeditable, const char *structname,
- const char *structname_slots, const char *update);
+ const char *structname_slots, const char *update, const char *update_index);
void rna_def_render_layer_common(struct StructRNA *srna, int scene);
void rna_def_actionbone_group_common(struct StructRNA *srna, int update_flag, const char *update_cb);
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 2455141972b..c4e4d5958e5 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -410,7 +410,8 @@ static void rna_def_lamp(BlenderRNA *brna)
/* textures */
rna_def_mtex_common(brna, srna, "rna_Lamp_mtex_begin", "rna_Lamp_active_texture_get",
- "rna_Lamp_active_texture_set", NULL, "LampTextureSlot", "LampTextureSlots", "rna_Lamp_draw_update");
+ "rna_Lamp_active_texture_set", NULL, "LampTextureSlot", "LampTextureSlots",
+ "rna_Lamp_draw_update", "rna_Lamp_draw_update");
}
static void rna_def_lamp_falloff(StructRNA *srna)
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c
index ec0efeddd3f..4e7d24469d5 100644
--- a/source/blender/makesrna/intern/rna_linestyle.c
+++ b/source/blender/makesrna/intern/rna_linestyle.c
@@ -1326,7 +1326,8 @@ static void rna_def_linestyle(BlenderRNA *brna)
RNA_def_struct_ui_icon(srna, ICON_LINE_DATA);
rna_def_mtex_common(brna, srna, "rna_LineStyle_mtex_begin", "rna_LineStyle_active_texture_get",
- "rna_LineStyle_active_texture_set", NULL, "LineStyleTextureSlot", "LineStyleTextureSlots", "rna_LineStyle_update");
+ "rna_LineStyle_active_texture_set", NULL, "LineStyleTextureSlot", "LineStyleTextureSlots",
+ "rna_LineStyle_update", "rna_LineStyle_update");
prop = RNA_def_property(srna, "panel", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "panel");
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 061f1595c8c..71b2926e75a 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -2042,7 +2042,7 @@ void RNA_def_material(BlenderRNA *brna)
rna_def_animdata_common(srna);
rna_def_mtex_common(brna, srna, "rna_Material_mtex_begin", "rna_Material_active_texture_get",
"rna_Material_active_texture_set", "rna_Material_active_texture_editable",
- "MaterialTextureSlot", "MaterialTextureSlots", "rna_Material_update");
+ "MaterialTextureSlot", "MaterialTextureSlots", "rna_Material_update", "rna_Material_update");
/* only material has this one */
prop = RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE);
@@ -2103,8 +2103,8 @@ static void rna_def_texture_slots(BlenderRNA *brna, PropertyRNA *cprop, const ch
}
void rna_def_mtex_common(BlenderRNA *brna, StructRNA *srna, const char *begin,
- const char *activeget, const char *activeset, const char *activeeditable,
- const char *structname, const char *structname_slots, const char *update)
+ const char *activeget, const char *activeset, const char *activeeditable,
+ const char *structname, const char *structname_slots, const char *update, const char *update_index)
{
PropertyRNA *prop;
@@ -2129,7 +2129,7 @@ void rna_def_mtex_common(BlenderRNA *brna, StructRNA *srna, const char *begin,
RNA_def_property_int_sdna(prop, NULL, "texact");
RNA_def_property_range(prop, 0, MAX_MTEX - 1);
RNA_def_property_ui_text(prop, "Active Texture Index", "Index of active texture slot");
- RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING_LINKS, update);
+ RNA_def_property_update(prop, NC_MATERIAL | ND_SHADING_LINKS, update_index);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index f6f133c5114..a1dde4caf98 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -2072,7 +2072,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
rna_def_mtex_common(brna, srna, "rna_ParticleSettings_mtex_begin", "rna_ParticleSettings_active_texture_get",
"rna_ParticleSettings_active_texture_set", NULL, "ParticleSettingsTextureSlot",
- "ParticleSettingsTextureSlots", "rna_Particle_reset");
+ "ParticleSettingsTextureSlots", "rna_Particle_reset", NULL);
/* fluid particle type can't be checked from the type value in rna as it's not shown in the menu */
prop = RNA_def_property(srna, "is_fluid", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index c7997bebedb..c92140348bc 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -450,7 +450,8 @@ void RNA_def_world(BlenderRNA *brna)
rna_def_animdata_common(srna);
rna_def_mtex_common(brna, srna, "rna_World_mtex_begin", "rna_World_active_texture_get",
- "rna_World_active_texture_set", NULL, "WorldTextureSlot", "WorldTextureSlots", "rna_World_update");
+ "rna_World_active_texture_set", NULL, "WorldTextureSlot", "WorldTextureSlots",
+ "rna_World_update", "rna_World_update");
/* colors */
prop = RNA_def_property(srna, "horizon_color", PROP_FLOAT, PROP_COLOR);