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 :)
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
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 ;)
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!
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!
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.
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.
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
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.
@ 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.
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?
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).
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`.
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...) :)
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
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
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.
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.
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...(;
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.
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...😊
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
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!
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.
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 :)
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
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 ;)
Super. Just what I was looking for.
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!
Love it! Looks like I'll finally understand scripting with this!
As long as pointers aren't involved.
Thanks a lot! I am trying some things in blender for my PhD and this is extremely helpful 😁
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!
Very clear and easy to understand
This guy’s a legend.
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.
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.
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.
@@mikem.8826 Glad it was helpful :)
Have fun with your phyton scripts!
This crucial comment should be pinned!
@@jornejongsma Glad you found the comment without a pin ;)
Thanks, your a legend
Great initiative. Blender will get more and more developers through this. Thanks for your efforts.
Wow! That was incredibly informative! Thanks so much!
These are great! Please keep going; I'm learning a lot from your teaching style.
Thanks for the detailed explanations and tips.
Great Work .Thank you for sharing
This was exactly what I was looking for. Thank you
Super.... Nice n thorough... But not too heavy.
Thank you so much for these crystal clear explanations! :)
Nice I like blender
Thanks so much! Really Awesome tutorial! You explain complex concept in an easy way, thanks again
Fantastic. Thank you Sybren
Excellent tutorial. Thank you for sharing.
Sir, You are the best teacher i have seen by far. Thanks a lot for all these free gems :)
Thanks!
thank you very much, i hope you go on this series...
I published the next chapter this morning ;-)
Awesome tutorial, thank you very much!
amazing video! thank you so much for the great effort and video and tutorial and everything! :)
Thank you for these great videos.
OMG, this video and the whole series is super helpful
Thanks! Really informative. Keep em coming!
Will do!
I like this. Blender is always ez 4 fun
Very cool! Thank you. #blender #programming
Awesome! Please make a playlist for Scripting for Artists. Thank you!
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
This is so usefull, thank you !
Nice, Thx you so much !
Amazing Video Thanks! I'm Waiting for more.
What is the difference between 'Tool' and 'Operator' in blender? Does tool have same ingredients?
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 ;-)
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.
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.
@ 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?
@@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.
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?
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).
Good stuff!
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)
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`.
@ thanks. It solved the problem. I named it without .py
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...) :)
I might, it's a good idea.
Yay!
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
so THAT's why messing with redo panel parameters is slow AF, blender ctrl-Z each time i change something.....
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
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?
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.
Isn't the redo feature an inefficient way to do it?
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.
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...(;
More Addon development, please!
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 :)
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
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 ?
Make sure you add `bl_options = {'REGISTER', 'UNDO'}` to the operator class. That should make it remember the property values for the next invocation.
return context.area.type == 'VIEW_3D'
🤯
Can you add any Error Handling?
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...😊
you forgot to add moths for more realism.
ian shot them all up to the space station...
Great ! thx alot.
BTW - such a sexy voice!
♥
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! :)
I have no idea what is going on...
This is part of a series; it helps to check it out from the start at cloud.blender.org/training/scripting-for-artists/
while yes:
open video
like
watch
profit
Please Create a Channel : Blender Script for Artist (for contribution)
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
He gets paid by the blender foundation. So if you want to contribute to him donate there
@@TotallyGamerJet Yes, add one channel for this
@@sandroavieira no need to create channel for it. You can donate to fund or make subscription to blender cloud