Category: Blender

How to make Blender UI look like Maya UI

Though I always use Maya, I got a chance to use Blender. So I tried to make Blender UI look like Maya’s one.

GOAL

To make Blender UI look like Maya’s one.

Environment

WIndows10
Blender2.80

Method1: Change Keymap

Click Edit > Preferences

from Blender

Open Preferences and select Keymap menu. Change the setting of the keymap from “Blender” to “Industry Compatible”.

from Blender

You can use some keys on Blender like on Maya. If there are any other points you don’t like, customize Keymap on this window.

You can’t use pie menu by pressing space key in this method. When you need pie menu, method2 “Maya Config Addon” is suitable.

Method2: Maya Config Addon

Download “Maya Config Addon For Blender 2.8”

You can get “Maya Config Addon For Blender 2.8” from gumroad.com. It’s an addon to change UI of Blender and add original menu and tools allow users to use Blender like Maya.

Unzip downloaded folder.

Install “Maya Config Addon For Blender 2.8

Reference : Maya Config Installation for Blender Builds

At first copy Blender for saving the current environment (Download .zip file of Blender from official site). Then place the unzipped file in the appropriate directory. I create a directory named “blender2.81maya”.

Copy MayaConfig_V3_4\config folder into the created directory(blender2.81maya\2.81).

Copy all python files in MayaConfig_V3_4 into blender2.81maya\2.81\scripts\startup to add some menu and functions.

Copy files in MayaConfig_V3_4\Theme into blender2.81maya\2.81\scripts\presets\interface_theme to change interface theme.

Start Blender

Click blender.exe in blender2.81maya folder when you use Maya-like Blender.

Import Maya-like keymaps

Open Edit>Preference.

from Blender

Select Keymap menu and click Import button.

from Blender

Select blender2.81maya\2.81\scripts\startup\fa_hotkeys.py. Then set the keymap to “Fa Hotkeys”

from Blender

Right-click or press space to open pie menu

from Blender

Postscript: How to invert zoom function in Blender

In Maya drag back is used to zoom, but in Blender it’s only drag in to zoom in.

Open Edit > References… menu and check “Invert Mouse Zoom Direction” on in Navigation section.

from Blender

[Blender] Warning: class CLASS_NAME contains a property which should be an annotation!

Warning Detail

When I install my custom addon in Blender2.80, the warning “class CLASS_NAME contains a property which should be an annotation!” occured. the class CLASS_NAME is an operator class that inherits bpy.types.Operator. And the class contains bpy.props properties as below.

class MY_OT_import_file(bpy.types.Operator):
    bl_idname = "my.import_file"
    bl_label = "My Import file"
    bl_description = "Custom import addon"
    bl_options = {'REGISTER', 'UNDO'}
    
    filepath = bpy.props.StringProperty(default="",subtype="FILE_PATH")
    
    def execute(self, context):
        ...

Cause

Reference: Blender 2.80: Addon API

Classes that contain properties from bpy.props now use Python’s type annotations (see PEP 526) and should be assigned using a single colon : in Blender 2.8x instead of equals = as was done in 2.7x

from Blender 2.80: Addon API

Correction

Use annotation in the class where warning occurred to set properties.

class MY_OT_import_file(bpy.types.Operator):
    bl_idname = "my.import_file"
    bl_label = "My Import file"
    bl_description = "Custom import addon"
    bl_options = {'REGISTER', 'UNDO'}
    
    filepath : bpy.props.StringProperty(default="",subtype="FILE_PATH")
    
    def execute(self, context):
        ...

Strange Warning with custom render Engine in Blender

Error

WARN (bpy.rna): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\python\intern\bpy_rna.c:1476 pyrna_enum_to_py: current value ‘3’ matches no enum in ‘SpaceNodeEditor’, ‘(null)’, ‘tree_type’

Similar reports

Custom RenderEngine: Shader Editor issues

There’s also a corner case when having the Shader editor visible (for example when Cycles is active) and then switching to a render engine that has bl_use_shading_nodes_custom=True: the icon for the editor will become blank, but the Shader editor remains visible. In the console I warnings in this case:
WARN (bpy.rna): ../source/blender/python/intern/bpy_rna.c:1451 pyrna_enum_to_py: current value ‘3’ matches no enum in ‘SpaceNodeEditor’, ‘(null)’, ‘tree_type’

https://developer.blender.org/T68473

SpaceNodeEditor error for CustomRenderEngine example

When I activate my custom render engine and switch to the Shading workspace, the node menus disappear and I get the error:
WARN (bpy.rna): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\python\intern\bpy_rna.c:1449 pyrna_enum_to_py: current value ‘0’ matches no enum in ‘SpaceNodeEditor’, ‘(null)’, ‘tree_type’

https://blenderartists.org/t/spacenodeeditor-error-for-customrenderengine-example/1162743

Cause

The cause is unclear. However, in my case, this error occurs when I access SpaceNodeEditor.tree_type in register() function with the flag “bl_use_shading_nodes_custom” set to True. My solution was one of the following:

  • To set SpaceNodeEditor.tree_type not to be accessed in register() function.
  • Set the flag “bl_use_shading_nodes_custom to False and use my node in ShaderEditor for existing Eevee, Cycles.

Thanks for more information and help…

What is Node and NodeTree in Blender?

GOAL

To explain the words “Node” and “NodeTree” in Blender. This article doesn’t contain detail of each nodes and their usage.

What is Node?

Node is a data processing mechanism that has zero or more input sockets and output sockets and processing function.

@ 2020 Nako

Nodes can be connected to each other.

@ 2020 Nako

Blender Nodes has Title, Sockets, Properties. Click Blender document for detail.

from Blender Node Editor

What is Node Tree

Node Tree is the whole structure consists of connected nodes.

Node type in Blender

There are three types of node trees and node editor in Blender, Shade Nodes, Composite Nodes and Texture Nodes. Please refer to Blender 2.80 Manual “Introduction” for detail.

Shader Nodes

Materials, lights and backgrounds are all defined using a network of shading nodes. These nodes output values, vectors, colors and shaders.

Blender Document: Shader Nodes (https://docs.blender.org/manual/en/dev/render/shader_nodes/introduction.html )

Composite Nodes

Compositing Nodes allow you to assemble and enhance an image (or movie). Using composition nodes, you can glue two pieces of footage together and colorize the whole sequence all at once.You can enhance the colors of a single image or an entire movie clip in a static manner or in a dynamic way that changes over time (as the clip progresses).

Blender Document: Compositing Nodes
( https://docs.blender.org/manual/en/dev/compositing/introduction.html )

Texture Nodes

Blender includes a node-based texture generation system, which enables textures creation by combining colors, patterns and other textures in the same way as shader writing with material nodes.

Blender Document: Texture Nodes
( https://docs.blender.org/manual/en/dev/editors/texture_node/introduction.html )

How to manipulate Nodes?

You can manipulate Nodes and create node network with different types of node editors. The basic operation method of node editor is here.

NodeTree in PythonAPI

The word “NodeTree” is also used in Blender PythonAPI( https://docs.blender.org/api/current/bpy.types.NodeTree.html ). bpy.types.NodeTree(ID) class, which has nodes attribute and links attribute, can get NodeTree specified by the ID. Nodes is bpy_prop_collection of nodesthat make up the node tree. Links is bpy_prop_collection of links to connect the nodes.