[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45026] trunk/blender/source/blender/ editors: Fix for [#30445] Particle simulation, rekey crashes blender
Janne Karhu
jhkarh at gmail.com
Tue Mar 20 13:59:52 CET 2012
Revision: 45026
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45026
Author: jhk
Date: 2012-03-20 12:59:45 +0000 (Tue, 20 Mar 2012)
Log Message:
-----------
Fix for [#30445] Particle simulation, rekey crashes blender
- Entering particle mode crashed due to missing checks if a particle didn't have any baked keys.
- The rekey functionality is only supported for hair, so replaced the operator poll function with the correct one.
- Also replaced a couple of other "only hair" operator poll functions to the correct ones.
Modified Paths:
--------------
trunk/blender/source/blender/editors/physics/particle_edit.c
trunk/blender/source/blender/editors/space_view3d/drawobject.c
Modified: trunk/blender/source/blender/editors/physics/particle_edit.c
===================================================================
--- trunk/blender/source/blender/editors/physics/particle_edit.c 2012-03-20 11:51:04 UTC (rev 45025)
+++ trunk/blender/source/blender/editors/physics/particle_edit.c 2012-03-20 12:59:45 UTC (rev 45026)
@@ -1969,7 +1969,7 @@
/* api callbacks */
ot->exec= rekey_exec;
ot->invoke= WM_operator_props_popup;
- ot->poll= PE_poll;
+ ot->poll= PE_hair_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -2298,7 +2298,7 @@
/* api callbacks */
ot->exec= subdivide_exec;
- ot->poll= PE_poll;
+ ot->poll= PE_hair_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -2386,7 +2386,7 @@
/* api callbacks */
ot->exec= remove_doubles_exec;
- ot->poll= PE_poll;
+ ot->poll= PE_hair_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -2436,7 +2436,7 @@
/* api callbacks */
ot->exec= weight_set_exec;
- ot->poll= PE_poll;
+ ot->poll= PE_hair_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -2699,7 +2699,7 @@
/* api callbacks */
ot->exec= mirror_exec;
- ot->poll= PE_poll;
+ ot->poll= PE_hair_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c 2012-03-20 11:51:04 UTC (rev 45025)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c 2012-03-20 12:59:45 UTC (rev 45026)
@@ -4911,7 +4911,7 @@
cd=cdata;
pd=pdata;
for (i=0, point=edit->points; i<totpoint; i++, point++) {
- if (point->flag & PEP_HIDE)
+ if (point->flag & PEP_HIDE || point->totkey == 0)
continue;
if (point->keys->flag & PEK_USE_WCO)
@@ -4931,7 +4931,7 @@
}
else if (pset->selectmode == SCE_SELECT_END) {
for (i=0, point=edit->points; i<totpoint; i++, point++) {
- if ((point->flag & PEP_HIDE)==0) {
+ if ((point->flag & PEP_HIDE)==0 && point->totkey) {
key = point->keys + point->totkey - 1;
if (key->flag & PEK_SELECT)
glColor3fv(sel_col);
More information about the Bf-blender-cvs
mailing list