Python Tutorial for Beginners - Unlocking the Animation Power of Python in Blender

Поділитися
Вставка
  • Опубліковано 27 гру 2024

КОМЕНТАРІ •

  • @Plaagfluit
    @Plaagfluit 3 роки тому +200

    Thanks a lot for this, I'll finally come to a point of combining my bad coding with my bad blender skills to create awesome new things

    • @racket136
      @racket136 2 роки тому +5

      Bruh I relate to this so hard I was just thinking about this today ahhahahaa

    • @cereb_learn
      @cereb_learn 2 роки тому +4

      combined enough bad skills you might make somthing good eventually right?

    • @pratiushpant2951
      @pratiushpant2951 2 роки тому +2

      Us moment🤣

    • @toonzdanceparty
      @toonzdanceparty 2 роки тому +1

      I love u

  • @lornemalvoo
    @lornemalvoo 3 роки тому +88

    PLEASSEEE, MAKE A TUTORIAL SERIES MAN, PLEASEEEE

  • @gravnine
    @gravnine 3 роки тому +17

    I've been trying to learn programming for a while. But this was the best tutorial I've seen for python, and its in a video about blender...

    • @mixedbyhals1329
      @mixedbyhals1329 7 місяців тому

      this is not the best way to learn python tbh, you need to watch python tutorial to understand it's syntax and how to build logic

  • @SamB2112
    @SamB2112 7 місяців тому

    Wow, this is precisely what I needed to make my intended didactic animation. Amazing. Extremely useful. No wasting of time, straight to the points. One of the best tutorial videos out there. No amount of thanks is enough... 😊

  • @zephaniahdejene1746
    @zephaniahdejene1746 3 роки тому +28

    Finally I understand python praize the lord its a miracle XD

  • @XiagraBalls
    @XiagraBalls 3 роки тому +20

    This is quite brilliantly explained. I was putting off looking at Python scripting, but it looks like it's much simpler than I thought. 👍🏻

  • @wagwagdude
    @wagwagdude 3 роки тому +8

    This is the first video I've seen showing introduction to Python in Blender. Very educational!

    • @TT-yz7pz
      @TT-yz7pz 2 роки тому

      there are actually quite a few out there now

  • @mostafaghobashy2724
    @mostafaghobashy2724 Рік тому +1

    Its good and I love it....
    BECAUSE I AM A PY DEV
    a guy who never touched code in his life will not understand python
    YOU ARE SCARING PEOPLE FROM PYTHON

  • @GeoffCoope
    @GeoffCoope 3 роки тому +7

    Loved it, thanks for making this video. Reminds me of my Max script days when technical animators were called in for the strange effects that would take days if not weeks manually.

  • @mamadshonazaramonov3010
    @mamadshonazaramonov3010 3 роки тому +14

    Feeling blessed! This is liberating! Thank You so much!

  • @weeliano
    @weeliano 3 роки тому +7

    Excellent Python demonstration! Straight to the point and using actual examples.

  • @tonybamm
    @tonybamm 3 роки тому

    @26:00 This is exactly what I was trying to do and was running into same error. THANK YOU a lot..!!

  • @JakeDownsWuzHere
    @JakeDownsWuzHere 2 роки тому

    i was looking for a quick primer and this was the perfect amount of info. thanks for putting this video together

  • @worldother2080
    @worldother2080 3 роки тому +1

    Muchas gracias hace 3 meses empecé a estudiar python y hace 2 meses empecé con blender esto es perfecto, muchas gracias por compartir su conocimiento

  • @bluephoenix624
    @bluephoenix624 3 роки тому +2

    chris this is amazing ...thank you for this step-by-step instruction on how to use python in blender

  • @christophepelletier2901
    @christophepelletier2901 3 роки тому +4

    Un très grand merci ! This course is really great. Your explanations are crystal clear.

  • @MariaAltmann
    @MariaAltmann 3 роки тому

    Yep... the "context" issue had me baffled for hours. So brave... but rewarded to finally have someone explain. Thanks a million. Hope to connect through your course soon. Awesome CG Cookie.

  • @binyaminbass
    @binyaminbass 2 роки тому

    It's really cool to understand python. I am living in 2022 with Blender 3.2 so this particular function is better suited for geometry nodes. But as an intro to python, this was nice.

  • @takuyasato3717
    @takuyasato3717 2 роки тому

    Thank you very much for the inspiration video for me. This is all enough blender python tutorial.

  • @jimmytheskateboarder
    @jimmytheskateboarder 3 роки тому +3

    Great tutorial and thank you! I'm stuck on the texture coordinate part at 23:43. The texture coordinate isn't changing the cubes as it does on your screen.

    • @sjduranh
      @sjduranh 3 роки тому +1

      Did you solved it?, I'm stuck at same point, I do the link but when all cubes are selected and i try to do a modification just one cube change

    • @kylejennings819
      @kylejennings819 2 роки тому

      he switches over to render view (whereas the previous portions of the tutorial are using solid viewport shading).

  • @stephen285
    @stephen285 Рік тому +1

    Thanks for your video ! Can you answer a simple question? what about interactive scripts? ones that prompt the user for input? or say I have a dog character and I want to be able to control which direction it goes interactively by moving a switch? how do I have a script process running waiting for something to happen so that it can react without freezing the blender UI??

  • @illmarten1073
    @illmarten1073 3 роки тому

    Great tutorial, What it helped me most was the last tip, on how to toggle to the correct context view !!! Thank you...
    A full tutorial on the other usual error situations is greatly needed, so this way the full path on how to script 3d blender will be open and an explosion of new, complete and supper powerful scripts can be achieved.
    The problem right now is that even that anyone wants to READ and look up the documentation, BECAUSE we don't have the full understanding of python we JUST cannot understand the documentation or the instructions given, In addition the documentation for python and 3d blender lacks SIMPLICITY and CLARITY, The current short and technical error reports JUST INCREASE the frustration when something is not working, These lack of ease in troubleshooting is STOPPING and KILLING experimentation and development for python and 3d blender.
    STRESS BOMBS:
    Right now in 3d blender when an error occurs it tells you "look in to the console for now" ... First problem "Where is the console"
    Then, the console gives you a short and technical report and on the last line it says " Look in the console for now" ... BUT we are in the console !!!
    For example:
    Yesterday I was trying to add a material color to the cube and I typed this line of code:
    ....code
    ...code
    mat_red.diffuse_color = (0.0, 0.8, 0.0) this code gives the cube a red color.
    When I run this code the ERROR said .... bs..bs four parameters are needed and only three are given !!! GTF!!!
    A better and helpful error report could be:
    To defuse material color needs the rgb parameters PLUS the Alpha parameter ... your code should look like this
    mat_red.diffuse_color = (0.0, 0.8, 0.0, 1.0 ) the last parameter of 1.0 sets the alpha to full opacity and these four parameters are needed to set a new diffuse color for you object, in addition if you set the alpha to less than one (0.6) the color will look semi transparent.
    For your convenience here are some links to other color related code, ... DON'T worry 3d blender got your ass cover!
    www.some cool and helpful 3d blender documentation.com
    Something like this will open up python and 3d blender to the masses and the development and the benefits will be infinite,.... and best of all, YOU Chris Bailey right now have the OPPORTUNITY to be the GREAT CREATOR of the path to full 3d blender scripting !!!!
    PLEASE MAKE this tuts!!! Thank You again. Marten.

    • @gower1973
      @gower1973 3 роки тому +2

      You know Blender is open source right? You can just rewrite the documentation and submit it to be evaluated by the devs and if yours is a better job of it it will get added into the master branch. Having a rant about it in a company not related to Blender isn’t going to change anything

    • @illmarten1073
      @illmarten1073 3 роки тому

      @@gower1973 I made it clear that I do not know how to code, so According to you how can I rewrite the full documentation?

    • @MarcoFadini
      @MarcoFadini 3 роки тому +1

      @@illmarten1073 Documentation is not code. Also, as a coder, I can assure you that the template "N parameters expected, N given" is used for all languages I know. It's a pretty common convention for that kind of messages. On top of that, python has one of the best documentation in the entire industry. Calling what error messages say "bs" says more about you and your willingness to learn and adapt, honestly

  • @dpm2213
    @dpm2213 3 роки тому +1

    The way that you teach this topic is excellent. Keep it up!

  • @amateurbeatsofficial7702
    @amateurbeatsofficial7702 2 роки тому

    Background music is good. Makes video entertaining

  • @swig_gigolo
    @swig_gigolo 3 роки тому

    Ever since school I’ve wanted to do GUIs in python but the packets and libraries never worked in pycharm if blender has stuff like this baked in I can’t wait to try this more just got into doing 2d animation with blender this looks a lot more welcoming to me as a coder first now days

  • @HarimaKentaro
    @HarimaKentaro 3 роки тому

    finally i can use my meagre coding skills somewhere and a good refresher for the syntax while actually using it somewhere practical :P

  • @LuminousWatcher
    @LuminousWatcher Рік тому

    Thank you for an excellent tutorial. I love that you used the animations for the section titles and thumbnail

  • @mcmv3040
    @mcmv3040 2 роки тому

    That's so so good you're a great artist,but to be honnest,(about the project) I made the whole animation without any scripting just some dope sheet,and with my weak computer I still working with blender 2.79,but that's a perfect course about python,I didn't use it ever.

  • @grodarh
    @grodarh 3 роки тому +2

    How to create 10x10 blocks area:
    import bpy
    div = 2
    for i in range(10):
    for j in range(10):
    bpy.ops.mesh.primitive_cube_add(size=2, enter_editmode=False, align='WORLD', location=(i * div, j * div, 0), scale=(1, 1, 1))

  • @MM-24
    @MM-24 3 роки тому +2

    This is an awesome tutorial, thank you for this
    One question: alot of this is now possible with nodes right? Where does python scripting still become more or less helpful with the "everything nodes"?

  • @Litvy
    @Litvy 2 роки тому

    Thank you so much! I had a lot of fun doing this

  • @АнтонСавичев-й3р
    @АнтонСавичев-й3р 2 роки тому

    This is absolutely fantastic simple explanation. I think i'll finally get to python scripting today:) Thank you!

  • @konradswart4069
    @konradswart4069 3 роки тому +1

    This is GREAT!
    Thank you very much for putting in the effort to make this video.

  • @markd288
    @markd288 4 місяці тому

    thank you very much, very straight forward tutorial

  • @sennabullet
    @sennabullet 2 роки тому

    Amazing tutorial! Really well presented. Thank you for sharing your knowledge.

  • @TimothyTocci
    @TimothyTocci 2 роки тому

    Really liked this - Thank you!

  • @SheepYT
    @SheepYT 3 роки тому

    You are killing it man. Great videos!

  • @m00nshi
    @m00nshi 3 роки тому +1

    very helpful, thank you you're great

  • @TedBarnett197
    @TedBarnett197 2 роки тому

    Excellent tutorial, with clear explanations for each step. A good way to learn Python at the same time!

  • @mastart4971
    @mastart4971 Рік тому

    Hallo, at 22.02 you copy paste "+ offset" to the next lines.... how did you do that.... ? that is amazing....
    and a question on the side... are you coming back to the bcon this year....? hope to see you again...

  • @BOSSdesigns
    @BOSSdesigns 3 роки тому

    we need more of this python tuts .. AWESOME

  • @timomuller4400
    @timomuller4400 3 роки тому +1

    Great colors, by the way...

  • @qarwill
    @qarwill 3 роки тому +5

    Sweet!! More stuff on scripting plzzz!!!

  • @indiecorner246
    @indiecorner246 2 роки тому

    This was a great help. Thanks a million.

  • @YeTianlinguist
    @YeTianlinguist 3 роки тому +2

    Thanks for the great tutorial! When I did the "for x in Cubes: x.scale = [0.5, 0.5, 0.5]" bit, if the original 100 cubes were created using duplicating objects, after running that line the cubes look exactly like the video (all resized smaller, but separated). However if the original 100 cubes were created using an array modifier and then separated by loose parts, after running that line the cubes all got smaller but were still stuck together. Why is that?

    • @ingvargrans2484
      @ingvargrans2484 2 роки тому +1

      My guess. Different origin point. When sticking together origin is at 0 0 0 for all.

  • @waylenamccully8863
    @waylenamccully8863 3 роки тому +1

    Thanks for this, it was fun!

  • @jasmeetsingh2666
    @jasmeetsingh2666 2 роки тому

    can you tell me how to get vertices into camera view as pixel coordinates.

  • @abhishekmanhotra7177
    @abhishekmanhotra7177 2 роки тому

    Thanks for this much much helpful, how we can control timeline using python commands ? I need a character doing live lipsync by reading the str from file or a variable, pls help.

  • @maggallery6124
    @maggallery6124 3 роки тому

    Love this Tutorial great work just what I needed

  • @nimnim5149
    @nimnim5149 3 роки тому

    loved the way you explained this ... :)

  • @MrPimonani
    @MrPimonani 2 роки тому

    Inspiring tutorial! Thanks!

  • @ratus69
    @ratus69 3 роки тому +4

    ahahah, the context is incorrect ! I've seen this error so often that I finally found out what it was about...but it's nicely explained, congrats ;)

  • @billsequins1490
    @billsequins1490 3 роки тому

    Loved the soundtrack!

  • @femiadeniran8910
    @femiadeniran8910 3 роки тому +1

    this is gorgeous

  • @stephen285
    @stephen285 Рік тому

    thanks for your vid - huge help!!!

  • @Studality.SteveX
    @Studality.SteveX 9 місяців тому

    Can you run the code in an non blender external ide and have a render as the output?

  • @rlcmark
    @rlcmark 3 роки тому

    Absolutely great stuff !!

  • @LeiffNathanAMendoza
    @LeiffNathanAMendoza 10 місяців тому

    TRUE
    import means get code functions computer language
    compiled values maybe updated or not but contains structured functions so we may not need to start from 0 and 1 i believe right?

  • @balajisofficialutube
    @balajisofficialutube 3 роки тому +1

    Hi Chris, I am python-dev and just started to learn blender last week, I am interested to learn animation could you please recommend any best tutorial for me. It would be great if you guide me on this, And one small doubt is that Cubes isn't part of the Collections, based on UI it should be like Collections[Cubes[Cube, cube 001, cube 002....]]. Thanks

  • @MrFeli100
    @MrFeli100 3 роки тому

    thank you for this tutorial, if you dont mind some constructive criticism: for me with headphones the background music was a tad to loud

  • @moyeramoyer8478
    @moyeramoyer8478 3 роки тому

    Can you make follow along tutorials? To learn the tools of blender and the scripting? How to draw and color in blender also using scripts?

  • @USAIsrUKEUVngrdBLRckOccupiedUA
    @USAIsrUKEUVngrdBLRckOccupiedUA 3 роки тому +2

    17:19 it could be confused with X axis. Maybe better to use "for cube in cubes: cube.scale(x,y,z)"? ;)

  • @adoniswalmsley-mccarthy6571
    @adoniswalmsley-mccarthy6571 3 роки тому

    Amazing! Very well done!

  • @Carfirto9373
    @Carfirto9373 Рік тому

    Having a hard time getting the texture coordinate to apply to every cube; when I pull up the shader editor it's only for one of the cubes. how can i fix this?

    • @semydev
      @semydev 10 місяців тому

      so you know for the future: f3 and then link materials, had the same issue at first but you just have to learn problem solving my man, think logally, im 14 and found it out, if theres a link modifiers why not the same for every other property? You can even link the entire object data! Hope this helped

  • @samduss4193
    @samduss4193 Рік тому

    Cg cookie does Python help out understanding the Geometry node logic ? because i suffer geometric node learning

  • @Technofier
    @Technofier 3 роки тому

    Very nice, wonderful introduction!

  • @RobertSpiller
    @RobertSpiller 2 роки тому

    I'm completely new so let me ask you...should I learn python first before adding blender?

  • @darshan_dodia
    @darshan_dodia 2 роки тому

    Very Interesting.

  • @__leoayres__
    @__leoayres__ 3 роки тому

    Thank you very much! This was very useful.

  • @USAIsrUKEUVngrdBLRckOccupiedUA
    @USAIsrUKEUVngrdBLRckOccupiedUA 3 роки тому +2

    Also someone can use dir()
    Example 1, dir(bpy)
    Example 2, dir(bpy.context)
    and so on.

  • @rajapk2669
    @rajapk2669 3 роки тому

    I dont get the list of options after typing 'bpy.' in Python console. What is the reason? I get the following error
    File "", line 1
    bpy.
    ^
    SyntaxError: invalid syntax

  • @LoporianIndustries
    @LoporianIndustries 3 роки тому

    Very enlightening.

  • @szczesny1229
    @szczesny1229 3 роки тому +1

    Thanks Bro... you help me

  • @Balbeees
    @Balbeees 3 роки тому

    The best!!!👍👍👍

  • @farimaholiaei
    @farimaholiaei 3 роки тому

    thanks a lot. I have 30 million dots in python and I want to animate them in blender, how can I do that? I mean blender gets crash every time I tried :)) do you have any solution for this?

  • @hunter8980
    @hunter8980 2 роки тому

    Wow! Very impressive!!!! I One question. I am a beginner, and this is my first lesson in Python. All commands under bpy.context. etc. - Are they same commands in Maya, Unity, Unreal Engine, Houdini and Cinema 4D OR these are exclusive python commands for Blender?

  • @NggFinn
    @NggFinn 3 роки тому

    Can I do the "arrays" collection on 2.68 v. as a group or I have other option to do it on this Blender version ? I've serach and can't find any solutions. Thanks for the tutorial, its so cool to learn a thing that is new for me !

  • @andrewray6413
    @andrewray6413 Рік тому

    I have struggles with the driver system. how can i replace that with python scripts?

  • @alwaysCuriousOne
    @alwaysCuriousOne 2 роки тому

    Clearly explained! Thanks!

  • @sameralhanbaly6877
    @sameralhanbaly6877 3 роки тому

    Thank you for your informative videos. How can I make python script runs automatically when I export Blender file by using game engine add on?

  • @GarviHere
    @GarviHere 3 роки тому +1

    HOW TO USE IF CONDITIONS LIKE DRIVERS BECAUSE DRIVERS ARE KIND OF LIMITED IN CASE OF RANGE OF MIN AND MAX VALUE AND VARIABLE TYPES

  • @scritorr
    @scritorr 3 роки тому

    Can we add two variables based on odd and even directory of the objects in the collection??
    Like for eg.
    Cube cube1
    Cube2 cube3
    Cube4 cube5
    . .
    . .
    . .
    Any advice ??

  • @alexandersolonskyi9458
    @alexandersolonskyi9458 2 роки тому

    Can you tell me the name of the track that is playing in the background?

  • @minthu6955
    @minthu6955 Рік тому

    hello...First of all, I can see a lot of ancient animation on you tube. Clearly, they might have viewing problems on their battles.. can you able to fix it using blendings skill..

  • @thoughtFormMax
    @thoughtFormMax 2 роки тому

    Awesome tutorial. Thank you.

  • @altimushastings8229
    @altimushastings8229 3 роки тому +1

    Could scripting automate repetitive actions in a rig?

    • @RomboutVersluijs
      @RomboutVersluijs 3 роки тому +1

      Yes, thats how Rigify works and many other rig addons. All made with python

  • @CraigHollabaugh
    @CraigHollabaugh 3 роки тому

    Hey, I learned a lot from this video but I have a question. You accomplished animation using with a py script that adds keyframes to the timeline. This is a fine. I want to perform an operation that calculates and sets force field values on every frame. Is there a blender pre-frame render callback that I can utilize to perform calculations on every frame? Thanks.

    • @stephenhumble7627
      @stephenhumble7627 3 роки тому

      Yes there is you can add a frame callback to a function that run every frame like this
      bpy.app.handlers.frame_change_pre.append( myframefunction )
      But i found that I cant get write access to global variables

    • @CraigHollabaugh
      @CraigHollabaugh 3 роки тому +2

      @@stephenhumble7627 hey thanks for the pointer.

  • @xaviervicens5217
    @xaviervicens5217 3 роки тому +2

    Nice but i had to use a lot my brain to flow it due to the lack of steps. Please do more

  • @silverman1438
    @silverman1438 3 роки тому

    thank you for great tutorials 🙏🏻

  • @minthu6955
    @minthu6955 Рік тому

    I strongly suggest ,top view is very useful and many ...( i mean , made a lot different game on a story sences)..

  • @guy_roh
    @guy_roh 2 роки тому

    Thanks for the video. I would lower the music next time though, it can be distracting at times.

  • @savergenio
    @savergenio 2 роки тому

    Excellent

  • @riccardomotter5706
    @riccardomotter5706 2 роки тому

    awesome!

  • @YuryPenkerton
    @YuryPenkerton 3 роки тому

    How to create button and assign "place origin" script?

  • @A_Train
    @A_Train 3 роки тому +6

    Awesome tutorial! My only critique would be to turn down or completely remove that music in the background.

  • @wehiird
    @wehiird Рік тому

    for some reason, my shader editor steps were not affecting my cubes. did i miss something?

  • @hilkokriel5659
    @hilkokriel5659 3 роки тому

    What a Legend!!

  • @Tom-ef1mz
    @Tom-ef1mz 3 роки тому

    awesome video, thanks!

  • @akarabdallatyf8422
    @akarabdallatyf8422 3 роки тому

    wizards of blender indeed

  • @sinankuniyilathoot5188
    @sinankuniyilathoot5188 3 роки тому

    super awsome