Posts

Showing posts from March, 2014

Switch between Console and Text Editors

Since the Text editor and Console editor are very integral to my workflow, today I decided to configure my user preferences so that switching between them is as simple as pressing a hotkey (my choice being SHIFT+ESC)
Also tried adding the switching functionality using a little bit of python as well.

keyconfig = bpy.context.window_manager.keyconfigs.user

args = ('wm.context_set_enum', 'ESC', 'PRESS')
kwargs = {'shift':True}

for source, destination in (('Console', 'TEXT_EDITOR'), ('Text', 'CONSOLE')): 
    kmi = keyconfig.keymaps.[source].keymap_items.new(*args, **kwargs)
    properties = kmi.properties
    properties.data_path = 'area.type'
    properties.value = destination

Links and References
Doc:2.6/Manual/Preferences/Input#Keymap_editordocumentation/blender_python_api_2_70_release/bpy.types.KeyConfigurationsKeywords
User Preferences, Key Configuration, Key Map, Key Map Item, Key Map Item Operator, Key Map Item Operator…

Debugging Tools WIP #4 - Custom Headers

Image
Continuing my ongoing prototyping of tools to improve my development and debugging experience in Blender, I have created a prototype that enables me to switch between the default area headers in Blender and custom headers.
Switching between the default and custom headers is made possible by using the "Debug Menu" operator that comes bundled with Blender. You can access it from the Operator Search Menu or by pressing the hotkey combination CTRL+ALT+D
The Debug Menu operator modifies an attribute (bpy.app.debug_value) that is part of the application runtime module (bpy.app) Updates:(Video not updated with the following updates)
Switch to custom headers from the menu item prepended to the factory INFO_MT_window Menu.Improved the layout of the popup dialog and also cleaned up the code.As you can see in the screenshot below, my custom header displays 
A button to revert the header to default stateA button to view the current context properties and attributes in a popup dialog.Icon,…

Debugging Tools WIP #3

Image
Here is another doodle for the day.

This development enables one to browse Python source code related to Blender seamlessly using Blender's menus, file browser and text editor.

After loading the python text, the file selector will automatically switch to the text editor (I have enabled the menu to be displayed in the Console header for now). In case you are trying to load an already loaded file, the text editor will be updated to display already linked datablock.
Video demonstration
satishgoda at gmail dot com

Debugging Tools WIP #2

Image
I have made some more progress from my previous demonstration.
In this video I am highlighting  The user interface that I developed for  some of the debugging boolean flags in bpy.app module A very primitive version of a run command operator.
Video demonstration
satishgoda at gmail dot com

Debugging Tools WIP

Image
I have been working on some tools to abet development and debugging in Blender.

Debugging tools developed so far
Introspect panel type Introspect space data properties Thanks to the panel type debugger, I was able to figure out how the UserPreferences Editor tab switching behavior was implemented.

Following is a screenshot of both the tools in action.
Following is a quick video demo (no audio). This might make sense to only advanced users of Blender
satishgoda at gmail dot com

Project Gooseberry

Image
History will be made.
The Gooseberry campaign has launched! Six weeks to reach our ambitious goal - to make a feature animation movie. http://t.co/kzOuWn7ewC#b3d
— Ton Roosendaal (@tonroosendaal) March 9, 2014
Press Release
Watch the trailer below Click the image below for more details Studios from all around the world are part of Gooseberry
Blender Institute also introduces Blender Cloud.
For a quick overview of Blender Cloud, please watch the video below.

Consider funding the Project and make it successful. http://gooseberry.blender.orghttp://gooseberry.blender.org/bloghttp://wiki.blender.org/index.php/Org:Institute/BlenderCloudsatishgoda at gmail dot com

Development Workflow

Following is a workflow that I am using at the moment to quickly and seamlessly develop/test addons using the Python API provided by Blender.

The Text Editor that is part of Blender is an indispensable tool for editing python code. The editors utility can further be enhanced by enabling the API Navigator AddOn. Extensions:2.6/Py/Scripts/Text_Editor/API_NavigatorESC key in the text editor toggles between the api text view and the normal script view The user interface provided by the navigator enables one to inspect modules, types and operators that form the basis of the API.
AddOn's can be developed from scratch, built on top of existing source code (by copy/pasting required snippets) or by using the templates that can be accessed from the Text Editor header. Every Addon needs a register/unregister module level function and for interactive running/testing of the AddOn, the following block of code
if __name__ == '__main__':     register()
To test the addon, we need to click on