I need to select the strips at the playhead through python, so I can do different things, like delete and close the gap. I've posted an image to show that the active clip might be somewhere else, and there might be multiple strips where the playhead is. I know how to get the current frame bpy.context.scene.frame_current and I can find bpy.context.scene.active_clip but i can't see any options to select the playhead strips.
120930
I need to detect scene strips in the VSE on the current frame, meaning on what strip is the play head at this moment? However I can't seem to find the right type(?) to attach the ".strip_elem_from_frame" function to, in order to get the info/name/type on the strip. Here's a test script which must run in a screen with a sequencer with scene and movie strips in it:  import bpy  #update at frame change def currentStrip(*pArgs):     print("Current Strip: "+str(bpy.context.sequences[0].strip_elem_from_frame(bpy.context.scene.frame_current))) #Doesn't detect any strips at all.  #add frame change handle def attachAsHandler():     for f in bpy.app.handlers.frame_change_pre:         bpy.app.handlers.frame_change_pre.remove(f)     bpy.app.handlers.frame_change_pre.append(currentStrip)  currentStrip() attachAsHandler()
112149
How could I select one vertex from my mesh if I know ID of that vertex? I enabled bpy.app.debug = True and I can see all IDs but cant find a specific one.
46202
I'm trying to amend an addon that I made for Blender 2.7X to work with Blender 2.80. The problem is with  bpy.context.scene.objects.active = some_object   This is how I used to set an active object, the problem is, active property was removed in the new API!,reading other Q&amp;As, I found 2 suggestions:  bpy.context.object   and  bpy.context.active_object    The problem is, both of these will return the already active object, but when I try to use them this way:  bpy.context.active_object = some_object   or   bpy.context.object = some_object   I'm getting an AttributeError: property is read-only!  I tried the documentation with no luck!  EDIT:  According to Blender 2.8 WIKI API changes:   bpy.context.scene.objects.active   changed into  bpy.context.render_layer.objects.active   This doesn't work, AttributeError: 'Context' object has no attribute 'render_layer'
23121
Is there a Python command that will allow me to set the camera clip end for viewing my objects in Blender (via scripting)? According to  the "bpy.context.space_data" variable is read-only.
11170
Often I want to just point the camera to an object or a specific area in my scene to get an idea of how it'll look in the render. What's the most painless hassle-free way to do this in blender?  A quick search on the blender wiki does not lend itself to easy look-up due to all the noise in the search result.  This question could probably be broken down into these two main questions:   How do I point a selected camera to the current 3d-cursor location in the scene? How do I point the selected camera to the currently selected object(s) in the scene?
94789
I sometimes like to view my models in wireframe mode, but it doesn't show individual faces, only lines representing the general formation of the object. With subdivisions (especially) this does not achieve what I'd really like to see, which is more of a &quot;blueprint&quot; look. Solid view:  Wireframe:  What I want (except this is solid):  What I want (except, this is edit mode, not an actual drawmode):  Is there a draw mode that can achieve this? P.S.: I don't mind if the answer uses Python. I'm not a Python programmer but I'd be able to understand the code (I've got programming experience and have used Python on and off before).
37062
In the VSE, I have a scene strip, but I cannot change the opacity.  It just snaps back to the last value it was keyframed at as soon as I alter it.  (Blender 2.69)
99054
I'm still new with python and scripting. I tried editing the . Since I'm exporting tons of object groups, I need each of scene collection or selected objects to be exported as an :  import bpy import os  # get the path where the blend file is located basedir = bpy.path.abspath('//')  # deselect all objects # bpy.ops.object.select_all(action='DESELECT')      # loop through all the objects in the scene scene = bpy.context.scene for ob in scene.objects:     # make the current object active and select it     scene.objects.active = ob     ob.select = True      # make sure that we only export meshes     if ob.type == 'MESH':         # export the currently selected object to its own file based on its name         bpy.ops.export_scene.gltf(                 filepath=os.path.join(basedir+'gltf-individual', ob.name + '.gltf'),                 use_selection=True,                 )     # deselect the object and move on to another if any more are left     ob.select = False   Q: Can someone help me with this?
115975
i have this simple function in the Blender text editor : import bpy bpy.ops.object.select_pattern(pattern=&quot;Cube?&quot;) bpy.ops.object.select_pattern(pattern=&quot;Sphere?&quot;)  I just simply want to run this function using a shortcut. How can i bind a shortcut to it ? Thanks.
112052
I selected some area and I need to get selected only border of this area. Does anyone know any function to achieve that? Or a script?
52758
I want my script to perform actions on a particular layer.  Online advice I've found so far suggests using the iface method "setActiveLayer()".  Makes sense based on the name alone.    Scenario:  In the Layers window I have a layer named "Province" highlighted (active).  Then I run the following code:  &gt;&gt;&gt; vl = QgsMapLayerRegistry.instance().mapLayer( 'na_roads_Prov' ) &gt;&gt;&gt; iface.setActiveLayer(vl)   Console Output = False  As far as I understand executing this code in the console should move the highlighted "active layer" from "Province" to 'na_roads_Prov'.  Yes?  Instead the "Province" layer remains highlighted as active, and the console output says "False".  Any ideas?  Am I not referring to the layer correctly?
73262
If you create a scene for the Video Sequence Editor and start working on a project Blender will render the output from the VSE. But if you want to later switch it to render your 3D scene again (the camera output) where is the setting to select the source?  Usually I keep a separate .blend for VSE edits so I don't need to switch, but I feel like I ought to learn how to do this as it's pretty basic. I would expect to find this in the Render context but I see no place to specify the source.  Thanks.
42193
The bar at the very bottom of the screen went away while I was trying to make an intro, its the one with all the frames and options of view, marker, frame, playback, start, end, and the play button. Please help me, how do I get it back!?
58547
I plan on building a game where enemies are randomly generated throughout the game. I plan on using an empty to run a Python script where it will add a predefined object at a given position (using random.randint to place them randomly around the map).  Is there a specific Python command where I can say something like "Create this object at this given x,y,z position"?  If so, can you please tell me what it is and how to use it?  Also, what is the difference between a Module and a Script in the Python controller?  Thanks so much for your help!  Alternatively, is there a Python function that sets an object's X,Y,Z coordinates?  If so, the empty can jump around randomly dropping enemies off at it's position.
45452
I have an animation with lots of text objects flying about.  I'd like to render it with motion blur and stuff, but there are quite a few long sections where nothing is moving so that the text can be read. In these sections the render output (should) remain exactly the same.  Since it's pretty pointless to render the same image over and over, is there some way to automatically detect and skip those sections, only rendering one frame until there are more keyframes?
122022
Is there a way in bpy to get a list of all selected files from the file browser?  I have this code, but it is only for the active file selection:  selectedFile = '' for screenArea in bpy.context.window.screen.areas:    if screenArea.type == 'FILE_BROWSER':         params = screenArea.spaces[0].params         selectedFile = os.path.join(params.directory, params.filename)         break
87761
Currently, (and this is even mentioned in the current , Chapter 19), in-frame notes are ordered such that those notes that used the "[item]" option are all bunched up at the end of the subject note page.  Is there a relatively painless way to change this so that you can list said "[item]" notes, say, in the middle of the notes page?  Here is a MWE to show what I'm looking for:  \documentclass{beamer}  \setbeameroption{show notes}  \begin{document}  \begin{frame}     This is boring.     \note{I want this to be line 1\par}     \note[item]{I want this to be line 2}     \note{I want this to be line 3} \end{frame}  \end{document}   The output (notes page) of this code is:    WHAT FINALLY WORKED FOR ME:  Please see the selected answer below, plus the comments attached to same, for the explanation behind the following code.  Also note that the indentation problem (as per ted_kingdom's comment below said selected answer) still exists.  \documentclass{beamer} \setbeameroption{show notes} \begin{document}   \makeatletter \def\myrenewcommand{\@ifnextchar&lt;{\beamer@myrenewcom}{\beamer@origrenewcommand}} \def\beamer@myrenewcom&lt;&gt;{\@star@or@long\beamer@myrenew@command} \def\beamer@myrenew@command#1{%   \expandafter\def\expandafter\beamer@name\expandafter{\csname @orig\string#1\endcsname}%   \expandafter\let\beamer@name=#1\relax% \@ifnextchar[{\beamer@@myrenewcom{#1}}{\beamer@myrenewcomnoopt {#1}{0}}} \def\beamer@@myrenewcom#1[#2]{\@ifnextchar[{\beamer@myrenewcomopt{#1}{#2}}{\beamer@myrenewcomnoopt{#1}{#2}}} \long\def\beamer@myrenewcomnoopt#1#2#3{%   \ifnum#2=0\relax%     \expandafter\def\expandafter#1\expandafter{\expandafter\beamer@sortzero\expandafter{\csname beamerx@\string#1\endcsname}}%   \else     \expandafter\def\expandafter#1\expandafter{\expandafter\beamer@sort\expandafter{\csname beamerx@\string#1\endcsname}{#2}}%   \fi%   \beamer@argscount=#2\relax%   \advance\beamer@argscount by 1\relax%   \expandafter\renewcommand\csname beamerx@\string#1\endcsname[\beamer@argscount]{#3}% } \long\def\beamer@myrenewcomopt#1#2[#3]#4{%   \expandafter\def\expandafter#1\expandafter{\expandafter\beamer@presort\expandafter{\csname beamerx@\string#1\endcsname}{#2}{#3}}%   \beamer@argscount=#2\relax%   \advance\beamer@argscount by 1\relax%   \expandafter\renewcommand\csname beamerx@\string#1\endcsname[\beamer@argscount]{#4}% }   \makeatletter \myrenewcommand&lt;&gt;{\beamer@inframenote}[2][]{%   \ifbeamer@inlecture%     \only#3{%       \def\beamer@temp{#1}%       \ifx\beamer@temp\beamer@itemtext%         \expandafter\gdef\expandafter\beamer@notes%         \expandafter{\beamer@notes\par\hskip30pt$\bullet$\hskip10pt#2\par}%       \else         \expandafter\gdef\expandafter\beamer@notes%          \expandafter{\beamer@notes#2\par}       \fi%     }%   \fi%   }  \begin{frame}     This is boring.     \note{I want this to be line 1}     \note[item]{I want this to be line 2}     \note[item]{I want this to be line 3}     \note{I want this to be line 4}     \note{I want this to be line 5}     \note[item]{I want this to be line 6}     \note[item]{I want this to be line 7}     \note{I want this to be line 8}     \note{I want this to be line 9}     \note[item]{I want this to be line 10} \end{frame}  \end{document}