Activity
Mon
Wed
Fri
Sun
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
What is this?
Less
More

Memberships

CG Python Academy (Free)

1k members • Free

36 contributions to CG Python Academy (Free)
Question?
I don't know about any coding...can I start directly with Python? Or should I have to learn something first?
2 likes • 6d
I recommend to start with something like this page: https://www.w3schools.com/python/ Step by step with easy steps and you can try it out by yourself directly on the page.
🎄 December Mini-Project Challenge — Make Progress Before the New Year! 🎄
December is usually a quieter month for many of us, a bit more breathing room, a bit less chaos. Which makes it a perfect time to dust off those Blender Python ideas we've been putting off all year. @Gregory Tada Tada had a great suggestion: 👉 Let's make December a month-long challenge to make progress on a small Blender Python project you've been meaning to tackle. It doesn't have to be big. It doesn't have to be polished. It just has to be something you've wanted to try like a tool, an operator, a little automation, a viewport helper, updating your add-ons/scripts to run in Blender 5.0, anything! 🧰 How to Join If you have a project in mind that you want to work on during December, share it in the comments! Tell us what you want to build, fix, or explore. Even if it's just a rough idea. 🗓️ Throughout the Month We'll encourage each other. We'll share tips and help out. And by the end of December, everyone should have something cool to show or share, no matter how small. Let's end 2025 with momentum, and a fun little Python accomplishment. Looking forward to seeing what you all take on! 🚀
🎄 December Mini-Project Challenge — Make Progress Before the New Year! 🎄
3 likes • 7d
Too late... :) I already updated my two Blender addons for Blender 5.0 last weekend and uploaded them. And my other running project is a bit too big... already working on it since several months, will take some more, I guess, as I now only have time at weekend for that. Beside other projects like creating wooden things on my lathe..
Hello
​I want to become a proficient programmer in the Python language, and I aim to pursue a career in cybersecurity and create a reliable, ethical AI agent whose primary role is to help people protect their businesses—the businesses they have sacrificed their time, money, and knowledge to build. ​My English is weak, which is why I'm using a translator (GPT). ​Thank you, and I truly need someone to guide me with the courses and modules; I will never forget this favor.
0 likes • 20d
Great vision! And how could Blender help you with this? ;)
1 like • 19d
@Mohamed Cherif Python is good for data science, also with using (or programming) AI modules, i.e. machine learning and so on. Programming things about cyber security, or creating an AI agent is something for VERY experienced programmers so you should at least have a very good general programming knowledge. Usually for such things you would need to work with C++ and assembler, not Python. And surely not Blender as this is a 3D graphic program which has nothing to do with cyber security or AI agents. So if you want to start a career, first you should learn to program in general. Python is good for that as the language offers a lot and is not too hard to learn. But it also would not really help you with your target. You should start learning C++, which is a very low level programming language but you can do everything with it, similar to assembler (but this is more for rare time-critical very processor specific things). C++ is not the easiest language but if you manage to learn that your career in prorgramming is open for really any direction (including writing modules for Blender, if you want). Cyber security which should work well needs a LOT knowledge about software, hardware, drivers, interactions between them, protocols and many more. Needs a long-time experience before you can start creating something which really secures something. If you want to do that, read books about hacking methods, you'll find out if cyber security is something for you. An AI agent is an addon for an AI which is able to interact with something on the machine, i.e. open a mail, read it, learn to make an entry in your calendar and answers mails automatically. Writing an agent could be hard, especially without exact knowledge about how to access the AI in the background. Which is usually not an AI you programmed by yourself, so you also need to be careful about what you allow an agent and what happens with the data. If you manage to program your own AI I think you're already a top-programmer.
Heed help with Export FBX operator
I'm trying to build an operator that moves selected objects to world origin (ignoring Z axis), runs 'Export FBX' operator and after execution (either finished or cancelled) the objects should move back to their original locations. The problem that 'Export FBX' is a modal operator and if I write 'move objects back' code after bpy.ops.export_scene.fbx('INVOKE_DEFAULT') , it executes right after the operator was called even if user haven't exported objects yet. So pretty much the objects should stay at world center until user clicks 'Export FBX' or 'Cancel' button because objects need to have their pivot points at the center when I import them to other programs such as Unreal. I can't wrap my head around how to do it. I was thinking of something like "if bpy.ops.export_scene.fbx('INVOKE_DEFAULT') returns {"FINISHED"} or {"CANCELLED"} -> do the thing", but it returns {"RUNNING_MODAL"} on call. Hope it makes sense :D Help please! I'll try to attach the code in comments as it says 'failed to upload an image' when I try to attach .py file here.
1 like • Sep 25
I haven't looked into your code, but if "Export FBX" is your own operator you could set a global flag variable in the modal operator indicating that it started. In the calling procedure you could write a loop to wait that the modal operator resets the flag when it ends and then move the object back. It's just an idea, don't know if that works for you or if I understood the problem right.
Help debugging my addon
Hey its been a while, but I have been spending that time modifying my add-on a lot. I would like for you guys to download the add-on and see if there are any bugs or any other funny stuff going on. V-------------------------------------------------------------------------------------------------------------------------------------------------------------- What is the addon? The addon is an attribute editor menu, making it so that you can edit attribute values all in one place without going to Mesh > SetAttribute every time you want to edit a single attribute value. Saves time and reduces clicks. How to download it: Download the attached ZIP file, once you have done so go into blender Preferences > Get Extensions and in the top right hand corner there should be a down arrow. Click it then click on "Install from Disk" and select the addon zip and restart Blender. How to use it: - Once installed open the side bar or press N and you should see a tab called "AttributeMenu". - In "Attribute Props Panel" click on "add new attribute". - There you can select from a list of attributes. If you don't have any attributes, go to the properties panel and go to Data > Attribute and create a new attribute. - When you select an attribute from the list of attributes, you'll be able to see and edit it in the "Attribute Props Panel" Make sure that the attribute data type is either an int or bool or float data type, otherwise it wont work (I am planning to add support for different data types in the future). If you don't see the attribute in the property panel then its is likely in a different domain. So if you add an attribute, which domain is in face, but you are in vertex mode, just make sure to go to face select mode, and you should see the attribute in the panel. ----------------------------------------------------------------------------------------------------------------------------------------------------------------- Like I said I would like help debugging and finding errors and bugs n stuff, also new ideas on how to improve the addon would be greatly appreciated as well!
0 likes • Aug 12
As I wrote in the code example above: You can either use a poll parameter which returns itself a true/false state, you can create a function for that in the class of the property and call it with lambda or you can define an independent function outside of the property class and specify it's name only in the "poll"-parameter. This only want to have a bool decision back. If poll=True then it is enabled, otherwise not. So you need to compare the selection mode with the attribute you want to display and with the variable which checks if it is visible or not currently - same logic.
1 like • Aug 12
Seems that the poll function does only work for PointerProperties - sorry. https://docs.blender.org/api/current/bpy.props.html#bpy.props.FloatProperty (search for "poll" here) I only used it here so I only expected that the other props have this, too... :) You could do that using the "enabled" property of layout/row in the "draw" method, like so: def draw(self, context): layout = self.layout # define condition is_enabled = context.object is not None # example # Draw Property row = layout.row() row.enabled = is_enabled row.prop(context.scene, "my_float_property") I have asked Claude to generate a quick example and it returned this one (see attachment): Copy that into the script window in Blender and start it. It will create three selection mode icons in a new panel named "misc". Depending on which you select it shows all you have selected. It is independent of the selection mode of the 3D editor. So if you are in face mode and select one face of a cube, and in the panel in vertex mode it also shows that 4 vertices are selected. Not bad, Claude! Maybe of help for you? You could use that as template to only show the attributes of the object belonging to the same domain.
1-10 of 36
Christian Coppes
5
330points to level up
@christian-coppes-1848
Database developer and Blender/Python beginner

Active 2d ago
Joined Dec 1, 2024
Powered by