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/editors/space_buttons/buttons_texture.c')
-rw-r--r--source/blender/editors/space_buttons/buttons_texture.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c
index 58c538c4ee5..d72b7dbd8dc 100644
--- a/source/blender/editors/space_buttons/buttons_texture.c
+++ b/source/blender/editors/space_buttons/buttons_texture.c
@@ -46,7 +46,6 @@
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_object_force.h"
-#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
@@ -59,7 +58,6 @@
#include "BKE_modifier.h"
#include "BKE_node.h"
#include "BKE_paint.h"
-#include "BKE_particle.h"
#include "BKE_scene.h"
#ifdef WITH_FREESTYLE
# include "BKE_freestyle.h"
@@ -98,12 +96,6 @@ bool ED_texture_context_check_lamp(const bContext *C)
return (ob && (ob->type == OB_LAMP));
}
-bool ED_texture_context_check_particles(const bContext *C)
-{
- Object *ob = CTX_data_active_object(C);
- return (ob && ob->particlesystem.first);
-}
-
bool ED_texture_context_check_linestyle(const bContext *C)
{
#ifdef WITH_FREESTYLE
@@ -178,7 +170,6 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts)
bool valid_world = ED_texture_context_check_world(C);
bool valid_material = ED_texture_context_check_material(C);
bool valid_lamp = ED_texture_context_check_lamp(C);
- bool valid_particles = ED_texture_context_check_particles(C);
bool valid_linestyle = ED_texture_context_check_linestyle(C);
bool valid_others = ED_texture_context_check_others(C);
@@ -192,9 +183,6 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts)
else if ((sbuts->mainb == BCONTEXT_DATA) && valid_lamp) {
sbuts->texture_context = sbuts->texture_context_prev = SB_TEXC_LAMP;
}
- else if ((sbuts->mainb == BCONTEXT_PARTICLE) && valid_particles) {
- sbuts->texture_context = sbuts->texture_context_prev = SB_TEXC_PARTICLES;
- }
else if ((sbuts->mainb == BCONTEXT_RENDER_LAYER) && valid_linestyle) {
sbuts->texture_context = sbuts->texture_context_prev = SB_TEXC_LINESTYLE;
}
@@ -206,7 +194,6 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts)
(((sbuts->texture_context_prev == SB_TEXC_WORLD) && valid_world) ||
((sbuts->texture_context_prev == SB_TEXC_MATERIAL) && valid_material) ||
((sbuts->texture_context_prev == SB_TEXC_LAMP) && valid_lamp) ||
- ((sbuts->texture_context_prev == SB_TEXC_PARTICLES) && valid_particles) ||
((sbuts->texture_context_prev == SB_TEXC_LINESTYLE) && valid_linestyle) ||
((sbuts->texture_context_prev == SB_TEXC_OTHER) && valid_others)))
{
@@ -216,7 +203,6 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts)
else if (((sbuts->texture_context == SB_TEXC_WORLD) && !valid_world) ||
((sbuts->texture_context == SB_TEXC_MATERIAL) && !valid_material) ||
((sbuts->texture_context == SB_TEXC_LAMP) && !valid_lamp) ||
- ((sbuts->texture_context == SB_TEXC_PARTICLES) && !valid_particles) ||
((sbuts->texture_context == SB_TEXC_LINESTYLE) && !valid_linestyle) ||
((sbuts->texture_context == SB_TEXC_OTHER) && !valid_others))
{
@@ -228,9 +214,6 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts)
else if (valid_lamp) {
sbuts->texture_context = SB_TEXC_LAMP;
}
- else if (valid_particles) {
- sbuts->texture_context = SB_TEXC_PARTICLES;
- }
else if (valid_linestyle) {
sbuts->texture_context = SB_TEXC_LINESTYLE;
}
@@ -375,31 +358,9 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
buttons_texture_users_find_nodetree(users, &linestyle->id, linestyle->nodetree, N_("Line Style"));
if (ob) {
- ParticleSystem *psys = psys_get_current(ob);
- MTex *mtex;
- int a;
-
/* modifiers */
modifiers_foreachTexLink(ob, buttons_texture_modifier_foreach, users);
- /* particle systems */
- if (psys && !limited_mode) {
- for (a = 0; a < MAX_MTEX; a++) {
- mtex = psys->part->mtex[a];
-
- if (mtex) {
- PointerRNA ptr;
- PropertyRNA *prop;
-
- RNA_pointer_create(&psys->part->id, &RNA_ParticleSettingsTextureSlot, mtex, &ptr);
- prop = RNA_struct_find_property(&ptr, "texture");
-
- buttons_texture_user_property_add(users, &psys->part->id, ptr, prop, N_("Particles"),
- RNA_struct_ui_icon(&RNA_ParticleSettings), psys->name);
- }
- }
- }
-
/* field */
if (ob->pd && ob->pd->forcefield == PFIELD_TEXTURE) {
PointerRNA ptr;
@@ -529,17 +490,6 @@ static void template_texture_select(bContext *C, void *user_p, void *UNUSED(arg)
ct->texture = tex;
- if (user->ptr.type == &RNA_ParticleSettingsTextureSlot) {
- /* stupid exception for particle systems which still uses influence
- * from the old texture system, set the active texture slots as well */
- ParticleSettings *part = user->ptr.id.data;
- int a;
-
- for (a = 0; a < MAX_MTEX; a++)
- if (user->ptr.data == part->mtex[a])
- part->texact = a;
- }
-
if (sbuts && tex)
sbuts->preview = 1;
}