Closed AVA3d closed 8 months ago
That's a pretty good idea, however the issue here is that going from 1 object to another, I can't guarantee what would happen as the scripts are tailored to each object, it's possible that the object ends up being huge or even worse problems. I can't say for sure as I never tested the operators for a different object type than the object actually is, as there was no need to do so. It did seem to work fine with your examples though. Also I think there has to be a different math-y way to figure out which object it is without fixing their rotations, but I remember not being able to come up with one before.
Side note, my laptop is falling apart when I'm running a boolean with an exact solver, is that happening for you guys too? Even if I am just moving the cutter around and not using reprimitive on it. I've fixed the parenting and booleans losing track of a cutter object, there's still some bugs left when the location/rotation is applied though, probably finishing that today along with adding loop cuts.
I can't guarantee what would happen as the scripts are tailored to each object
You can add to the description that besides the main functionality the addon has an another conversion feature, but it's outcome can not be 100% predicted and it's up to the user experimenting with it.
Regarding huge sizes - is it possible to implement bounding-box check of the initial mesh and make the resulting mesh similar to it? Somewhere in the future, as 2nd grade task. As the main thing now, I guess, is the preserving the initial state of the object - parenting, origin, booleans and shading(wired/solid, smooth/flat)
The other problem with this is that I would also need to create a built in pie menu because not everyone has it and it does add some work for the user which is what I'm trying to avoid, I think most people wouldn't want to choose which operator to use and would prefer if the addon figured out
Side note, my laptop is falling apart when I'm running a boolean with an exact solver, is that happening for you guys too?
Only on very dense meshes. On something simple like in the videos above - all works fine.
Besides hardware power , you can check if some other addons (like Kit OPS) take resources of your laptop.
some work for the user which is what I'm trying to avoid
Well, there is still no such a button "make me a prop without any efforts". Even with all the fuss around AI...
To be serious. Do you mean it can be confusing to a user to choose proper option in the menu? Well, if you want you can preserve the current one-button implementation and add the pie-menu as advanced option for another hothey.
Yes I know, I was thinking about that as an option, that one might take a while though because I don't know how long it would take me to add a pie menu, I'm thinking since it exists as a separate addon it's probably not easy at all
I suppose a simpler thing would be to just add the quick rename mesh
https://gifyu.com/image/SUFh2
It looks like everything is fixed! I'm eager to try it :))
Reg. PME - this is really complex addon with a lot of functionality. I barely use 50% of it... I'm not a programmer, and can't give you any advice regarding it unfortunately. But I think it shouldn't be too complex to create 8-section pie menu. I believe I've seen something regarding it on youtube.
Here is a video on YT: https://www.youtube.com/watch?v=41fXtvzJ3Ik&t=8s I hope it might help
I'll see if I can do it after work, also the loop cuts. Thanks for the help :)
Which object do you use most for cutters, I assume cylinders? If you want I can make it work for word Cutter aswell but it will assume it's a cylinder. I'll upload the files here because it's not fully finished for a release yet
Well... there aren't one most shape for cutters. All variations of cubes, cylinders and n-gons are used quite often. No, thanks. I think I'll stick with the menu approach - it's more flexible for my needs.
RePrimitive.zip
Answered in the "Boolean / Parenting / Vieport Display" topic
Oh, man! It's so cool be able to work like this thanks to your addon!
https://github.com/eXzacT/RePrimitive/assets/84742853/68d51967-8564-4bc5-b367-887ba80e3057
I'm glad you're having fun :)
is there any point adding loop cut support for toruses or is it just for cylinders/cones?
No, adding support for cylinders/cones is enough.
Bu the way, I'm going to try add an another item in the pie-menu - Cube (4 sided cylinder + 45 degree rotation). It could be useful for faster conversion.
I don't know if I want to add the pie menu, because going from 1 object to another one makes no sense, I mean calculation-wise but I do have to figure out a way for Cutters to also be accepted as a name and to pick the correct operator that gets called. I don't know if there's a nice way to do that other than going down a huge tree and deciding which path to take and once you reach the end of a path you can say with 100% certainty what kind of shape it was
An another use case I've found for RePrimitive :)
https://github.com/eXzacT/RePrimitive/assets/84742853/d4b9197f-24f8-49d3-8247-27af7d9e409f
That looks funky ahahhahaha 😄
I'll be working on the addon again this weekend, been busy
Can you tell me if a cutter is always parented to the object it's cutting? Or is that not always the case, because right now it's looking for modifiers that a parent has, I would have to change it to go through every object in the scene and check if some have modifiers that are linked to the object you're changing, which might be costly depending on the scene but probably fine, also would you like the loop cuts to get reapplied after changing the object? That might be a bit tricky since I can't really know where to put those cuts again, I guess I could get the height of a cut and what's the percentage of total height, then reapply it at that height percentage
"Can you tell me if a cutter is always parented to the object it's cutting?" - if we're talking about BoxCutter, than yes, it always parents a cutter as well as creates the folder Cutters, and put there the cutter as well. Hmm.. I'm not sure I understand why it's necessary to looking for modifiers, but it's technical things I'm not competent with :)
" would you like the loop cuts to get reapplied after changing the object?" - if it's possible, it could be very handy for cylinders and cones. Probably it's worth to implement it via checkmark? Good idea regarding height! I don't know if this is useful but BC orients cutters along Z axis:
https://github.com/eXzacT/RePrimitive/assets/84742853/562f482f-3fec-46a3-9c2f-3c804adaab36
Because the object you are changing is the target in the boolean modifier of the parent object, so when I delete the old objects I have to point the parent at the new one, I'm guessing that's one of the reasons they put it as a parent so they can easily track which objects have cutters and which cutters are cutting what.
Okay I'll see about reapplying the loopcuts at the correct heights again, I'll send the fixes I've doen so far here later today :)
Set it as not planned since I think I can solve it in a better way, I've done the rest you mentioned here though(I think), please let me know if you find any issues I'll get to fixing them as soon as I can, thanks :)
Great job Damjan! :) RePrimitive preserves origin now, the same thing with Flat/Smooth. Working with the addon is very comfortable now!
Thank you, glad you found it helpful :D
Looks like we didn't notice the elephant in the room :D There are couple of problems if we edit a source object:
https://github.com/eXzacT/RePrimitive/assets/84742853/52b0b914-fb56-43a2-bb15-50b0aa9cc1e8
Oh of course, I should have thought of that 🤦, fixing it right now
RePrimitive.zip I think it works now, can you please check if I understood you correctly?
Yeah, you fixed these 2 issues! *thumbs up Though I've noticed it creates unnecessary duplicate: https://github.com/eXzacT/RePrimitive/assets/84742853/aeb9e87a-1b8c-44d1-ac53-bec6db718126
Could you also add preserving shading?
One more thought. Probably it would be better if scaling of an object could work from the origin. https://github.com/eXzacT/RePrimitive/assets/84742853/49dfb642-b9fe-47ad-a618-68344401791f
What do you think?
Yeah, you fixed these 2 issues! *thumbs up Though I've noticed it creates unnecessary duplicate: https://github.com/eXzacT/RePrimitive/assets/84742853/aeb9e87a-1b8c-44d1-ac53-bec6db718126
Could you also add preserving shading?
I'm not sure what's wrong in the video, shading should work, is that the right click -> shade smooth?
Oof the scaling might be really hard, I have to check it out, when you change radius/depth I think it's different from the "s" scaling one, but I could be wrong
I think it's Shade Auto Smooth. Though there are some changes in Blender 4.1 regarding shading. I haven't test 4.1 yet, but I heard this option removed completely and replaced by either a modifier or geometry node modifier (not 100% sure)
As far as I know, there is no way for me to tell whether shade smooth OR shade smooth(auto) was used on an object, so I can't know which of those two to reapply. Right now I'm reapplying shade smooth which is why the code doesn't work for you. Maybe the best thing I can do is just always shade smooth auto it(if either was used) if that one is generally more used
False alarm sorry, I can find out which shading was used
This smoothy thing is subject to change in B4.1, so please don't invest to much time into it. I need a couple of days to figured out all the changes that B4.1 has brought, since it was released yesterday.
It was just couple lines of code to change it(I think it should work fine now) I'm trying to reproduce the bug where it created duplicates but it doesn't happen to me, was it in that specific scenario or is it creating duplicates constantly?
Oh maybe because you're on 4.1
No, I'm on still 4.0.3 I guess this has to do with additional collections in the project.
Nope, this is related with the selection state of a collection:
https://github.com/eXzacT/RePrimitive/assets/84742853/7b2b7491-71f0-40d2-8cf5-4bc9b7af6d38
It creates a duplicate if something other than the Cutters and initial Collection folders is selected
I don't think it's a duplicate, just linked to two different collections at once
but I still don't know how to recreate the bug, could you do it manually without boxcutter creating some collections?
I think I'm supposed to unlink it from the default blender collection where objects get added if it wasn't there to begin with, let me check after meeting
I don't think it's a duplicate, just linked to two different collections at once
Yes, you're right.
but I still don't know how to recreate the bug,
I can send you the file: RePrimitive_01_2.zip
could you do it manually without boxcutter creating some collections?
Checking it atm
The same thing without using BC:
https://github.com/eXzacT/RePrimitive/assets/84742853/9f9a3725-bc8e-4a32-80b2-142c6eedf3f1
Damjan, I'd like to share a cool idea that came to me.
What if instead of complex checks you'll add a 8-section pie-menu instead?
Advantages:
I've already made a semi-workable prototype as proof of the concept (no coding from my side, just using Pie Menu Editor Addon): Video1: https://github.com/eXzacT/RePrimitive/assets/84742853/2e8ea9c6-fcea-4a59-9643-4bec85e7c18e
Video2 (booleans/BoxCutter): https://github.com/eXzacT/RePrimitive/assets/84742853/7613a582-ba7a-4f83-a9a7-333a5c6a9774
This thing can expand the functionality of your addon substantially :)