Blender Python: The most confusing part of BMesh

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • In this video, we will go over potentially one of the more confusing parts of Blender's Bmesh Python API called Loops.
    We will go over:
    * What BMesh Loops are
    * How to use them
    * How to select an edge loop using BMesh loops
    * How to work with UVs and vertex colors
    Blender Python Example: Using the modulo operator (%)
    • Blender Python Example...

Комментарии • 49

  • @onlyeyeno
    @onlyeyeno 10 месяцев назад +2

    Thanks for another great scripting tutorial !!
    Absolutely excellent, nice "tempo", good examples, and both concepts and code VERY well explained !!
    Best regards.

    • @CGPython
      @CGPython  10 месяцев назад

      Glad you liked it! ❤️

  • @firehd8hdfire
    @firehd8hdfire 9 месяцев назад +1

    Thank you for the detailed explaination of BMesh edge loops. I now understand a concept that had baffle me. Very useful videos. ( I find the background music distracting, though).

    • @CGPython
      @CGPython  9 месяцев назад +1

      You are welcome!
      This is one of the most complicated topics I tried to cover on this channel.
      Thank you for the feedback!

  • @adavewiley
    @adavewiley 6 месяцев назад +1

    Love the video and I learned exactly what I needed to.
    The music in the background makes it harder to follow what you are saying. Maybe skip the music or at least lower the level.

    • @CGPython
      @CGPython  6 месяцев назад

      Good to know thank you for your feedback ❤️

  • @joantonio6331
    @joantonio6331 6 месяцев назад

    Yesterday i was looking for a way to programmatically edit UVs because coming from houdini i got used to procedural modeling, and i need a script to automatically create thousands of mesh and setting the UV automatically... Then this morning i found this great tutorial. Thanks

    • @CGPython
      @CGPython  6 месяцев назад

      Glad I could help!

  • @Cuda_3D
    @Cuda_3D 9 месяцев назад

    This is awesome thank you. I'm feeling some stuff click that hadn't before.

    • @CGPython
      @CGPython  9 месяцев назад

      Nice!! 🥳

  • @Xoliul
    @Xoliul 6 месяцев назад

    Your videos are very well done, I very much appreciate your clear, calm way of explaining. Definitely helped me on a few things already.
    I'm wondering if you'd consider covering editing or generating UV's with bmesh? There's not much info online and I find it all a bit confusing..

    • @CGPython
      @CGPython  6 месяцев назад

      Glad you like them!
      Thanks for the idea!
      I'll add that idea to the list.

  •  10 месяцев назад

    Complex, but amazing tutorial. Thank you!

    • @CGPython
      @CGPython  10 месяцев назад +1

      Glad you enjoyed it! 🥳
      Yeah, this topic is probably the most complex thing I have covered on this channel.

  • @Purpolorpul
    @Purpolorpul 10 месяцев назад

    I am an absolute goon in coding, but your channel is godsent.
    This is exactly what i needed for my ever-increasing issues with blender. The more I work in blender the more annoying it gets with various quirky things that few seem to talk about. I've decided to give scripting a shot to fix some things i so desperately want to be fixed.
    You've probably heard something about Serpens 3 addon for blender, if not it is essentially visual scripting through nodes. So I thought to give it a shot and tie it up along with Easy BPY addon for easier scripting and would also bridge chat gpt for seamless work inside blender.
    While it seems a good idea on surface, wouldn't that hinder overall understanding and future-proofing of scripting even for beginner? Curious what is your take on it.
    Currently a bit piled with work, but i will delve more into your channel in a month or so, can't wait to tinker with scripts. You da man, Vic!

    • @CGPython
      @CGPython  10 месяцев назад +1

      Hey Maxwell,
      Thanks for sharing your thoughts!
      It really depends on what your goals are and how you plan to use Serpens 3, Easy BPY, and ChatGPT.
      I think the tools that you mentioned are a powerful combo if used correctly.
      The key to correctly using these add-ons and tools is to actually try to read and understand the code that Serpens 3 and ChatGPT would produce.
      You can generate some code for basic tasks with these tools and try to modify the code to get a better understanding of the things that were written for you.
      I would recommend starting with this playlist
      ruclips.net/video/nmJqIaSZlRs/видео.html
      Best of luck on your Python journey!

    • @Purpolorpul
      @Purpolorpul 10 месяцев назад

      Okay, thanks for reassuring and yes, I thought i would be a good idea to begin with the video you linked.@@CGPython

  • @thomasluo9033
    @thomasluo9033 7 месяцев назад

    thanks a lot. your video is what I want to learning!!

    • @CGPython
      @CGPython  7 месяцев назад

      You are welcome! ❤️‍🔥

  • @marknielsen4494
    @marknielsen4494 8 месяцев назад

    Your content is awesome! Thank you Victor!!!

    • @CGPython
      @CGPython  8 месяцев назад

      Glad you think so! 💖

  • @evandros.afonso3492
    @evandros.afonso3492 10 месяцев назад

    Very, very good!

    • @CGPython
      @CGPython  10 месяцев назад

      Thank you! Cheers!

  • @mspeir
    @mspeir 10 месяцев назад +1

    The only problem with that while loop is that it will become an infinite loop if the edge loop does not connect.

    • @CGPython
      @CGPython  10 месяцев назад +2

      💯
      Yes, that is a problem here!
      I try to avoid doing any validation/error checking in my tutorials to get my point across. If I add all the things I want to check for this video would be 1 h+ long :D

  • @MetalGearMk3
    @MetalGearMk3 10 месяцев назад

    Amazing tutorial as always.

    • @CGPython
      @CGPython  10 месяцев назад

      Thank you! Cheers!

  • @322ss
    @322ss 10 месяцев назад +1

    Loop must be the worst name for corner/edge data of a face. Loop should really be a loop if one uses such word. I wish Blender would eventually get rid of all these non-standard names like they used to have lamps (light), and still have armature (skeleton) etc.

    • @CGPython
      @CGPython  10 месяцев назад +1

      Naming things in programming is very hard. The term "loop" refers to the boundary loop around a face. Maybe a "loop" could have been called a "loop part", but that does not look good next to verts, faces, edges, or polygons (one-word terms). Changing things now would break all the great add-ons that use loops and invalidate all the dev forum/stack overflow answers.
      How would you have named this?

    • @322ss
      @322ss 10 месяцев назад

      @@CGPython100% at least not a loop :) I've used loops quite a lot and always forget the concept because of this bad naming convention - I've used 3ds Max earlier (and several other 3D softwares before that) it was super annoying to see things like lamps, armature, screw modifier and such, terms which no other 3d software used. I understand the fact that one doesn't simply go and change API that has been there for quite while, but in case of Blender IMHO they should. Seems like they are now also making an overhaul to how animation data is stored, which is good.

    • @322ss
      @322ss 10 месяцев назад

      Anyway, I don't mind different patterns in names personally, having used C# more than Python, I value clear and easy to understand names. Python users seem still be favoring old school short naming conventions, which I find really annoying, especially in forum answers (me = mesh, ob = object etc)

    • @CGPython
      @CGPython  10 месяцев назад +1

      I’m not a fan of the short names as well. I read somewhere a while back that if the (non-technical) user of a tool can’t tell you what a short name means - don’t use it.
      For example RGB is something that a user could tell me what that means, but the name “me” not really.

  • @wissammmax
    @wissammmax 10 месяцев назад

    thanks you are the best

    • @CGPython
      @CGPython  9 месяцев назад

      You're welcome!

  • @researchchannel361
    @researchchannel361 10 месяцев назад

    Sir, please upload more tutorials on Bemesh

  • @tinkerboi
    @tinkerboi 26 дней назад

    Could you by any chance make a video on how to extrude manually using bmesh? I am kind of curious how extrude works in low level

    • @CGPython
      @CGPython  17 дней назад +1

      Thank you for the idea!

  • @rafamichalski6150
    @rafamichalski6150 10 месяцев назад

    I don't know how do you get this black-lines-and-dots view in the UV editor. In the normal view, after setting uv.y to 0.0, I have to toggle the edit mode off-on to see the change.

    • @CGPython
      @CGPython  10 месяцев назад

      As far as I know, you can't get that view outside of edit mode.
      I bet it would be possible to create an add-on that would draw the edges and verts in object mode.
      Note: you can stay in edit-mode and use the create bmesh from edit mode mesh.

  • @WahranRai
    @WahranRai 5 месяцев назад +1

    Why did you change the speed of your explanation?

    • @CGPython
      @CGPython  5 месяцев назад

      Hey
      What do you mean?
      Like how fast I speak?

    • @WahranRai
      @WahranRai 5 месяцев назад

      @@CGPython Take the time to explain not reciting the text !

  • @Thingsbydesign
    @Thingsbydesign 3 месяца назад

    is it possible to create variables, for loops and switch clauses in blender python? Those are the things I miss in geo nodes (well repeat zone is sort of loop) and if you could do it in blender python it would open so many possibilities.

    • @CGPython
      @CGPython  3 месяца назад

      It is possible to create variables, for loops and switch clauses in Blender Python
      I have a playlist here going over the basics
      ruclips.net/video/nmJqIaSZlRs/видео.html

  • @neocortexlab
    @neocortexlab 7 месяцев назад

    Too much work with Blender made this guy head looking like 27:28 (press Pause!) Suzanne sample obj ... please be careful guys!
    p.s> nice tech tutorials, thx!

  • @LBGLegacy
    @LBGLegacy 9 месяцев назад

    Curtis Holt sent me here.

    • @CGPython
      @CGPython  9 месяцев назад

      Welcome ❤️

  • @322ss
    @322ss 10 месяцев назад

    That API is really bonkers / "bm.loops.layers.color" why do these guys try to make it so hard to find stuff, how can a simple task like adding a new vertex color data for (b)mesh be made so cumbersome.

    • @CGPython
      @CGPython  10 месяцев назад +1

      I have not looked at the underlining code (I should have...), but I'm going to guess the Blender developers are giving us access to the raw C data structures that Blender uses to make all the mesh operations so fast and performant.
      If they had built a higher-level API for us, it might have been slower. We can always create something like EasyBMesh (similar to what Curtis Holt did with github.com/curtisjamesholt/EasyBPY)
      Personally, I would take the most efficient and fastest API that they could give us, sacrificing the learning curve and readability. We can always build on top of a fast API and make it slower :D
      If they made it a more friendly high-level API, we might have started to complain about how slow it is.