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>2009-10-15 22:27:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-10-15 22:27:41 +0400
commit66725a189e277744f134e4c098c6dbecd979689f (patch)
tree3e2453a76558307a4ffeb21e280beaa2277eb81a /source/blender/editors/space_buttons
parentd464e2454eb4816f58786fd4bbd419c759e764dc (diff)
disallow editing particle settings when first entering particle editmode, would crash instantly when changing the amount for eg.
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 8072853bcb8..eb88ea8519e 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -554,7 +554,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
static const char *dir[] = {
"world", "object", "mesh", "armature", "lattice", "curve",
"meta_ball", "lamp", "camera", "material", "material_slot",
- "texture", "texture_slot", "bone", "edit_bone", "particle_system",
+ "texture", "texture_slot", "bone", "edit_bone", "particle_system", "particle_system_editable",
"cloth", "soft_body", "fluid", "smoke", "collision", "brush", NULL};
CTX_data_dir_set(result, dir);
@@ -658,6 +658,13 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
set_pointer_type(path, result, &RNA_ParticleSystem);
return 1;
}
+ else if(CTX_data_equals(member, "particle_system_editable")) {
+ if(PE_poll(C))
+ set_pointer_type(path, result, &RNA_ParticleSystem);
+ else
+ CTX_data_pointer_set(result, NULL, &RNA_ParticleSystem, NULL);
+ return 1;
+ }
else if(CTX_data_equals(member, "cloth")) {
PointerRNA *ptr= get_pointer_type(path, &RNA_Object);