3 votes

Python: Check if an object is selected

Print a message when the user selected a specific object ...
X Y's user avatar
  • 5,313
2 votes
Accepted

How to hide some properties in UNDO window *depending on the execute() result

Use a Custom Interface. ...
Leander's user avatar
  • 26.8k
2 votes

Python: Check if an object is selected

You can also use bpy.types.Object.select_get : import bpy obj = bpy.data.objects["Cube"] is_obj_selected = obj.select_get()
Gorgious's user avatar
  • 30.8k
2 votes

Python: Check if an object is selected

You can use bpy.context.selected_objects. Here is some sample code: ...
Kid with Glasses's user avatar
1 vote
Accepted

How to override context area using script when running Blender using Command Line

...
unwave's user avatar
  • 2,333
1 vote
Accepted

How can I center view to selected item via python?

You need to be in the correct context area which is VIEW_3D. Read more about context here. ...
Harry McKenzie's user avatar
1 vote
Accepted

How to reload a module which was imported via importlib.import_module()?

from . import test_msg is equivalent to test_msg = importlib.import_module('.test_msg', __package__) or ...
unwave's user avatar
  • 2,333
1 vote

Python automate Assign parent relation and keep transform

I tried Chebhou's method but it didn't work as expected. To keep an object's position, rotation, and scale unchanged when changing its parent, you need to multiply the new parent's inverse matrix with ...
Niv Ben Salmon's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible