Camera rotation center + imgui.ini

584 views
Skip to first unread message

Jérémie Dumas

unread,
Oct 24, 2017, 8:16:41 PM10/24/17
to IceSL
Hi guys,


I just wanted to make 2 suggestions the current IceSL behavior:


- When launching IceSL from the command-line, a file 'imgui.ini' is
always created in the *current working directory*, which is probably
not the desired effect. I'd suggest customizing the
`ImGuiIO::IniFilename` variable to save the .ini in the IceSL config
folder, or disable it entirely.


- It would be nice if the rotation would be updated when the scene
changes. Right now it's updated at the beginning when you load a lua
script, but not when the scene changes. Consider this simple script:


A = sphere(10)
N = 1
T = {}
for i = 1, N do
for j = 1, N do
table.insert(T, translate(i*20, j*20, 0) * A)
end
end
emit(merge(T))


Now open the script, and change N from 1 to 10 ... The view becomes
all awkward. Save the file, load it again, everything is nice and
smooth.



I'm also a bit confused with IceSL-slicer: does it also opens .lua
files on Windows? Or is it only on linux that it opens .lua files?


Cheers,
Jérémie.

Maze Mietner

unread,
Oct 28, 2017, 9:49:34 AM10/28/17
to IceSL
Hi

I guess the ini is still some debug stuff.
For the camera: No you don't want the camera to move when you modify your script. Really. Try to change N with the mouse wheel (while holding the Ctrl key) - and imagine the camera would move every time.

IceSL-slicer should also open lua, but I use IceSL-forge all the time.

Maze

Jérémie Dumas

unread,
Oct 28, 2017, 12:03:24 PM10/28/17
to Maze Mietner, IceSL
On Linux IceSL-forge is not available, so we have to use IceSL-slicer.

The imgui.ini file is not some debug stuff, it is a file created by
ImGui to store windows settings (like which panel is opened or closed,
etc.). It is created by default by ImGui in the current working
directory, but it would be a simple matter to either disable it or
place it in the same config file as the rest of the IceSL config. I
just wanted to mention it.

For the camera I didn't mean the camera should move everytime the
script is updated, of course that would be bothersome. Ideally one
would keep the same view, but update the "rotation center" to be
centered again in the scene. Now that you mention it I realize it may
not be as straightforward as I thought. A quick workaround would be to
add a button/shortcut to "recenter" the view so that you don't have to
close/open IceSL again to have a proper rotation center.

2017-10-28 9:49 UTC−04:00, Maze Mietner <maze...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "IceSL" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to icesl+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Maze Mietner

unread,
Oct 29, 2017, 1:12:18 PM10/29/17
to IceSL
Hi

well, I saw the imgui.ini first with the beta versions of 2.x, therefore I think it's still only some debug info, without any real other purpose.
You can center the view in IceSL-slicer and IceSL-forge, at least on Windows.

Maze

Jérémie Dumas

unread,
Oct 29, 2017, 2:06:27 PM10/29/17
to Maze Mietner, IceSL
And how do you recenter the view/rotation center in IceSL then? I may
have missed that.

Regarding the imgui.ini file it appeared in IceSL 2.x because it is
the first version to use the ImGui library for drawing the GUI widgets
(as opposed to AntTweakBar that was used before). I know because I use
ImGui as well and have the same issue. The imgui.ini file is used to
save persistent window configuration between launches of the
application (such as positions of windows that you have moved, if any,
or panels that have been opened/closed, etc.). You can look at the
ImGui source code if you still do not believe me:
https://github.com/ocornut/imgui

2017-10-29 13:12 UTC−04:00, Maze Mietner <maze...@gmail.com>:
> Hi
>
> well, I saw the imgui.ini first with the beta versions of 2.x, therefore I
> think it's still only some debug info, without any real other purpose.
> You can center the view in IceSL-slicer and IceSL-forge, at least on
> Windows.
>
> Maze
>
> On Saturday, 28 October 2017 18:03:24 UTC+2, jeremie.dumas wrote:
>>
>> On Linux IceSL-forge is not available, so we have to use IceSL-slicer.
>>
>> The imgui.ini file is not some debug stuff, it is a file created by
>> ImGui to store windows settings (like which panel is opened or closed,
>> etc.). It is created by default by ImGui in the current working
>> directory, but it would be a simple matter to either disable it or
>> place it in the same config file as the rest of the IceSL config. I
>> just wanted to mention it.
>>
>> For the camera I didn't mean the camera should move everytime the
>> script is updated, of course that would be bothersome. Ideally one
>> would keep the same view, but update the "rotation center" to be
>> centered again in the scene. Now that you mention it I realize it may
>> not be as straightforward as I thought. A quick workaround would be to
>> add a button/shortcut to "recenter" the view so that you don't have to
>> close/open IceSL again to have a proper rotation center.
>>
>> 2017-10-28 9:49 UTC−04:00, Maze Mietner <maze...@gmail.com <javascript:>>:
>> > email to icesl+un...@googlegroups.com <javascript:>.

Jérémie Dumas

unread,
Oct 29, 2017, 5:29:08 PM10/29/17
to Maze Mietner, IceSL
On Sun, 29 Oct 2017 14:06:22 -0400
Jérémie Dumas <jeremi...@ens-lyon.org> wrote:

> And how do you recenter the view/rotation center in IceSL then? I may
> have missed that.

Nevermind I found it. Don't know why I didn't see it before ¯\_(ツ)_/¯
Reply all
Reply to author
Forward
0 new messages