Wings 3D Development Forum

Full Version: Shape Extruder?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is the Shape Extruder plugin still kicking around somewhere?
I wanted to experiment with it using the preview dialogs.
Yes ... it is still around.
Let me try clean up some very old code for you first. Otherwise ... you might just get ill dealing with it.
Okay, no rush.
I figured if I switch over one or two shapes to work with the dialog previews, you should be able to upgrade the rest.
I think that would be very nice feature, the preview dialog.

And a nice offer on your part ... so I won't dilly-dally too long.

Yeah ... actually ... if you add preview for one ... it should work for all. This is not templated code so much as a single path or execution. Ie .. there is really only one dialog-maker.
Here is a specially prepared release of ShapeExtruder.

It does depend on a few utility modules that are in ManifoldLab. All sources included.

http://s331378245.onlinehome.us/manifoldlab_pieces/

I would love to see this with the preview dialog !
(12-09-2012 03:39 PM)ggaliens Wrote: [ -> ]Here is a specially prepared release of ShapeExtruder.

It does depend on a few utility modules that are in ManifoldLab. All sources included.

http://s331378245.onlinehome.us/manifoldlab_pieces/

I would love to see this with the preview dialog !

After looking at your code, and how to make the changes, I decided to change the hooks a little to make it easier to transition existing ui to preview dialogs.

Just want to simplify things a bit and then I can help you make the changes.
Sure ... change hooks.
Change anything.

Sounds good to me.

Try to leave ndo_lite in there if you can ... still support parametric colors.
I like those. Eventually ... I'd like to get rid of that ndo_lite module since
I don't need it anymore because I understand Wings3D and the #we{ }
object better these days.
Sorry, I wasn't clear. I am changing the core code so it will be easier to call preview dialogs.

I do take your requests for simplifying how plugins access wings seriously, and while looking at the code, I decided to review the preview dialog integration before proceeding.
OK. Got it .... good luck. Hope refactor goes smooth since I know the preview is in heavy usage already (and I like that).
What is likely wrong with my attempt to follow the pattern Optigon ?

Code:
command({shape, {manifoldlab, {shape_extruder, { _ , Shape }}}}, _St) ->          
    Cmd = {shape, {manifoldlab, {shape_extruder_next, { ignored , Shape }}}},
    io:format("AA\n", []),
    erlang:display("Shape = "),
    erlang:display(Shape),

    Qs = makeDialog("Knot1"),
    io:format("BB\n", []),
    wings_ask:dialog_preview(Cmd, true, "Extruder !", Qs, _St);
    
    
command({shape, {manifoldlab, {shape_extruder_next, { _ , Shape }}}}, _St) ->          
    make_sel_extrusion(atom_to_list(Shape), _St, dialog, true);

Gets me a crash dump like this ...
Code:
Version: 1.5.0.2012-12-15---14-17.mlab
Window: geom
Reason: function_clause

Short stack trace:
[{wings_shapes,command,2},
{wings,command_1,2},
{wings_develop,time_command,2},
{wings,raw_command,4},
{wings_wm,handle_event,3},
{wings_wm,send_event,2},
{wings_wm,do_dispatch,2},
{wings_wm,get_and_dispatch,0}]

Long stack trace:
[{wings_shapes,command,
     [{{manifoldlab,{shape_extruder_next,{ignored,'Snake'}}},
       [{{x,text},"2*(cos(T)-2 * cos(2*T))"},
        {{z,text},"2*(sin(T)+2 * sin(2*T))"},
        {{y,text},"2*(sin(3*T))"},
        {{h,text},"0.4"},
        {{red,text},"(0.95*(1-(abs(cos(T*5))))+0.2*(abs(cos(T*5))))"},
        {{green,text},"(0.95*(1-(abs(cos(T*5))))+0.60*(abs(cos(T*5))))"},
        {{blue,text},"(0.2*(1-(abs(cos(T*5))))+0.2*(abs(cos(T*5))))"},
        {{ngon,integer},"8"},
        {{sect,text},"profiles/none.cfg"},
        {{min,float},"0.500000"},
        {{max,integer},"358"},
        {{head2tail,integer},"3"},
        {{step,integer},"2"},
        {revert,false}]},
      {st,{0,nil},
          face,true,[],
          {0,nil},
          none,

Forget about it Optigon. I see what I did wrong !

OK ... followed the pattern and I thing I have hit paydirt. Seems to work.

Thank you so much for preview dialog. I will be deleting so much crappy shape extruder code that
was in lieu of a proper preview dialog. LOL.

WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE !
Pages: 1 2
Reference URL's