Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from guillaumechereau:master #58

Open
wants to merge 172 commits into
base: master
Choose a base branch
from

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 27, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

Used for the filters for example.  In this case we can only find an
action by name.  Previous code would put those action at the zeroth id.
I also added a generic function to apply an effect to the selection,
since currently we have three different cases and this is a bit tricky
to do it correctly I think.  Maybe there should be a simpler way,
merging the selection rect and the mask?
So that we properly register the end of a hover event when we move the
mouse in the UI area.

This fixes a bug with the brush tool that sometimes froze.

Might break some other things though, since this code is not very clear.
Instead of having each tool keep an instance of gesture3d_t, we let the
core manage the list automatically.

This makes the code a bit simpler for the tools.

Part of a refactoring to allow more advanced 3d gestures.
Instead of passing it as extra argument to goxel_gesture3d.

Also remove the cursor argument, since this is always the global cursor.
Instead of putting it inside the gesture struct.

I want the gesture to eventually become a const structure.
The goal is to stop using a global 3d cursor, and instead allow each
registered 3d gesture to use different snapping settings.
I want to remove it totally.
I want to remove this totally.
Reuse the generic pick color code from tools.c instead of duplicating
it.
Instead of directly using the global 3d cursor.

Because I want to remove this cursor.
So that we avoid directly using goxel.cursor, that I want to remove.
Instead we use one 3d cursor per registered 3d gesture.

The code is still quite complicated because we mix 2d and 3d gestures,
but at least now we should be able to have severay 3d gestures using
different snapping mode.
Currently, we are calling this several times per frame with the same
volume.

I would like to add a cache so that we don't update the fbo if we don't
have to.
With the new way we manage the 3d gesture, we unproject the 2d position
on the volume several times per frame.

To avoid killing the perfs, add a cache so that we only render the pick
fbo when it has changed.
Not needed because we already have this in the top bar.
Remove some more useless code.
Possibly breaks some tools!

The previous behavior was always rounding to inside the nearest voxel,
but usually when we snap to the volume we want to stay on top of it (and
then use a -0.5 offset to get inside if needed).

The new behavior only rounds along the tangent and binormal, but not the
normal.  This will make the selection tool a bit easier to implement I
think.
Make it work with voxel faces instead of full voxel.  This allows to
more easily select the inside of blocks.
Not needed since we have this info in the gesture3d_t struct already.
Instead we add a plane in the gesture3d struct, that can be used for
snapping.

This makes the unproject code a bit cleaner, and will allow to have
several 3d gestures, using differents snapping plane.
We need to be able to snap to either the global plane or a custom plane.

A bit confusing I guess.  Maybe the code should be reviewed.
guillaumechereau and others added 30 commits July 21, 2024 15:03
Still too complicated, as is most face manipulation code for the moment.
Need to figure out a way to make this simpler.
Avoid using the non safe strcat function.  I could have uses strlcat,
but I am not sure if this is supported on all platforms.
Instead of a plane.  This makes the code simpler, and also fix a bug
when we try to extrude in certain camera directions.  Before this,
sometimes the extrude would not work.
Try to move the function that actually apply the extrusion into a
separate function, so that we can later call it with manual values.
We apply to the last operation.  One issue is that it doesn't work well
if we do some other painting operation and come back.
In this case we don't need a mo file.
So that they are ordered the same on all platforms.
Is there a way to automatically show the last release here?
The volume_op function was not working properly for intersection
operations.

Now this code is quite messy, so it's hard to understand what's going
one here.
I am still looking for a clean way to create maximized *non full
screen* windows with glfw.
This fixes a compilation issue with gcc,
thanks @sleeptightAnsiC for pointing it out.
Ignore a warning that should be safe I think.  Could we instead disable
-ffast-math just for this file?

Untested.
Because we use NAN in a few places in the code at the moment, so
using -ffast-math could be an issue, and new release of clang
complains about it.

Would still like to avoid using NAN or INFINITY in places where
we don't really have to.
Here we just want to move the mouse outside the viewport.  I am not
totally sure if using -1 is the best, but I prefer not using NAN so that
we can still if we want compile with -ffast-math.
On top of an empty image.

This is the second version of this fix, in the first commit I made a
mistake and hashed the matrix (mat) instead of the material (material).

The issue is that we need to make sure that the hash changes when we
open a new image, even if the image is exactly the same, because the
material pointer of the cached render_layers still point to the old
image.

I think a proper solution would be to avoid using pointer for
layer->material but instead an index.  The same could be done for
image->layer, image->camera, etc.
* Add a filter to mirror voxels

* Make the name more conventional

* Styling fix
* Allow opening multiple filter windows

* Add default layout for filter windows
Instead I added a function got retreive the height when we need it for
layout.

In preparation of supporting different font sizes.
To address issue #399

Not tested much.
Since I removed the save button, need to make sure we save each time
something changes.
Added a generic gui component for lists, so that we can use it for
layer, cameras and materials.  For the moment this supposes that the
list items are all based on the same structure that starts with a ref
counting and two pointers to next and prev items.

I think I should create some kind of base struct for all the lists to
avoid this though.

Since I make all the list behave the same, I changed the order of the
layers.  Hopefully this is acceptable.
Useful when debugging.
We were initializing imgui and loading the fonts at each frame!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants