Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 
Share Thread:
Reddit Facebook Twitter
Preview Dialog Observations.
01-21-2013, 10:05 PM
Post: #2
RE: Preview Dialog Observations.
I'm going to make comments based in my experience with heightmap previews...

(01-18-2013 11:43 PM)ggaliens Wrote:  It probably should default to manual.
I think that would be better if we could have this as optional. For the basics primitives it is better have it Auto, but for complex meshes/operations it would be good start it in Manual mode.

It could be something like call the dialog/ask function with the current {preview,Dlg} (for default mode = auto) or {preview,Dlg,<start_mode>}.

ggaliens Wrote:if I "OK" after being in auto for a few iterations because I like what I last saw ... it should not do the last calculation AGAIN, I don't think.
I agree with you.
I don't know how complicated it could become the code for that, but for both current situation (fun({dialog_preview,Res}) and fun(Res)) it would be very useful get the #st back (as a parameter) as well get the information about if the mode be manual or auto (delaied would be considered auto in this case) - so, we would be able to decide when rebuild/recalculate something after the user hit OK.

Currently we already can get that #st{} by rewriting the wings_wm:get_current_state() in our module, but I don't think this can be acceptable.

The wings_wm:get_current_state() code was not designed to be used with dialogs window - for that, it would ask for display_lists property from the dialog owner window.
We know that geom window always is using that #st{} data, so the rewritten code just query it about display_list.
This function would be added to wings_ask in order to be used for return the #st{} used for preview.

I'm using this way in the heightmap plugin :
Code:
get_current_state() ->
    DispLists = wings_wm:get_prop(geom, display_lists),
    get({wm_current_state,DispLists}).

but, in the wings_dlg maybe it could be used this way:
Code:
get_current_state(#s{owner=Owner}) ->
    DispLists = wings_wm:get_prop(Owner, display_lists),
    get({wm_current_state,DispLists}).
obs: I'm not sure that owner will always be a window with the display_lists property.
Reply


Messages In This Thread
Preview Dialog Observations. - ggaliens - 01-18-2013, 11:43 PM
RE: Preview Dialog Observations. - micheus - 01-21-2013 10:05 PM
RE: Preview Dialog Observations. - optigon - 01-22-2013, 04:14 AM
RE: Preview Dialog Observations. - micheus - 01-22-2013, 11:15 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)