Your Own Operator | Scripting for Artists [8]

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

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

  • @Daniel-Six
    @Daniel-Six 4 года назад +9

    Wow... I wish I had more instructors like you back in my college days learning computer science. You actually have passion for what you're doing!

  • @danielpool2039
    @danielpool2039 4 года назад +3

    God I wish I had this when I started scripting. So many things you covered were things I struggled over early on. This is presented in such a clear concise manner. You are really good at teaching complex topics. I'm really envious, because no matter how well I understand something, conveying that knowledge to others is a struggle for me.

    •  4 года назад +4

      I had trouble understanding some math when I was studying it, because there was no context explained. It was just "A cross product of two vectors is computed like this". It was much later that I realised what they were practically useful for. That's what I flipped around in my trainings: first it's a practical thing to solve, and then the solution for it. And a second guideline for myself is to only explain something that is of value to the viewer, rather than just explaining everything that relates to the subject. I guess it helped :)

  • @Mainman0011
    @Mainman0011 4 года назад +6

    wow, thank you sir, this changes everything for my blender addon :) just kind of piecing together random features that I use often and making them easily available for my own use has be really awesome

    • @Mainman0011
      @Mainman0011 4 года назад

      probably full of programming nightmares to your eyes, but TMG-Mod-Tools is the name of my addon. I'm gonna need to refactor my functions so that they're less messy and more epic. but currently it's power is to modify all selected objects. Text, Mesh, Curve, etc have certain modifiers that I can toggle / apply with the click of a button / slider ;)

  • @mikapeltokorpi7671
    @mikapeltokorpi7671 3 года назад +1

    Super. Just what I was looking for.

  • @FelipeTorrents
    @FelipeTorrents 4 года назад +2

    Thank you Sybren! Right away I'm going to make an operator for clearing custom split normals in multiple objects, which doesn't work with alt click. Fbx models from other platforms usually come with this and I'm manually running a script for doing that job. Thank you!

  • @bohdan_lvov
    @bohdan_lvov 4 года назад +7

    Love it! Looks like I'll finally understand scripting with this!

    • @bahaatamer1245
      @bahaatamer1245 4 года назад

      As long as pointers aren't involved.

  • @Virtual_brain
    @Virtual_brain 4 года назад +3

    Thanks a lot! I am trying some things in blender for my PhD and this is extremely helpful 😁

  • @thefynn
    @thefynn 4 года назад +3

    very nice, I waited for someone who can explain blender python in the newes Version, with all Kowledge and in detail withaout leving things out. Thank you very much!

  • @Janis_P
    @Janis_P 4 года назад +1

    Very clear and easy to understand

  • @3d-illusions
    @3d-illusions 4 года назад +4

    This guy’s a legend.

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

    I send you a big "Thank you !" from France. Your tutorial is the clearest I have seen on the subject. And it is pleasant to follow, too. Merci.

  • @linolafettatnet
    @linolafettatnet 4 года назад +16

    I could not find my own operator (here the monkey grid) in the F3 Search bar in Blender 2.9.
    The solution is to enable following in the user preferences:
    Edit>Preferences>Interface tick Developers Extras
    This will show then the operator again.

    • @mikem.8826
      @mikem.8826 4 года назад +2

      Thank you! Spend a lot of time trying to figure out where I'm wrong... In 2.83 it's works and in 2.9 script doesn't showing in operator search anymore without this option.

    • @linolafettatnet
      @linolafettatnet 4 года назад +1

      @@mikem.8826 Glad it was helpful :)
      Have fun with your phyton scripts!

    • @jornejongsma
      @jornejongsma 2 года назад +2

      This crucial comment should be pinned!

    • @linolafettatnet
      @linolafettatnet 2 года назад

      @@jornejongsma Glad you found the comment without a pin ;)

    • @Atbrumley
      @Atbrumley 2 года назад

      Thanks, your a legend

  • @siddharthtiwari5314
    @siddharthtiwari5314 4 года назад +1

    Great initiative. Blender will get more and more developers through this. Thanks for your efforts.

  • @kobaltkween
    @kobaltkween 4 года назад +3

    Wow! That was incredibly informative! Thanks so much!

  • @JamieHamelSmith
    @JamieHamelSmith 4 года назад +3

    These are great! Please keep going; I'm learning a lot from your teaching style.

  • @Mrationality
    @Mrationality 3 года назад +1

    Thanks for the detailed explanations and tips.

  • @liveartrainbow
    @liveartrainbow Год назад

    Great Work .Thank you for sharing

  • @RobertShane
    @RobertShane 3 года назад +1

    This was exactly what I was looking for. Thank you

  • @marcelumlecram7310
    @marcelumlecram7310 4 года назад +1

    Super.... Nice n thorough... But not too heavy.

  • @VEGETADTX
    @VEGETADTX 3 года назад +1

    Thank you so much for these crystal clear explanations! :)

  • @technicalart3d
    @technicalart3d 4 года назад +2

    Nice I like blender

  • @Sharkmanblu
    @Sharkmanblu 4 года назад

    Thanks so much! Really Awesome tutorial! You explain complex concept in an easy way, thanks again

  • @mikepsanchez
    @mikepsanchez 4 года назад

    Fantastic. Thank you Sybren

  • @laidmessaoudi5335
    @laidmessaoudi5335 4 года назад

    Excellent tutorial. Thank you for sharing.

  • @suvigyamishra4604
    @suvigyamishra4604 3 года назад +1

    Sir, You are the best teacher i have seen by far. Thanks a lot for all these free gems :)

    •  3 года назад +1

      Thanks!

  • @dursungul9874
    @dursungul9874 4 года назад

    thank you very much, i hope you go on this series...

    •  4 года назад

      I published the next chapter this morning ;-)

  • @golemkonty
    @golemkonty 4 года назад

    Awesome tutorial, thank you very much!

  • @alhdlakhfdqw
    @alhdlakhfdqw 2 года назад

    amazing video! thank you so much for the great effort and video and tutorial and everything! :)

  • @arresha_ar
    @arresha_ar 4 года назад

    Thank you for these great videos.

  • @georgesd9
    @georgesd9 4 года назад

    OMG, this video and the whole series is super helpful

  • @perceval_
    @perceval_ 4 года назад

    Thanks! Really informative. Keep em coming!

    •  4 года назад

      Will do!

  • @skexofiner.nsystemz
    @skexofiner.nsystemz 4 года назад

    I like this. Blender is always ez 4 fun

  • @lebenin3604
    @lebenin3604 4 года назад

    Very cool! Thank you. #blender #programming

  •  4 года назад

    Awesome! Please make a playlist for Scripting for Artists. Thank you!

    •  4 года назад +1

      All the Scripting for Artists videos are at cloud.blender.org/p/scripting-for-artists/. There is also Blender Training playlist that has those SfA chapters that are on RUclips at ruclips.net/p/PLa1F2ddGya__OzPl3hfAjdayD9QIatudV

  • @abstractwaves6166
    @abstractwaves6166 4 года назад +1

    This is so usefull, thank you !

  • @mariotti.jerome
    @mariotti.jerome 4 года назад

    Nice, Thx you so much !

  • @wishful9742
    @wishful9742 4 года назад +2

    Amazing Video Thanks! I'm Waiting for more.
    What is the difference between 'Tool' and 'Operator' in blender? Does tool have same ingredients?

    •  4 года назад

      The tool system is different. I've never used them (from a coding standpoint), so I would have to dive into it to figure out how it works too ;-)

  • @SteveBakerIsHere
    @SteveBakerIsHere 3 года назад +2

    I really wish that all RUclipsrs who post HOW-TO videos for blender would (a) tag them with the Blender version number and (b) update or remove them when they get old. I've been searching for a tutorial about scripting for just about an entire day - and without exception, they don't work because they tell you to do something that's changed a bit.

    •  3 года назад

      Check out the date of the video, and compare it with en.wikipedia.org/wiki/Blender_(software)#Release_history to get a decent indication of which Blender version was used. From that point, you can dig through the Blender release notes on wiki.blender.org/wiki/Reference/Release_Notes to see what changed. Takes some time and it's not the easiest thing to do, but it should give you a way to transform a tutorial into something more modern.

    • @SteveBakerIsHere
      @SteveBakerIsHere 3 года назад

      @ Sure - but wouldn't it just be easier for tutorial authors to say "Made with Blender version xxx - preferably in the title of the video?

    •  3 года назад +1

      @@SteveBakerIsHere yes, but since neither of us can possibly influence all tutorial makers, this is a way to still get some of the info you're looking for.

  • @patrikhultberg896
    @patrikhultberg896 3 года назад +2

    Great tutorial! I just don't get how the y work since it uses self.count_x instead of self.count_y in row 38. Shouldn't both rows and columns then be just the x value?

    • @hiankun
      @hiankun 3 года назад +1

      I also thought it was a typo, but after playing with some simple test I found it was right.
      The key was the "%" and "//" operators. The "%" gives reminders that allow index of x going through 0, 1, and 2 repeatedly. Then "//" keeps y index from increasing to the next one until the x index complete its "row".
      In the case of this tutorial, the total number of monkey was 3*2=6. The x index was (0, 1, 2, 0, 1, 2) while y index was (0, 0, 0, 1, 1, 1).

  • @natetronn
    @natetronn 4 года назад

    Good stuff!

  • @bzikarius
    @bzikarius 4 года назад +2

    Thanks. I hope I will have time to learn your course.
    My option «register» in Text menu is dimmed. Can be checked but dimmed. Why this can happens?
    Script not runs with blender file (I tried to check/uncheck autorun scripts in preferences)

    •  4 года назад +1

      Make sure the text datablock is named correctly. It should be a valid name in Python (so no spaces, basically starting with a letter and then just letters, underscores, and numbers) and end in `.py`.

    • @bzikarius
      @bzikarius 4 года назад

      @ thanks. It solved the problem. I named it without .py

  • @workflowinmind
    @workflowinmind 4 года назад

    Very good one !! Thanks Sybren. Do you plan to make an episode about custom properties (scene, object etc...) and the gotchas? (Portability, What is saved in the blend file, etc...) :)

    •  4 года назад +1

      I might, it's a good idea.

  • @NikolaNevenov86
    @NikolaNevenov86 4 года назад

    Yay!

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

    For those who wonder why the operator still doesn't show up even after checking register and having the name with .py you have to save it File - Defaults - Save Start Up File

  • @Nova-sama420
    @Nova-sama420 4 года назад +12

    so THAT's why messing with redo panel parameters is slow AF, blender ctrl-Z each time i change something.....

  • @stephen285
    @stephen285 Год назад

    Thanks for your video ! - can you please explain how to determine the channel index number for the corresponding object in the NLA editor? I can code animations fine, I can push animations down with bpy.ops.nla.action_pushdown(channel_index=3) but I don't always have the index number? I can't figure out how, using code, you get the channel index #? Thanks

  • @bikalbaral1394
    @bikalbaral1394 3 года назад +1

    Great , but one thing whenever I clicked on the object , the operator panel goes away and I need to rerun the program to get the panel, is there a solution?

    •  2 года назад

      Check the console output (Window -> Show System Console on Windows). This probably indicates a bug in your code, and the console may show an error message or something else to help you figure out what's going on.

  • @jonathantribble7013
    @jonathantribble7013 4 года назад +1

    Isn't the redo feature an inefficient way to do it?

    •  4 года назад +1

      Doing it more efficiently requires knowledge of what the operator is doing. It could simply add a single row of monkeys when the 'X' count is increased, but that would be much more difficult to program, probably with complexity on both Blender's and Operators' sides.

  • @eliezra83771
    @eliezra83771 3 года назад

    Question about the property set thing: how can I feed the class some properties I register in the window manager?
    in the class -
    someproperty: bpy.context.window_manager.someproperty
    and then -
    def register():
    bpy.types.WindowManager.someproperty = bpy.props.IntProperty(someparameters)
    It gives me AttributeError because it somehow reads the class before executing the register code :(
    Now it isn't that important to have the undo menu, I just watched this video and thought it would be nice...(;

  • @jgiuguigiugigiugugiuuig4050
    @jgiuguigiugigiugugiuuig4050 4 года назад

    More Addon development, please!

    •  4 года назад +2

      Yes! That's what I have planned for the next video, actually: how to turn your code into an add-on you can send to others :)

  • @GrzegorzWronkowski
    @GrzegorzWronkowski 4 года назад

    I am running this code in B2.90 and property variable 'size' is not allwoed you need to name it some other way like: m_size

  • @nfex697
    @nfex697 4 года назад

    thanks for the great tutorial, i made a script with what you taught, however, it looks like i am unable to refresh the values for a second execution of the script, to demonstrate my problem using your example, executing monkey_grid for the first time and adjusting a bunch of values works, however if i execute monkey_grid a second time, the default values take on the previous values i created during the first monkey_grid execution, rather then the default values i scripted for the properties. Is there any way to fix that ?

    •  3 года назад

      Make sure you add `bl_options = {'REGISTER', 'UNDO'}` to the operator class. That should make it remember the property values for the next invocation.

  • @toughmccuddllo
    @toughmccuddllo 3 года назад +1

    return context.area.type == 'VIEW_3D'
    🤯

  • @mutedsounds2k
    @mutedsounds2k 4 года назад

    Can you add any Error Handling?

  • @RkRaoM
    @RkRaoM 2 года назад

    Sir
    I need a python script to change node label of materials, objects & material name with some string replaced one new one... e.g. floor_base_1, floor_base_2 floor_base_3 etc with name floor_mat_1, floor_mat_2 floor_mat_3 etc. I need this renaming system for all objects, materials & node labels of scene...
    Can give me script for batch rename for all objects, materials & node labels pls...😊

  • @Parsafari
    @Parsafari 4 года назад +16

    you forgot to add moths for more realism.

    • @arloc_official
      @arloc_official 4 года назад +1

      ian shot them all up to the space station...

  • @user-vp4nv3uj9y
    @user-vp4nv3uj9y 4 года назад +1

    Great ! thx alot.
    BTW - such a sexy voice!

    •  4 года назад +1

    • @opendstudio7141
      @opendstudio7141 4 года назад

      I'll have to learn by osmosis, can't stay awake. Hehe! That's what happens when you get old. 👴🏼💤 Have hyper-active Ian Hubert narrate! :)

  • @TheMalarz1989
    @TheMalarz1989 3 года назад

    I have no idea what is going on...

    •  3 года назад

      This is part of a series; it helps to check it out from the start at cloud.blender.org/training/scripting-for-artists/

  • @dmitryvolkov7178
    @dmitryvolkov7178 4 года назад

    while yes:
    open video
    like
    watch
    profit

  • @sandroavieira
    @sandroavieira 4 года назад +1

    Please Create a Channel : Blender Script for Artist (for contribution)

    •  4 года назад

      All the Scripting for Artists videos are at cloud.blender.org/p/scripting-for-artists/. There is also Blender Training playlist that has those SfA chapters that are on RUclips at ruclips.net/p/PLa1F2ddGya__OzPl3hfAjdayD9QIatudV

    • @TotallyGamerJet
      @TotallyGamerJet 4 года назад +2

      He gets paid by the blender foundation. So if you want to contribute to him donate there

    • @sandroavieira
      @sandroavieira 4 года назад

      @@TotallyGamerJet Yes, add one channel for this

    • @bzikarius
      @bzikarius 4 года назад

      @@sandroavieira no need to create channel for it. You can donate to fund or make subscription to blender cloud