[Bf-blender-cvs] [f5b79df] master: Fix T39490: BGE: Text to Mesh, then MouseOver does not work
Mitchell Stokes
noreply at git.blender.org
Sun Mar 30 22:58:35 CEST 2014
Commit: f5b79dff412f61a2aa453a6ce50804e3425463a1
Author: Mitchell Stokes
Date: Sun Mar 30 13:55:10 2014 -0700
https://developer.blender.org/rBf5b79dff412f61a2aa453a6ce50804e3425463a1
Fix T39490: BGE: Text to Mesh, then MouseOver does not work
Non-mesh objects default to no collisions. lordloki provided a
patch that sets the collision properties for a mesh converted from
a curve/meta/surf/text to the default collision properties for
a mesh.
===================================================================
M source/blender/editors/object/object_add.c
===================================================================
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index b29fafe..182a9f7 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1478,8 +1478,13 @@ static void curvetomesh(Main *bmain, Scene *scene, Object *ob)
convert_ensure_curve_cache(bmain, scene, ob);
BKE_mesh_from_nurbs(ob); /* also does users */
- if (ob->type == OB_MESH)
+ if (ob->type == OB_MESH) {
BKE_object_free_modifiers(ob);
+
+ /* Game engine defaults for mesh objects */
+ ob->body_type = OB_BODY_TYPE_STATIC;
+ ob->gameflag = OB_PROP | OB_COLLISION;
+ }
}
static int convert_poll(bContext *C)
More information about the Bf-blender-cvs
mailing list