03-25-2017, 07:23 PM
I am still struggling with getting this converted to a plugin. I do get the two geometry windows to appear and I can zoom and pan in each window without any problems but the two window views do not update as a pair. They are just two separate windows. I think it is because, in the patch, the View command is modified to check for a stereo pair. That way if there is another window linked to the current window they both update together.
I am hoping there is some code I can add to the plugin that will do this some how. Right now I have a function that checks for these things but I don't think it is getting executed. Maybe all I need to do is add a "View check or reset" command at the end of the code that creates the two windows??? See code below... But it has to happen every time the camera moves so there must be more I need to do.
Any ideas on how to fix this?
Thanks,
oort
I am hoping there is some code I can add to the plugin that will do this some how. Right now I have a function that checks for these things but I don't think it is getting executed. Maybe all I need to do is add a "View check or reset" command at the end of the code that creates the two windows??? See code below... But it has to happen every time the camera moves so there must be more I need to do.
Any ideas on how to fix this?
Thanks,
oort
Quote:new_viewer_stereo(St) ->
{Pos,{W,H}} = wings_wm:win_rect(desktop),
Size = {W div 2-40,H div 2-40},
N = free_viewer_num(2),
Active = this(),
Props = get_props(Active),
ToolbarHidden = wings_wm:is_hidden({toolbar,Active}),
Name = {geom,N},
io:format("First export Name(1)GEOM 2 is ~w\n",[Name]),
new_viewer(Name, Pos, Size, Props, ToolbarHidden, St),
% second window
N2 = free_viewer_num(2),
Name2 = {geom,N2},
io:format("First export Name2 GEOM 3 is ~w\n",[Name2]),
{X2,Y2} = Pos,
new_viewer(Name2, {X2+element(1,Size),Y2}, Size, Props, ToolbarHidden, St),
% now link
stereo_link(Name,Name2).