3

obj.name gives you the object name. obj.data.name gives you mesh name. And yes, AFAIK there can be only one mesh per object. However there can be multiple objects sharing the same mesh data block.


3

There is no "simple" way to do anything in numerical analysis. However, the tasks can be laid out straightforwardly. EDIT: This idea is a brain-fart because it doesn't distinguish parallel planes. The Internet must never forget though. Pile on, people. How about this: generate an array of normalized normal vectors (not vectors in the dynamic array sense; ...


2

New shortcuts can be added in the preferences Edit > Preferences > Keymap. With the keymap tab open, navigate to the Window category of shortcuts. Click the Add New button to create a new shortcut. The operator for reloading scripts is bpy.ops.script.reload() therefore the identifier for the shortcut is script.reload. Click on the shortcut field and press ...


2

The good answer stays for hatinacat2000. Though, the implementation could be optimized from the code given in the question, and stay in $O(n^3)$, but does not need to allocate combinations (and that can spare a lot of memory if there are many points). It considers parallel planes as we progressively check best plane containing first point, then second ...


1

This can be solved by checking whether the timer has been set before. Unfortunately the example has a little confusing mistake. self._timer = wm.event_timer_add(0.1, window=context.window) does not assign a value to the class attribute _timer as declared at the beginning of the class. Instead it creates an instance attribute named _timer. You can see this by ...


1

The following example shows how to create multiple operators each with their specific function. It only shows three buttons, but the concept remains the same for an arbitrary number of buttons and their underlying operators. The panel is created in the sidebar of the 3D View which can be opened with N. I hope I haven't misunderstood what you're trying to ...


1

You need to indent your call to bpy.ops.wm.modal_test_operator() so it will only be executed when the code as run as a script, which is the case when __name__ == "__main__". Otherwise you're trying to access blend data when the add-on isn't registered, which results in the exception you're seeing. For more information about this topic take a look at this ...


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