I've made an export script, sorry to say much of it is copy paste coding.  It was working fine, but now:    There should be an extra menuitem 'Waveller' -- it was there and it was working, but it has just disappeared!  ARGH!  I must have done a nono while refactoring the code.  I have tried removing and adding in:    What is going wrong?  Here is my code:  bl_info = {     "name":         "Waveller",     "author":       "π",     "version":      (0, 0),     "blender":      (2, 6, 2),     "location":     "File &gt; Import-Export &gt; Waveller",     "description":  "Export Verts and Faces in Waveller Format",     "warning":      "",     "wiki_url":     "http://www.waveller.com",     "category":     "Import-Export" }  if "bpy" in locals():     import imp     if "export_waveller" in locals():         imp.reload( export_waveller ) else:     import bpy  from bpy.props import StringProperty, BoolProperty   class WavellerExporter( bpy.types.Operator ):     '''Save in Waveller format'''     bl_idname = "export_waveller.vert"     bl_label = "Export Waveller"      filepath = StringProperty(             subtype='FILE_PATH',             )      check_existing = BoolProperty(             name = "Check Existing",             description = "Check and warn on overwriting existing files",             default = True,             options = { 'HIDDEN' },             )      def execute( self, context ):         from . import export_waveller         export_waveller.export_all( self.filepath )          return {'FINISHED'}      def invoke( self, context, event ):         if not self.filepath:             self.filepath = bpy.data.filepath         # bpy.path.ensure_ext(bpy.data.filepath, "")         wm = context.window_manager         wm.fileselect_add( self )         return { 'RUNNING_MODAL' }   def menu_export( self, context ):     self.layout.operator(                          WavellerExporter.bl_idname,                          text = "Waveller"                          )   def register():     bpy.utils.register_module( __name__ )      bpy.types.INFO_MT_file_export.append( menu_export )   def unregister():     bpy.utils.unregister_module( __name__ )      bpy.types.INFO_MT_file_export.remove( menu_export )  if __name__ == "__main__":     register()   I did do a bit of fiddling, I remember changing:  bl_idname = "export_waveller.vert"   to  bl_idname = "export_waveller"   (changing it back doesn't fix this)  Well if anyone can put me right I'm very grateful. Also, corrections to any hideousnesses you see lurking in the code are most welcome!
121458
Since anything before and after the dot is arbitrary, why bother?  Related error:  RuntimeError: Error: Registering operator class: 'abcdefg', invalid bl_idname 'abcdefg', must contain 1 '.' character
19323
Blender has a built in template for adding a custom menu to the main header (INFO_HT_header). This can be found by going into the text editor under templates->Python->UI Menu.  Can I relocate this custom menu to be inserted between "Window" and "Help" sub menus? If so, how?
12887
this works in viewport but not in render.  import bpy from math import *  def frame_handler(scene):     z = scene.objects['Lift'].location[2]     scene.objects['Text'].data.body = str(floor(z / 4.0) - 2)  bpy.app.handlers.frame_change_pre.clear() bpy.app.handlers.frame_change_pre.append(frame_handler)   How to get it working in render? I've read  and changed from "bpy.data.objects" to "scene.objects" as already seen in the script. What am I missing? Blender v. 2.81.16  Edit. Tried that depsgraph thing mentioned in comments and changed to frame_change_post:  import bpy from bpy.app.handlers import persistent from math import *  @persistent  # maybe not relevant but doesn't harm anything? def frame_handler(scene, depsgraph):     z = scene.objects['Lift'].evaluated_get(depsgraph).location[2]     scene.objects['Text'].data.body = str(floor(z / 4.0) - 2)  bpy.app.handlers.frame_change_pre.clear() bpy.app.handlers.frame_change_post.clear() bpy.app.handlers.frame_change_post.append(frame_handler)   Now the Text doesn't show up at all in rendered (but works in viewport).
2769
I need to store additional information in a .blend file, that occurs only once per file. So, attaching it to, for example, bpy.types.Scene doesn't help.  Since bpy.data is an instance of bpy.types.BlendData, I tried attaching properties to bpy.types.BlendData. This failed:  &gt;&gt;&gt; bpy.types.BlendData.testProp = bpy.props.StringProperty() &gt;&gt;&gt; bpy.data.testProp (&lt;built-in function StringProperty&gt;, {})   Here, bpy.data.testProp is not a string, but some tuple, So it looks like registering properties on bpy.types.BlendData is not supported, like it is for bpy.types.Object:  &gt;&gt;&gt; bpy.types.Object.testProp = bpy.props.StringProperty() &gt;&gt;&gt; bpy.data.objects['Camera'].testProp ''   Is it somehow possible to attach properties to bpy.types.BlendData?  Are there other ways to register global data in a .blend file?
105664
How to find out the file path I dropped my Python script from? I want to call an external application for image post-processing from a Python script and I want the application to be in the same folder as the script. And I want Blender to automatically find that application.  I know about this question: "" but it's not the same
71061
I'm new at scripting.  I know that it's a basic question but I tried everything I could and nothing works.  So here's my problem:  I want to create a shortcut that automatically sets up a mirror modifier to an empty and then my custom pie menu opens with extra modifier options.  The only problem is that the menu will show me the option only of the selected object, and in my series of code I'm stuck at selecting the empty. I just want to select the object I defined as "OB" and it's done.  Here is the code:   import bpy  OB = bpy.context.selected_objects[0] bpy.ops.object.modifier_add(type='MIRROR') bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.empty_add(type='PLAIN_AXES', view_align=False, location=(bpy.context.scene.cursor_location)) bpy.context.object.name = "Mirror Axes" OB.modifiers["Mirror"].mirror_object = bpy.data.objects["Mirror Axes"]  # HERE I NEED THE CODE THAT SELECTS "OB"  open_menu("D Mirror Menu")   I tried:    bpy.context.scene.objects.active = OB  OB.select = True  bpy.context.selected_objects[0] = OB   bpy.context.object = OB    And many other methods, but nothing works, the empty is still selected !! and I dont know why.  thanks
46314
I was going through the "Getting started" API documentation for 2.68 since I'm guessing 2.70 is similar. I was testing out how to create my first script in 2.70 which I would like to save values which I will need later for future computations. I am using the Blender Panel UI for the user to modify the properties. Here is the basic code I'm stuck at from the HellowWorldPanel class. I was wondering why my property field isn't showing up in the Panel. (Edit: I'm sorry just to clarify this, the panel is showing up with my "Hello world!" label but my property called "bl_mine1" isn't showing up in the newly created panel)  Here is the code I am testing it with:  import bpy   class HelloWorldPanel(bpy.types.Panel):     """Creates a Panel in the Object properties window"""     bl_label = "Hello World Panel"     bl_idname = "OBJECT_PT_hello"     bl_space_type = 'PROPERTIES'     bl_region_type = 'WINDOW'     bl_context = "object"     bl_mine1 = bpy.props.FloatProperty(name = "MyProperty")      def draw(self, context):         layout = self.layout          obj = context.object         #Create New Row with text Hello World         row = layout.row()         row.label(text="Hello world!", icon='WORLD_DATA')         #Try showing a field box with MYProperty in it         row = layout.row()         row.prop(obj, "bl_mine1")  def register():     bpy.utils.register_class(HelloWorldPanel)   def unregister():     bpy.utils.unregister_class(HelloWorldPanel)   if __name__ == "__main__":     register()   Thanks for any input.
32879
VBScript doesn't appear to have a way to include a common file of functions.  Is there a way to achieve this?
77780
When I do an export and import the menus get transferred but I have to set the Site Navigation Menu manualy. Obviously it's only a small detail but can I ask is this a bug or expected behaviour and is there any way to include the site navigation menu selection in the export file.   The same thing is the case for custom menu widgets.
34090
I have a suite of several addons that I grouped together in a custom tab in Blender 2.7x, assigning the bl_category to the name of my custom suit:  class Panel1(bpy.types.Panel):  # Blender 2.7x     bl_label = "Panel 1"     bl_space_type = "VIEW_3D"     bl_region_type = "TOOLS"     bl_category = "MyToolSuite"   In Blender 2.80, I would like to group the tools together in a new properties tab.  How can I create a custom properties tab?  The following works to put my panel inside an already-existing tab, but does not work to create a new tab to hold all my panels:  class Panel1(bpy.types.Panel):     bl_label = "Panel 1"     bl_space_type = "PROPERTIES"     bl_region_type = "WINDOW"     # bl_context = "object"     # this puts my panel in the Object tab     bl_context = "MyToolSuite"  # this does nothing?   What else needs to be done to create a new tab in Blender 2.80?  Thanks!
61709
How it started: Wanted to view Code window and Spreadsheet at same time.  In XL VBEditor, Dragged Code window, Project window, and Properties around on screen to accomplish this.  Pushed a few toggle buttons such as View Code, Show/Hide folders to see what they did.  What occurred: Noticed that all modules still listed in project window, but when click on any one module name, the macro routines were missing on the module.  For the most part, some comments and the code 'Option Explicit' were still visible, but all the macros=subroutines gone.  More confusing:  SOMEtimes if I remove the code line 'Option Explicit', the macros on that particular module reappear.  MOST confusing:  If I find a module that shows one macro #1, I can try to write another macro (#2) on that module.  When I complete macro #2 which has form Sub NewMacroName(), ..., and End Sub,  the second macro #2 is present but the first macro #1 disappears! Remove Sub #2 and Sub #1 reappears  CONCLUSIONS SO FAR: The macros are clearly hidden, not actually gone. If I open the Object Browser, I can see a list of Global Classes (each one is a coding module). If a click on one Global Class, I see a list of  Class Members (each one is a subroutine/macro).    I thought it wouldn't be impossible to work in this configuration, but it will be quite inconvenient.  Getting back to the original configuration would be a blessing.  In reality, either macro routines can't see the personal workbook, or they can't see specific personal macro routines.  Tried to talk with Microsoft about this, but after 30 minutes a service person came back on and said no one is answering today, try again another day.  On a workday, I got back to MSFT.  MSFT wants $499 to even discuss the problem.  Ouch!  Setup:  Windows 10 up to date, HP laptop less 6 months old,  Excel from Office 2019, although many macros/modules written from Excel 2010.  Everything was fine until I started moving window panes around.  Thanks in Advance for your helpful insights.  ADDENDUM:  18March2019:  Gave up on fixing the above problem while I was out of state working on a project.  Hoped that reinstalling Excel 2019 once I got home would clear the problem.  No such luck.  Resolved that I would have to search the internet stem to stern for solutions.    One idea on the internet led me to: Excel: Developer: VBEditor: Tools tab: Macros: all my Macros listed  Decided to arbitrarily pick one macro and hit Edit button. Viola!  ALL of my macros became visible on all of the modules on all of my workbooks.  After less than an hour of replacing very minor code that was missing from personal code, I was back up and running normally.  Clearly clicking on Excel: Developer: VBEditor: Tools tab: Macros: Edit one macro Corrected something!  I figure that at least one expert on this web site recognizes what the problem was and will clue me in - so I don’t do it again!  Again, thanks in advance for your constructive replies!
55914
I'm trying to put together an add-on that contains two operators.  I've gotten each operator file to run properly independently, but I'm having trouble figuring out how to write an init.py file that would allow me to distribute them as a single add-on.  I've posted everything on Github.  The three files aren't too long:   I've read a few other threads, but nothing seems to work for me.  How can I get my init.py to register my operators properly?
17472
I am new to Blender and I am trying to find my way through its interface. I want to have several windows (I mean OS windows, not Blender windows). So I create a separate window by dragging splitter widget while holding Shift.  The problem is there are no splitter widgets in the newly created OS window. So I can't have multiple blender windows in it. The new window does not have a Layout type drop down menu either. So how do I add new Blender windows in a new OS window? (Sorry if I'm using the wrong terms, but hopefully its clear what I am trying to achieve).
97516
I have Apex Controller Class, say, LWCController and several methods inside of it, let's say Method1, Method2, Method3, Method4, Method5.   to      Use default import syntax to import an Apex method via the   @salesforce/apex scoped packages.        import { export1 , export2 } from "module-name";  import { foo , bar } from "module-name/path/to/specific/un-exported/file";  import { export1, export2 as alias2 , [...] } from "module-name";  import defaultExport, { export [ , [...] ] } from "module-name";      I am trying to import all of them simultaneously at the same line   import {Method1, Method2, Method3, Method4, Method5 } from '@salesforce/apex/LWCController';   And I receive the following errors   === Deploy Errors PROJECT PATH  ERRORS     N/A           [Line: 2, Col: 118] LWC1501: @salesforce/apex modules should have both class and method names. N/A           LWC1513: @salesforce/apex modules only support default imports.
124110
I'm trying to figure out a good workflow for developing scripts and add-ons in Blender. Here's what I'm currently doing as I try my luck with a PyNode add-on:   Open blender Create a text editor panel Open my script (external text file) Edit my script in a nice external editor Reload the script Save the .blend file Run the script   Now that I can see what my code does, this Blender instance has been modified, so I can't (make changes to my script and) run my script again. So I do this:   Close blender Open blender with the .blend from step 6 and repeat steps 4-7, over and over and over..   Is there a better workflow for this sort of thing?
50426
I try to add custom menus to the menus at the top bar in 2.80. The old INFO_HT_HEADER.append() doesn't work any more. I found TOPBAR_HT_upper_bar.append() to kind of do the trick but I get two menus, one after the workspace tabs (would preferably have it before but I guess that is a feature request separate from this) and one after the view layer menu. Am I using the wrong thing or is this a bug? Here's a super simple menu from an example which gives me the problem.  import bpy  class customMenu(bpy.types.Menu):     bl_label = "Custom Menu"     bl_idname = "view3D.custom_menu"  def draw(self, context):     layout = self.layout     layout.operator("mesh.primitive_cube_add")   def draw_item(self, context):     layout = self.layout     layout.menu(customMenu.bl_idname)  bpy.utils.register_class(customMenu) bpy.types.TOPBAR_HT_upper_bar.append(draw_item)
117876
I have a scene full of objects that won't export properly (I need either FBX or Obj, it's for Unity but that's irrelevant). After a lot of work I've been able to narrow down the problem to the fact that those objects are not being properly counted.. (see picture, objects counts 0..) The objects that are being counted export fine. :(    Any idea what is wrong with those objects?...  I have a work-around: joining a problematic object to a working  object, and then separating them again, but there are dozens of objects in that scene, it would take me days to fix all this like that.  Any help would be very welcome. :(