Closed zeffii closed 9 years ago
It works great! This is exactly what I needed. I predict Autodesk will die in the next ten years (they're doing away with perpetual licensing) and Blender is a good investment for time. This sort of curve tool should be in the core package.
This is fabulous work and may even be the most useful plugin i've found so far. I'm keeping my eye on your development of this and letting people know.
I should also add I found a Blender Plugin called VisMaya that has a "freeze transforms" option. When I originally used your pipe-builder tool on my forklift robot, the curves spawned out of place in world space. But once I froze the transforms on the object, the curves spawned exactly where they should be. :)
I will make it so you don't have to freeze transforms, just hadn't gotten around to it.. (really just one line of code... actually less code than this response is in character-length... )
hmm. it may be more like 3 lines of code, to include the Curve width guesstimation relative to the object's world _matrix.
glad you find it useful. I'll be using it for future stuff too so am invested in getting it to work efficiently.
That bike is awesome. This sort of tool should definitely be in any modeler's arsenal. It's a must for hard-surface. Do you have a gallery?
http://blenderpython.tumblr.com/ is where I stick the shareable stuff, no real gallery though, but pages and pages of unrelated code / graphics.
The only code I know is C# (game programming in Unity). Python is looking pretty essential at this point. Creating tools for modeling like this would be a handy skill to have. I look forward to the completion of this one :)
Python is indeed worth investing time on, I find bpy
quite tolerable to work with.
i've pushed a minimal fix, this copies the matrix_world of the object you are working on, to the new curve.. so it should always match up. I think it's a sane solution.. update and let me know how it goes.
I think next i'll add an operator to place a circle with the correct orientation to align with a selected face, the circle shall be editable as the normal circle operator.
I tested it on a few of my models and some different objects exported from maya, using faces of different sizes. It works fantastic. The curve instantiates exactly where it should be every single time.
This is my new favorite tool. I'm going to be using this a lot. Thanks. :+1:
cool! BTW, I use space-bar instead of W, and then type tu
and use the cursors to navigate to the Tube Tool operator. The next time you use space-bar, it will suggest the most recently triggered operator. I find this slightly more convenient.
Thanks for the tip! There's something about the parameters that come with the curve. The 'num profile verts' adjustment seems to duplicate the curve dozens of times, and I can only scale it up, not down. It doesn't subidivide the curve (I assume it is supposed to work this way?). Instead it adds tons of curves to my outliner. The handle_ext_1 and 2 adjustments don't seem to do anything. Still, I can just adjust the curve in edit mode. I'm very happy with the tool. It has as much control as Maya's counterpart and may even be better (since I don't have to hunt the curve down in the outliner to adjust it and adjust the resolution separately in the attribute history).
F6 is the shortcut to show the operator properties after triggering the operator ( you probably know, so I say this for the benefit of anyone reading)
The UI for the curve is not implemented yet (hence it is absolutely fucked). maybe today, i've been a little swamped.
design document:
Operator UI shall have (ideally):
If the above properties work, i'd call that prototype 2, then the addon has most of the difficult (not hard, just slightly headwrecking) code in place for future improvements.
That sounds very awesome! It's perfect. length and profile subdivisions. The extension ratio sounds like a very nice feature. I wouldn't be surprised if this addon makes it into the core package.
Aside from its width being set by the the selected polys, a width adjustment (the bevel depth setting in the curve tab) would be the cherry on top ;D I found I was using that setting often despite the preset width of the pipes.
Another tool you would love if you don't have it yet is QuickPipes. It draws the pipe along selected edges. In combination with this fun toy, i'm pretty sure I can model just about anything now :) Curves for pipes was such a hassle in the core package.
On Thu, Apr 9, 2015 at 11:48 PM, Dealga McArdle notifications@github.com wrote:
design document:
Operator UI shall have (ideally):
- subdivisions over length of curve
- subdivisions over profile (or choice to select profile)
- extention ratio for the handles aligned with the face normals of the selected polygons
If the above properties work, i'd call that prototype 2, then the addon has most of the difficult (not hard, just slightly headwrecking) code in place for future improvements.
— Reply to this email directly or view it on GitHub https://github.com/zeffii/TubeTool/issues/1#issuecomment-91437519.
A few python addons should be part of the core but aren't, the closest most will get is to be accepted into addons_contrib, which ships with the buildbot blender builds. I don't think most people care if an add-on ships with a release or not, people build a collection of addons and simply point new Blender releases at their custom scripts folder.
QuickPipes, yes i've seen it but not needed it
regarding TubeTool: currently the profile radius for both ends is a function of the distance between the median of a polygon and the first vertex of the polygon, it might be more helpful if it is instead the average distance between the median and each vertex of the face.
I agree on the following parameters
But first focus on https://github.com/zeffii/TubeTool/issues/1#issuecomment-91437519 , getting it to that state is the least trivial, anything after than will be (most likely) easier.
Sounds right to me. Scale factor for first and last bezier, I hadn't thought of that. For certain shapes/models it would be extremely useful. Typically in hard surface its all wires and pipes, but the ability to do that would be great for some designs.
some progress ... not updated the master source yet
( you can try the branch "modify_insitu" if you know how, else I will merge to master tomorrow... )
just got ahold of your latest upload. you're really truckin' along :+1:
yeah, just merged a few minutes ago. I don't know how the tool works in maya, and definitely don't want to clone tools just for the sake of it, so i'll discuss the options here. It's a
code economy vs UI slickness
The one thing that currently bugs me a little is that a user won't be able to know (easily) before dragging handle_ext_1 / 2 which endpoint that handle refers to. For me this isn't a big deal, but it would be nicer UX to know which is which before touching the slider. There's a feature in the API that can return the order in which faces have been selected, i'll probably use that to assign the handles.
Some options are to
For now the development won't include any of those. prototype 3 shall include the details mentioned earlier, so at least it functions and is useful.
I don't think it's too big a deal. I played with the handle options for 1 and 2 and all it took was a ctrl+z tap in between toying with the floats. I didn't even consciously notice. But I suppose if you're a perfectionist you'll want your tool to be perfect... lolol.
The tool in Maya comes with floats to control subdivisions. The length and angle of the pipe determines the number of subdivisions in the curve which can be manipluated in component mode. Maya curves don't come with tangent handles though, just vertex points that are adjusted with the move tool.
So far you are 1-up on the maya tool in terms of control, and almost as fast. For basic set-up what you have now is just fine. Odds are the user will want to subdivide the curve and tweak the tangents anyway.
"almost as fast", I take that back. Maya's pipe curve is pretty fast, but your tool is equal I think. In maya you can't select the curve except in the outliner, and you have to set the adjustments before you make the curve, or go into the history (which is a serious pain in the ass sometimes) and find the tab that has the curve options. It's either that or go into a mountain of tabs in the surfaces menu and locate the option to subdivide the curve.
Maya hotkeys are nearly nonexistent. rofl. It's all tabs and icons. On that note, what makes Maya fast is the advanced user who knows where everything is and has assigned his own hotkeys and icons (and a mountain of plugins). In truth, modeling in Maya is blazing fast (contrary to popular belief). I'm happy to be able to get good speed in Blender :)
The operator should run in Modal mode until a different selection is made or some other operator is triggered.
While the operator is running Modal all properties of the Curve are pretty much adjustable, but only this limited set has been exposed through my current code. I'd like to keep the modal UI limited, as you say : it's easy (and maybe desirable) to enter edit_mode of the Curve and adjust the parameters from the panel. So I'll focus mostly on exposing features which are not standard to the Curve panel.
I think it's irregular in Blender to be able to edit a new Object while an existing Object is still in _editmode, but whatever. Convenience > Convention (imho)
further discussion happens here: https://github.com/zeffii/TubeTool/issues/4
This tool is a direct result of this post on Blender.StackExchange http://blender.stackexchange.com/questions/28190/a-problem-with-blenders-bridge-edge-loops-system
I'm a modeller and I also like tubes and stuff, and can imagine some conveniences regarding the creation of Curve objects .
does:
does not yet: