Questions tagged [development]

For coding questions about Blender development, including addon or script development with the Python API. Does not include general programming questions, non blender specific tasks or errors, nor compilation of Blender binaries.

Filter by
Sorted by
Tagged with
-1
votes
0answers
48 views

How do I make sure my addon can be triggered from multiple places? [closed]

I am working on a small add-on. As of now I can trigger it in the 3d viewport via a key but I want this addon to be avail in other areas like material nodes, and compositor. This is the class setup <...
0
votes
0answers
19 views

how to edit blenders UI icons? [duplicate]

I hate blenders icons and UI design, is there anyway I can edit / replace the icons blender is bundled with?
1
vote
0answers
20 views

Custom Nodes: How to make something happen when node is added

I'm creating a custom node tree and custom nodes following the blender script templates - https://github.com/blender/blender/blob/master/release/scripts/templates_py/custom_nodes.py The template does ...
0
votes
1answer
36 views

MixRGB vs math performance for single/greyscale values

I would like to know if MixRGB still calculates the three color channels if the input is a number or grayscale value. I am aware the result is the same either way but, this matters for simplifying and ...
0
votes
0answers
25 views

Issue using bpy with MATLAB's pyenv?

I'm not sure if this is the right place to ask this question... but I've been using bpy 2.82 (installed via pip) for awhile now for some of my research (I'm a PhD student). For a new project I'm on ...
4
votes
2answers
102 views

How can the linear-time cost of Blender's .children Python property be avoided in scenes with many objects?

While working on optimizing an add-on that creates/manages a large number of objects, I noticed that invocations of bpy_types.Object.children accounted for an ...
0
votes
0answers
27 views

Python: select a object by mouse position

Goal: Input a mouse position(x, y), select the object that visible in 3D viewport. It has a teplate can do that in blender: Templates > Python > Operator Modal View3D Raycast But it doesn't work ...
0
votes
0answers
22 views

How to know if updating blender will consist this patch?

I have the same issue0 as this user whom apparently provided a patch. My blender --version is ...
1
vote
1answer
49 views

How can I change the size of a modal operator popup dialog box?

I have a modal operator that invokes itself and is called from an AddonPreferences PT. I have been trying to scale_x without success. A row.scale_x works within the size of the entire modal, it is 3....
1
vote
1answer
69 views

Remove "Preferences:" label from AddonPreferences, no bl_label to " "?

I see no "bl_label" in "AddonPreferences" in the Blender API. One of the buttons in my AddonPreferences is "Preferences" and it would be nice to remove the default "...
0
votes
0answers
27 views

What areas of mathematics will help me in creating this add-on?

I want to create an add-on like this. It edits the selected edge, adds vertices to it ( as much as you need - the parameter will be adjusted ), creates the curvature we want. I want to make this add-...
1
vote
0answers
128 views

Cannot import nested Python module when writing an add-on

I am working on my first add-on, though I am pretty experienced with Python having written multiple apps using Django. My project structure looks like this: ...
1
vote
0answers
15 views

Info Node Eevee Integration [closed]

I am currently working on an integration for a length socket in the Hair Info node and got it working in cycles allready, but am currently struggling to find out where in the code the shader values ...
0
votes
0answers
19 views

Please help me understand how tiles work in Cycles

I would appreceiate some help in understanding how tiles work in Cycles. What I know so far: I figured out that they are managed by the class “TileManager” in /render/tile.h and that the session in /...
2
votes
2answers
62 views

Camera solving - what algorithm is used?

Note: this question is about how Blender is implemented, not how it's used. IIUC, Blender uses 8 points (or more) at two keyframes to calculate the position in space of the camera. What is the ...
0
votes
1answer
47 views

Blender addon development [closed]

I have a hard modelling addon idea for blender. I have no coding experience and have no idea where to even start with learning coding or what I need to learn. It's an add on building on an existing ...
1
vote
0answers
46 views

Blender Dev. Custom properties set hide or non editable

I was wondering if is a way to hide or set as non editable a custom property. In Phyton i can use: object[ label_property ] = value_property I need to said... ...
0
votes
2answers
71 views

Menu list keeps on growing every time I debug my Operator script [duplicate]

This is a question about the process of developing an addon rather than a specific error in the script. I'm creating an Operator that I want to show up in the UV Unwrap menu. I'm editing the script ...
2
votes
0answers
59 views

Help me understand the viewport render pipeline with cycles

I am trying to understand the pipeline that creates a rendered image in the viewport with cycles from start to finish in the blender/cycles source code. A little bit of context (Skip if not interested)...
0
votes
0answers
15 views

Using 3rd party modules and APIs in an add-on

I want to use 3rd party addons and APIs such as the YouTube API in blender. Is there any way to install these dependencies with the addon?
0
votes
1answer
51 views

Git Flow when coding for blender

I am sry if this is the wrong place to ask this or if this has already been answered elsewhere but I couldn't find it. I am confused about the git workflow when coding for blender: When I clone the ...
0
votes
0answers
15 views

How to run a compositor operation one after the other?

I'm currently trying to do a new Compositor node in C++ in blender and I need to wait for an operation to finish before the second one begins. Is it possible to do so? Thanks.
1
vote
1answer
157 views

Extending Sverchok - Development of new nodes in a separate addon

TL;DR: Is Sverchok designed to have their node list extended by third-party addons? If so, are there any formal templates to follow? I would like to play with the idea of developing new nodes for ...
1
vote
0answers
22 views

Is there a way to insert an operator into a menu?

I've written an add-on for saving files, and I want to insert it into the file>save menu. But if I use ...
1
vote
0answers
25 views

Viewport with external application?

Is it possible to display/draw the viewport of Blender in an another application? eg. Run blender in the background to display the wireframe view of a Blender file within another app? (Sorry if this ...
3
votes
0answers
48 views

How to add my own SECOND splash screen

I want to add a second splash screen that will appear when I start blender and in which I can add my own text. This is necessary for my addon.
1
vote
0answers
663 views

How the Blender 3D 2.8x Graphical User Interface is Made?

I want to know all the processes, functioning, involved languages, examples of code, and URLs to official sites with updated information if possible. NOTE: I'm not a programmer. I just want to know ...
0
votes
3answers
427 views

Looking for Blender source code of version 2.79.7

Where can I find the source code, corresponding to this exact build 2.79.7 blender-2.79 e045fe53f1b0 ? - https://download.blender.org/release/Blender2.79/latest/
0
votes
1answer
233 views

Accessing Blender's DNA Mesh struct via as_pointer()

How can I access the actual structure of a Mesh datablock in memory using the value returned from bpy.types.Mesh.as_pointer() In 2.79 Blender there used to be a possibility to do that by just passing ...
0
votes
0answers
60 views
1
vote
1answer
117 views

context.material.node_tree - context has no attribute to material?

I am trying to write an addon, I am making a node group that will be created with a single button however I have run into issues with these final lines: ...
2
votes
1answer
127 views

Query if modifier exists on listed objects [duplicate]

I'm new to Blender and the way it works with Python, so I still don't understand quite well the way the different commands work. But I wanna create a small tool where i can assign a modifier to a ...
2
votes
1answer
26 views

How to remove the upper tabs from the UI?(i.e Layout, Modeling, Sculpting etc.)

I want to streamline the UI of Blender from the source, so I was wondering where I could find the code concerning those tabs because all of them are very overwhelming and I would prefer to either ...
1
vote
2answers
152 views

How do I add an .obj file from a relative file location?

I need help adding an .obj file via scripting. I've tried using this line of code, but I'm having issues importing the obj file: ...
1
vote
0answers
49 views

How do you go about solving a bug in Blender: language selector in python console

For example, based on: Purpose of the languages selector in the Python Console I am familiar with git and reporting a bug. But my question is: How do you go about solving such a bug? Blender uses C/...
1
vote
0answers
36 views

Where is the core code that makes up Blender's ShapeKey? [closed]

I'm looking for the core C / C ++ code that makes up Blender's ShapeKey. I'm looking for Blender standard features, not add-ons. I know Blender is open source, but I'm an amateur about Blender. ...
1
vote
0answers
123 views

Equivalent of mesh.tessfaces.add, foreach_set in 2.8

I have the following code in an addon: ...
0
votes
0answers
42 views

Why do Blender objects have one ShapeKey each?

I am using Maya and Maya has BlendShape. Maya's BlendShape is almost the same as Blender's ShapeKey. And, Maya's BlendShape can transform multiple objects with one node. However, Blender's ShapeKey ...
0
votes
1answer
36 views

Add-On Dev: Open external file with default program

I was planning to create some simple help-like text or HTML documents in a local folder of my add-on, and provide "help" buttons on the panels to allow the user to access them from each section that ...
1
vote
0answers
13 views

Add-on Dev: Label Tool-tips?

I have a list of 12 'elements', where several check-boxes will relate to each element. The best way I can think of to handle this type of situation is to draw the check-boxes without labels, then ...
1
vote
0answers
125 views

Blender Python: Fixed size list of elements?

I need 4 instances of a property group sub-class in my primary class, and I want to access them (main.sub[*].x) based on an enum or index. Here's a fictitious (and ...
0
votes
0answers
517 views

How can I detect when the active or selected object changes using Python?

Is it possible to detect changes in object and collection selections or activations (bpy.context.object/collection)? I'm most interested in detecting changes in the ...
2
votes
0answers
187 views

How to check if mouse is in View3D Window from modal operator (2.80)

In the context of a modal operator, I would like to perform an operation when the left mouse button is clicked in the VIEW_3D area, ...
2
votes
1answer
1k views

Blender Python: Declare Property Group (on the stack?)

The questions keep coming, I know. I cannot find this simple answer anywhere. It may be because I'm not sure exactly how to phrase it in searches. Is it possible to declare a variable of a custom ...
0
votes
1answer
140 views

Blender Python: Property Description String Limit?

Is there a string length limit for the descriptions of properties? I assume there is. Does anyone know what that length is, and is there a safety mechanism to catch strings that are too long? ...
3
votes
0answers
125 views

Blender Python: Access Selected Collections?

How would I go about accessing the list of selected collections? It seems as though the selection state of collections is something specific to the Outliner? But I can't seem to find anything in the ...
0
votes
0answers
100 views

Blender Python: Print debugging text from functions

I'm looking for a simple text-print setup where I can see multiple text outputs (multiple lines of text), similar to writing to a text file while ending every statement with an end-of-line. A simple ...
0
votes
1answer
210 views

Blender Python: Generate custom property (due to error bpy_struct[key]: key "PropertyName" not found)?

Is there a way to force Blender to generate a custom property ahead of time? It looks like custom properties added to objects are only generated when the user changes them from the default in the UI, ...
1
vote
1answer
236 views

Blender Python: Convert Enum Flags into String?

It seems difficult to find any information about enum-flag usage and workflow. I'm familiar with bitflags and related operations, but the blender/python specifics are fun to figure out. Is there any ...
2
votes
1answer
575 views

Blender Python: setter not working

Can anyone help me understand why my setter works sometimes, then it will stop working, then start again? For example, I can referesh my add-on, the setter will not do anything, but throws no error, ...