I've been looking at the object.ray_cast c++ code and would like to do some work on it.  Bolsee and Erwin were in charge, but I believe neither is currently working on game engine code and I can't get in touch with either of them by email.<br>
<br>If you run into any problems completing work at the python level<br>perhaps you could submit this as a feature request<br><a href="http://wiki.blender.org/index.php/Dev:Ref/Requests">http://wiki.blender.org/index.php/Dev:Ref/Requests</a><br>
with a little more fleshed out, maybe even some pictures as a full fledged requirements document that i can follow.  I'd be happy to work on it with you.<br><br>ray_cast can be fairly intensive, so make sure you're doing some performance testing with the print-debug on-screen to watch the physics.<br>
<br>also, would an option that allows you to ray-cast a tube (cylinder) of specified radius be useful to you?<br><br>kesten<br><br><br><div class="gmail_quote">On Sat, Nov 19, 2011 at 1:56 AM, Dima Glibitsky <span dir="ltr"><<a href="mailto:dima.glib@gmail.com">dima.glib@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I propose to add the following functionalities:<br>
<br>
* A variant of object.ray_cast that returns all intersections, not<br>
just the closest one.<br>
Examples where this can be beneficial:<br>
- determining whether a point is inside or outside a mesh<br>
- determining thickness/gaps in the given direction<br>
- filter intersection results (e.g. consider only frontfacing<br>
polygons, ignore polygons with transparent material, etc.)<br>
<br>
* A mechanism to temporarily freeze undo history.<br>
Currently there is no way for scripts to get up-to-date mesh data<br>
while it is in editmode. Scripts can toggle editmode, but that has a<br>
nasty consequence of modifying the undo history... The situation may<br>
change with the arrival of BMesh, but, even then, freezing history<br>
could still be useful for some other cases I don't know of.<br>
On the Python level, I suggest it to be implemented as a context manager:<br>
[CODE]<br>
with bpy.utils.freeze_undo_history():<br>
    # ... Do some sneaky operations. Don't forget to return everything<br>
to where it was!<br>
# At this point, undo history is the same it was before freeze_undo_history().<br>
[/CODE]<br>
<br>
* UILayout method to display "fake" ID datablock selectors.<br>
This would be useful for the situations when a script wants to present<br>
a custom dynamic list of selectable (and, possibly, renamable)<br>
elements:<br>
- choosing an object from the custom-filtered list (e.g. from objects<br>
which have custom property that satisfies some condition)<br>
- defining and working with custom libraries of domain-specific<br>
objects (operator presets, game object templates, bookmarked cursor<br>
positions, etc.)<br>
<br>
Example signature:<br>
UILayout.prop_collection_selector(data, property, name_property,<br>
search_data, search_property, search_icon='NONE', add_op=None,<br>
add_icon=None, remove_op=None, remove_icon=None, allow_rename=True)<br>
<br>
data -- object from which to take collection<br>
property -- identifier of the corresponding CollectionProperty member<br>
name_property -- identifier of item's StringProperty, which has the<br>
semantics of unique item's name<br>
search_data -- object that stores active (selected) collection element<br>
search_property -- identifier of the corresponding StringProperty<br>
member; has the semantics of active element's name<br>
search_icon -- icon for drop-down selector<br>
add_op -- operator for adding items to collection<br>
add_icon -- add_op icon<br>
remove_op -- operator for removing items from collection<br>
remove_icon -- add_op icon<br>
allow_rename -- if False, the name won't be editable (like in Enum selector)<br>
<br>
Also, any conflicting names should be automatically renamed, like<br>
everywhere else in Blender.<br>
<br>
Another solution is to introduce a special kind of Property for such<br>
cases (e.g. CustomIDBlockProperty).<br>
<br>
------------------------<br>
dairin0d<br>
_______________________________________________<br>
Bf-python mailing list<br>
<a href="mailto:Bf-python@blender.org">Bf-python@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-python" target="_blank">http://lists.blender.org/mailman/listinfo/bf-python</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><br>Kesten Broughton<br>President and Technology Director, <br>Solar Mobile Trailers<br><a href="http://www.sunfarmkitchens.ca" target="_blank">kesten@solarmobiletrailers.com<br>
www.sunfarmkitchens.ca</a><br>512 701 4209<br><div style="display:inline"></div><br>