Aldrik
  • Member for 8 years, 7 months
  • Last seen more than 8 years ago
Align view to axis during modal operator?
1 votes

No. You'll have to accept your cuts, align the view, and then continue.

View answer
Can modifiers be computed and applied from the command line?
Accepted answer
4 votes

You'd have to use bpy.ops.object.modifier_apply, e.g. import bpy for obj in bpy.context.scene.objects: bpy.context.scene.objects.active = obj count = 1 length = len(obj.modifiers) ...

View answer
Why avoid bpy.ops?
7 votes

I'll just quote ideasman42: When possible I would avoid using bpy.ops, These wrap tools in a way that relies on the context and dont have a good way to pass args and return results to scripts. If ...

View answer
How can I connect several links in the input node?
Accepted answer
3 votes

Links are created using node_tree.links.new: new(input, output, verify_limits=True) Add a node link to this node tree Parameters: input (NodeSocket, (never None)) – The input ...

View answer
Is there way to control opacity of selection/active color in 3DView?
Accepted answer
1 votes

No, this feature isn't currently available. Workarounds can be found in following questions: Remove selection overlays when Editing UVs?

View answer
How can a Method from a startup Script be invoked?
2 votes

It seem what your really after is a way to define your own convenience imports/variables. Looking at scripts/modules/console_python.py, I came up with the following hack (save as startup script for ...

View answer
How could a single Python script run when Blender is started?
Accepted answer
14 votes

As documented in the manual, you can save your script in the scripts/startup/ directory with a .py extension and it will be automatically imported on startup.

View answer
Import camera animation from Maya 2014
3 votes

OpenCOLLADA supports animated cameras and the SDK includes a Maya plug-in. Setting the active camera might need to be redone manually.

View answer
Is there a way to restart a modified addon?
2 votes

To enable and disable via the API use bpy.ops.wm.addon_enable, and bpy.ops.wm.addon_disable respectively.

View answer
Is it possible to deselect freestyle edges?
Accepted answer
7 votes

In Edit Mode select the edge and Mark Freestyle Edge Ctrl+E,F In the Properties window > Render Layers > Freestyle Line Set: Enable Logical AND. Enable Edge Mark and the (Exclude Edge marks) X button ...

View answer
How can I do a one-time Initialization?
2 votes

Rather than testing values, it's more pythonic to just try and deal with exception(s) when they arise (EAFP). You can also declare and assign your global variable in one step like so: def poll(): ...

View answer
Change UV Positions for Linked Objects?
Accepted answer
3 votes

Use the UV Warp modifier: UV Warp uses 2 objects to define a transformation which is applied to the UV coordinates. Alternatively it can be done in the material using the Mapping node (for BI see ...

View answer
Can I save blend files with lzma instead of gzip?
5 votes

No, blend file compression is currently limited to gzip. LZMA support is only for pointcache compression. If this is needed, I'd suggest looking into using a file-system that supports compression (...

View answer
Why will audio and video not sync in rendered video file?
Accepted answer
2 votes

I loaded up your syncTest01002Rev.avi file and playback wasn't in sync. Inspecting the file with ffmpeg gets the following message: "[mpeg4 @ 0x19ecc00] Invalid and inefficient vfw-avi packed B frames ...

View answer
Read image metadata produced by Blender?
Accepted answer
8 votes

Update: As of 2.75 this data is saved for all renders. This info is written to the header of the file and only for auto saved renders (animations and command-line renders). For info on how to read ...

View answer
Is it possible to get render time per tile?
3 votes

from datetime import datetime from bpy.app import handlers TIMER = None def start_timer(scene): global TIMER TIMER = datetime.now() def elapsed(dummy): print("Elapsed:", datetime.now() -...

View answer
How to add keyframes for multiple objects at once
9 votes

Keying Sets As Fweeb said, the standard way of handling this is using Keying Sets. Accessible in the 3D View under Object > Animation > Insert Keyframe… (I). There's a limited set by default but ...

View answer
How can we store EXIF-type metadata in renders?
Accepted answer
1 votes

Blender can handle the complete pipe line from modelling to video editing. In such a workflow the data is always available and doesn't need to be exported elsewhere. For comparing renders the norm is ...

View answer
Joining several splines
3 votes

Natively the only way to join splines is using Make Segment, which is a bit of a hassle for your use case as you'll need to manually change handle types, snap handles and remove points. The following ...

View answer
Changing settings of the 3D view with Python
Accepted answer
5 votes

show_only_render and viewport_shade are attributes of the SpaceView3D. So for your usage example you'd make the following change: - if area.type == 'SpaceView3D' : - show_only_render = ...

View answer
How to give a variable rotation, scale or location offset to dupligroups objects?
Accepted answer
3 votes

Now seems your after DupliFace objects with a random scale, without making them real? Setup DupliFaces with Scale enabled. Add an empty vertex group to your emitting mesh. Add a Edge Split modifier. ...

View answer
How to give a variable rotation, scale or location offset to dupligroups objects?
3 votes

Yes, this is called a driver. You can evaluate a python expressions by pre-pending your input with a #. There are a number of modules pre imported for convenience, use noise.random() to get a random ...

View answer
Is there a way to convert a constraint to a keyframe?
7 votes

Sounds like you want to apply the Visual Transform before keyframing: Apply Visual Transform CtrlA Apply (set) the result of a constraint and apply this back to the Object's location, rotation ...

View answer
Can I run a Python script step by step in Blender?
Accepted answer
33 votes

Launch blender from a terminal emulator. Add import pdb; pdb.set_trace() to your code where you wish to start debugging from. Run your code and you'll be put into the Python debugger, where you can ...

View answer
Adjust random seed of displacement textures
0 votes

It sounds like you want to be using UV coordinates. If you don't want to modify them directly you can use a UV Warp modifier before your displacement. UV Warp uses 2 objects to define a ...

View answer
Scripting - How to create a game property?
1 votes

Add the properties to the active object using: bpy.ops.object.game_property_new(type='FLOAT', name="") Create a new property available to the game engine Then copy to the rest of your ...

View answer
How to lock the view to prevent rotation of the view camera?
12 votes

One way you might want to go about this would be to: Align Active Camera to View with CtrlAlt + Numpad 0. Lock Camera to View. Select the camera and lock it's transformations.

View answer
Is it possible to save certain parts of a screenshot
6 votes

To use the screenshot feature see the bpy.ops.screen.screenshot operator. To crop to the active window/editor use the full option: import bpy bpy.ops.screen.screenshot(filepath="//output.png", full=...

View answer
Save rendered images in different formats
Accepted answer
9 votes

See the Output panel in the render settings. It can also be changed post render with Image > Save As Image (F3) in the Save As Image side panel. If you want to output to multiple formats, this can be ...

View answer
How can I resize/move the "canvas" of an image in the compositor?
Accepted answer
18 votes

There was a bug report on this where Ton said: Blender compositor is an extension of our render pipeline, animation frames by definition are always the same size. This is an issue we like to ...

View answer
1
2 3 4 5