I’ve been looking over the Python API for Blender, and I see how you can manipulate all of Blender’s existing object types, which is pretty good.
I have an idea that I’m studying the feasibility of, and it would require using new object models that are stored outside of Blender. In this concept, my program (plugin/script/etc) would provide the objects, control their state, etc. But ideally, I’d be able to capture messages to the objects (e.g. “I’m being re-sized”). Going into “edit” mode would have special behavior too, probably, since I’d want that to bring up my object properties in a script window.
The 3D visualization of the object could be done with existing Blender functionality – I could just return a NMesh representing the object, or some such thing, but the model would internally “know” that it wasn’t just a mesh, and attempting to edit it as a mesh should fail (or maybe, bring up my script window instead).
I think I would need something like this capability in order to implement CAD features in Blender, which is what I’m contemplating. The idea is to use Blender as “View” and “Controller” in a “Model-View-Controller” application model, and have something like a STEP object schema in an external data store as the model.
Naturally, there’d be some kind of import/export capability so you don’t really get stuck, but I’m not trying to write an import/export script. The ideas is that CAD objects stay CAD objects, but have a Blender viewable visualization and capture Blender actions that would affect the object, so my script can “do the right thing” to the original STEP model. That would allow you to edit the STEP model using Blender, rather than merely being able to import it to blend format (which would lose data, since STEP has a lot of concepts beyond just 3D modelling that don’t make sense to Blender (yet)).
So, am I just out of my mind, or does this have a chance of working?
I suspect the Python scripting API won’t be quite strong enough for this —but maybe it can be implemented at the C level as a handle of somekind, and the Python API could then be extended to make use of it?
I think this would be worth a fair amount of effort, since there’s really no decent free 3D CAD solution in existence, and it’s a monumental task to do from scratch. Using Blender would take advantage of an already thought-out and well-designed interface (not to mention, one that many people already know how to use). But as I say, I’m still trying to figure out just how much effort it would take.