New answers tagged

0

For Blender 2.8+ First go to EDIT > Preferences >Add ons > Add Mesh : Extra Objects and then close the preferences window. Then In Object mode > Add > Mesh >Scroll down to Math Funtion > Regular Solid and then refer the below image


0

Unfortunately, to use the ProRender you have to change all the materials. This is because most of usual Blender shader nodes don't work or work incorrectly in ProRender. Instead, the render engine provides many own material nodes, and the most popular of them is RPR Uber shader which is used for PBR (Physically Based Rendering) and can do multiple things at ...


2

Using annotations rather than class properties It is now defined as an annotation. They are added to a key value dictionary __annotations__ on the class on which they are defined. Try something like TestProp.__annotations__["my_float_prop"] There is a generic Namespace class where can from argparse import Namespace props = Namespace(**TestProp....


0

One of the problems with blender right now when using particles system is that it is not easy (or nearly impossible) to make the instances avoid each other and not overlap, and thus cover maximum space. You Setup is great, I'm thinking that you have too much grass in your scene, probably more than you need to cover the surface. If you show me a screenshot of ...


3

I suppose one to go about this is to simply use modifiers. Position the window group about where it should be, and add a subdivision surface modifier set to simple (this will avoid unwanted deformation of the shape and allow the next modifier to work)), followed by simple deform. set to bend to the window object inside of the window group empty. Adjust the ...


4

So the answer to this question is not as straight forward as you would expect. Blender is not storing the selection order for objects. It only stores the active object and a sorted list of all other objects. So what you really need is a way to catch all selection events. One way to do that is using a modal operator like this: import bpy class ...


0

The addon is shipped with Blender :). It's called Blender ID authentication Enable Blender ID authentication addon in Preferences > Addons Log In Download and Install BlenderCloud add-on directly from the .zip file (don't unpack anything) Here's a screenshot of both Blender Cloud and Blender ID addon in my Blender.


2

Override the Save Mainfile operator Similarly to Add prefix to filename on "Save Blender File" which on a quick parse could be given the standard CtrlS shortcut. Another method is to override the save operator and simply pass the converted filepath to the save as operator. Proof of concept code below. Simply prints the filepath to be "...


1

import bpy import os def my_save_pre(context): print("Before Save") filename = bpy.path.basename(bpy.context.blend_data.filepath) outpath = os.path.dirname(bpy.path.abspath(bpy.data.filepath)) if filename is not "": new_name = os.path.join(outpath, filename.lower()) return bpy.ops.wm.save_mainfile(filepath=...


0

If you have downloaded a texture make sure you have an opacity map downloaded along with the texture and then you can follow this node setup:(Make sure to delete the default node setup of the image plane) this is an example for opacity map: the area marked black will appear transparent (WILL ONLY WORK IN CYCLES ENGINE)


1

Modularise your modules IMO rather than importing and cherry picking classes from submodules, instead can import the module and call its register method. For testing have placed the addon in a testing_testing folder, and given it the "Testing" category... will of-coarse need to rename to something more suitable. Notice the submodules are imported ...


1

Use a pointer property Can set up a pointer to any blender ID type objects, in this case bpy.types.Object instances of which can be found in bpy.data.objects collection. Assign the property to class import bpy from bpy.types import Object, Scene from bpy.props import PointerProperty Scene.target_obj = PointerProperty(type=Object) Test. >>> C....


0

It depends on what you need it for. You could set object.pass_index to unique number, or you could create your own custom property: Or do it with Python: object[some_custom_property] = "Some value"


0

and to answer my own question, finally I found it via Texteditor. The needed command is TOPBAR_MT_file_import e.g. bpy.types.TOPBAR_MT_file_import.append(menu_func_import)


0

Mystery solved. This line ./blender(_ZN5Eigen8IOFormatD1Ev+0xd3) [0x2041673] actually was the culprit. I debugged again using gdb and looked at the stacktrace there. This is the same line but from the gdb backtrace #0 0x0000000002041673 in Eigen::IOFormat::~IOFormat() (). The problem was I used Eigen::IOFormat HeavyMtxFmt(Eigen::FullPrecision, 0, ", &...


0

https://www.cgchan.com/static/doc/sceneskies/1.1/installation.html That's how to install an addon. It seems like software that has a business behind it, and this question is toward that software. I would ask them how to install.


-1

I tried bpy.types.Material['custom_float'] = bpy.props.FloatProperty(name="Test Property") Traceback (most recent call last): File "<blender_console>", line 1, in <module> TypeError: 'bpy_struct_meta_idprop' object does not support item assignment >>> bpy.types.Material[custom_float] = bpy.props.FloatProperty(name=...


0

Okay. Robert's answer was the key. Apparently the array in bpy.context.preferences.addons['cycles'].preferences.devices holds all devices that have ever been activated and saved in the blender gui. In order to get the current hardware and to update the devices array, you call: preferences = bpy.context.preferences.addons['cycles'].preferences cuda_devices, ...


2

You need to get a reference to that material, then its node tree, then the principled bsdf node, and finally the color input field. First make sure you have python tooltips enabled in your preferences : And then you can get the path to most fields just by hovering over it or with right click > Copy data path. See this question for more information. In ...


0

If the color in the Viewport Shading is set to Random it will crash, if it set to Material everything works fine.


4

You are missing one underscore under the registration above the last line in __main__ It reads if __name__ == "__main_": register() but is supposed to read if __name__ == "__main__": register()


1

I had the same problem in Blender 2.83. I suggest that you load the Blender Add-on factory settings by going to the "Edit" menu, Select the "gear" icon to get to "Preferences..." and after that, click on the lower left corner button besides "Save Preferences*" (it shows 3 horizontal lines through it). Then, by re-...


5

Adding a new op and / or overriding the old. It is not a menu you can append to using method shown in linked answer. It is a menu created from the enum items available for type property of origin set operator. layout.operator_menu_enum("object.origin_set", "type") Not impossible, would need to overwrite (rewrite) set origin operator, or blenders UI code, ...


2

Addon requires a Category Give an addon a category, for example sake and to match op name have given it the "Object" category, can use anything here, best to stick with those available if possible. IMO this is prob a mesh operator, that adds modifiers to mesh objects bl_info = { "name": "DC Mirror", "version": (1, 0), "blender": (2, 90, 0), ...


0

Try disableing it and then re-enable it. Do restart in method. i'm using MAC and it never showed me any error. It worked smoothly. just pressed Ctrl+Shift and click on any node. What is appearing in "Quick Access" in "N" menu under "Node Wrangler" options, in your Blender Node Editor.


0

I have found an easiest method. In this example the addon has two modules - main and operator __init__.py: bl_info = { # Your regular bl_info goes here. } # This is essential part if "bpy" in locals(): import importlib importlib.reload(main) importlib.reload(operator) else: import bpy from . import main from . import operator ...


0

You dont need all this. Just import from __init__.py like this: from . mymodule import * Or from a subfolder from . subdir.mymodule import *


0

After much messing around I found I was doing two things wrong. The first was I should have been importing graph tool with from graph_tool.all import graph_tool as gt instead of import graph_tool as gt. The second problem I was having was not symlinking correctly. Instead of symlinking the whole site-packages I found that only symlinking what I actually ...


Top 50 recent answers are included