Commit Graph

20514 Commits

Author SHA1 Message Date
Campbell Barton
e4881eef52 define operator properties in the class, similar to django fields
# Before
[
	bpy.props.StringProperty(attr="path", name="File Path", description="File path used for exporting the PLY file", maxlen= 1024, default= ""),
	bpy.props.BoolProperty(attr="use_modifiers", name="Apply Modifiers", description="Apply Modifiers to the exported mesh", default= True),
	bpy.props.BoolProperty(attr="use_normals", name="Export Normals", description="Export Normals for smooth and hard shaded faces", default= True),
	bpy.props.BoolProperty(attr="use_uvs", name="Export UVs", description="Exort the active UV layer", default= True),
	bpy.props.BoolProperty(attr="use_colors", name="Export Vertex Colors", description="Exort the active vertex color layer", default= True)
]

# After
path = StringProperty(attr="", name="File Path", description="File path used for exporting the PLY file", maxlen= 1024, default= "")
use_modifiers = BoolProperty(attr="", name="Apply Modifiers", description="Apply Modifiers to the exported mesh", default= True)
use_normals = BoolProperty(attr="", name="Export Normals", description="Export Normals for smooth and hard shaded faces", default= True)
use_uvs = BoolProperty(attr="", name="Export UVs", description="Exort the active UV layer", default= True)
use_colors = BoolProperty(attr="", name="Export Vertex Colors", description="Exort the active vertex color layer", default= True)
2009-10-31 16:40:14 +00:00
Campbell Barton
ea265fc697 change blender python interface for classes not to ise __idname__ rather bl_idname since __somename__ is for pythons internal use.
replacements...
"__idname__" -> "bl_idname"
"__props__" -> "bl_props"
"__label__" -> "bl_label"
"__register__" -> "bl_register"
"__undo__" -> "bl_undo"
"__space_type__" -> "bl_space_type"
"__default_closed__" -> "bl_default_closed"
"__region_type__" -> "bl_region_type"
"__context__" -> "bl_context"
"__show_header__" -> "bl_show_header"
"__URL__" -> "_url"
2009-10-31 13:31:23 +00:00
Thomas Dinges
85eb9d6a2f Commit of Patch [#19768] Add View3d Menu Items: View -> Playback Animation and View->Cameras->Active Camera
by Jeff Doyle (nfz). Thanks!
2009-10-31 10:17:19 +00:00
Martin Poirier
ea8c41bf54 Resizing didn't handle PET correctly for size attributes (position was ok, that's why it worked alright in edit mode). 2009-10-31 02:54:27 +00:00
Campbell Barton
9efc427f80 pep8 compliance for bpy_ops.py
add bpy.props to the modules so you can do...
 from bpy.props import *
2009-10-31 01:23:49 +00:00
Thomas Dinges
a8e56a274e Commit of Patch [#19711] Add Menu Item: View3d -> View -> Show All Layers
by Jeff Doyle (nfz). Thanks! 

This adds:
* "Show All Layers" to the View3d -> View menu
* "Center Cursor and View All" and "Align
Active Camera to View" to the align view submenu.
2009-10-30 21:56:09 +00:00
Campbell Barton
9c1fc8497b small change to strip-swap, Made keys Alt+L/RArrowKey, added in menu, dont treat color strips like other effects 2009-10-30 21:40:07 +00:00
Martin Poirier
9aa380b67e Make Collada False by default everywhere 2009-10-30 20:47:13 +00:00
Andrea Weikert
0cf1d391ed 2.5 Sequencer
Swap active sequence with the sequence on the right (CTRL+R) or left (CTRL+L).
was small Durian wish.

Note: in find_next_prev removed the code to find selected only if sel was != 0
I believe it should be possible to pass -1 in the case I want to find the next strip
regardless of selection state.
2009-10-30 20:40:41 +00:00
Damien Plisson
93173a6dd4 Mac / COCOA :
- fix 10.4 compile issues

- fix some scons issues & add WITH_BF_COLLADA = False in scons darwin_config.py to allow build waiting for complete Collada Mac implementation
2009-10-30 20:20:48 +00:00
William Reynish
f03257cc1f B.blend update
Received some additional feedback on the various screens

*Added Game Logic screen, with Logic editor, text editor, outliner and 3D view
*Added Properties screen, good for having direct access to loads of properties on a second monitor
*Tweaked UV Editing screen, removing timeline, and providing access to texture mapping and texture layers
*Tweaked Compositing screen, adding image editor and 3D view camera, and providing fast access to passes.
*Reordered some panels in the N-key area
*Added n-key properties area in the sequencer.
2009-10-30 20:02:56 +00:00
Thomas Dinges
c47a768af7 2.5 Nodes:
* Wrapped Math, Vector Math and Texture Node.
2009-10-30 19:31:44 +00:00
Martin Poirier
ac8480f42a Revert changes committed by accident in 24168
(this was experimental code for "ladder-like" mouse adjustment of float values)
2009-10-30 17:50:45 +00:00
Martin Poirier
d5921a274f Proportional edit for object mode.
Limitations:

1) Parents and children of selected objects are excluded from the pool (siblings are ok) Making it work with that would required unparenting and reparenting after transform, that would turn nasty really quick.

2) Does not support Connected (this could be done through parent links, but see 3 first).

3) Parent relationships in affected objects aren't taken into account. When parent and children in the area of effect, remember that the children will also take the motion of the parents (with additive results). This could perhaps be fixed, but it could be nasty.


Other stuff:
New BASE_EDITABLE macro that checks if base is editable (like TESTBASELIB except it doesn't check for selection)
Add scene parameter to TESTBASELIB_BGMODE macro (using it from current scope is nasty)
2009-10-30 17:48:50 +00:00
Campbell Barton
89c7ad970c - setting the active object in rna works properly now (notifiers added)
- adding keyframes now works for bones and other data types (not just ID types)

# Add a pose bone keyframe
bpy.data.objects['Armature.001'].pose.pose_channels["Hip"].keyframe_insert("location")

# Add an object keyframe (worked before)
bpy.data.objects['Armature.001'].keyframe_insert("location")
2009-10-30 17:23:40 +00:00
Arystanbek Dyussenov
31258507d0 Merge of the COLLADA GSoC branch into trunk.
COLLADA code is disabled by default (it has dependencies requiring manual install).

SCons and CMake builds are supported on Windows and Linux, no Mac building yet. More on building COLLADA code: http://wiki.blender.org/index.php/User:Kazanbas/Building_Collada_Branch.

The detailed command log of the merge (can be useful for educational purposes):

branch=https://svn.blender.org/svnroot/bf-blender/branches/soc-2009-chingachgook
# collada code
svn copy $branch/source/blender/collada source/blender/collada
# operator
svn merge -c 20401,20955,21077,24077,24079 $branch/source/blender/windowmanager/intern/wm_operators.c source/blender/windowmanager/intern/wm_operators.c
# menu
svn merge -c 24079 $branch/release/scripts/ui/space_info.py release/scripts/ui/space_info.py
# scons
svn merge -c 20398 $branch/source/blender/SConscript source/blender/SConscript
svn merge -c 20398,20691,20955,22726 $branch/tools/btools.py tools/btools.py
svn merge -c 20691,20955,22726 $branch/tools/Blender.py tools/Blender.py
svn merge -c 20398,20692,20955 $branch/config/linux2-config.py config/linux2-config.py
svn merge -c 22726 $branch/config/win64-vc-config.py config/win64-vc-config.py
svn merge -c 22726 $branch/config/win32-vc-config.py config/win32-vc-config.py
svn merge -c 24077 $branch/source/blender/windowmanager/SConscript source/blender/windowmanager/SConscript
# cmake
svn merge -c 23319,23905,24077,24158 $branch/CMakeLists.txt CMakeLists.txt
svn merge -c 23319 $branch/source/blender/CMakeLists.txt source/blender/CMakeLists.txt
svn merge -c 23319 $branch/source/creator/CMakeLists.txt source/creator/CMakeLists.txt
svn merge -c 23319 $branch/CMake/macros.cmake CMake/macros.cmake
svn merge -c 24077 $branch/source/blender/windowmanager/CMakeLists.txt source/blender/windowmanager/CMakeLists.txt
2009-10-30 15:35:50 +00:00
Campbell Barton
84eb897caa updating mathutils wrapped attributes now runs rna update functions too 2009-10-30 13:58:43 +00:00
Campbell Barton
01f6dfaac9 own commit r24178 broke adding objects, need to look into why but this fixes for now 2009-10-30 13:26:29 +00:00
Campbell Barton
6f2ca7c2bf check for error that could happen when making editmode armatures 2009-10-30 13:08:58 +00:00
Campbell Barton
d3e1696d4f use context functions rather then macros 2009-10-30 12:35:17 +00:00
Campbell Barton
312c487201 - Simplified EulToGimbalAxis, its still only works on XYZ and ZXY but at least its more clear whats going on.
- Made RotOrderInfo use a vector rather then i/j/k
- Added gimbal_axis to transform.h (was extern)
2009-10-30 12:11:04 +00:00
Joseph Eagar
77532f6f8a two things; made ctrl-p add an armature modifier instead of using PARSKEL, and also made wpaint auto-normalize work with PARSKEL armature setups 2009-10-30 09:50:35 +00:00
Campbell Barton
ae9eae222c Patch from Stani for autocomplete
adds ability to complete in these situations
 bpy -> bpy.
 bpy.data.objects -> bpy.data.objects["Mesh"]

my autocomplete could only do bpy -> bpy.
2009-10-30 09:34:57 +00:00
Joshua Leung
ae3cf92491 New Track To Constraint: "Damped"
This is effectively a C-port of Nathan Vegdahl's "No Twist" TrackTo PyConstraint, and has been added as a separate type of constraint to be consistent with the existing constraints (Locked Track, and Track To). 

In general, this works considerably better than the existing "Track To" constraint, since it works by determining the smallest rotation necessary to get the current orientation of the owner to an orientation which would be tracking the target. It is also a much more straightforward approach than the weird old method the old Track To uses.

I've made a few tweaks to the code to deal with the (hopefully rare) cases where the target and the constrained are coincident. These don't appear to cause too much trouble in general.

TODO:
- Probably the naming of the constraints will change, to better convey their purposes. Naming suggestions welcome.
2009-10-30 06:33:40 +00:00
Joseph Eagar
fe68d2672d added an 'auto-normalize' option for weight paint mode, that automatically ensures vertex groups that affect bones all add up to 1.0. please test and give feedback. 2009-10-30 02:09:52 +00:00
Thomas Dinges
c0a785a23e * Some Whitespace and small code-guideline cleanup. 2009-10-29 23:46:12 +00:00
Thomas Dinges
c26ee3ab57 * Tiny Force Field Layout improvements and tooltip fix by nudelZ. Thanks! 2009-10-29 22:08:09 +00:00
Benoit Bolsee
51a9da2dcf BGE patch #19751: Add game actuator like methods to GameLogic. 2009-10-29 21:59:31 +00:00
Martin Poirier
1a8b9e63d9 When transform orientation is not orthogonal (which is often the case with Gimbal), orthogonalize the orientation separately when drawing each rotation circles (this makes sure they really appear perpendicular and not just be that way in the skewed space of the orientation). 2009-10-29 21:34:09 +00:00
Martin Poirier
0400f3cd5c Functions to test for and correct orientation matrix orthogonality (since MatXOrtho only normalizes and should probably be renamed) 2009-10-29 21:31:55 +00:00
Thomas Dinges
c30553f7f3 * Added greying out for Bound Box Menu. 2009-10-29 21:31:00 +00:00
Campbell Barton
4b3fd4a8e0 replacement for my own autocomplete module by stani
--- from his patch
All the functionality is in the console
folder:
- intellisense.py: the central module which loads others on demand
- complete_namespace: more or less a replacement for the old autocomplete.py
- complete_import: module completion (I find this very handy, not just luxury)

These complete_* modules work very simple and should also work outside blender. You give some  input and it returns a list with possible completions.

autocomplete.py is now deprecated.
2009-10-29 20:55:45 +00:00
Campbell Barton
8c707b2a5f moved the following into the screen context rather then the view3d context so python scripts can access these when running in the console.
"visible_bones", "editable_bones", "selected_bones", "selected_editable_bones", "visible_pchans", "selected_pchans", "active_bone", "active_pchan",

added "C" to the consoles namespace, temp hack but useful
2009-10-29 19:59:38 +00:00
Daniel Genrich
099438f087 Smoke:
* Bugfix for crash when deleting particle system used by Smoke Flow modifier (reported by nudelZ).
2009-10-29 19:26:13 +00:00
Martin Poirier
9a13a84f15 No need to force ortho on a unit matrix 2009-10-29 18:59:48 +00:00
Campbell Barton
98527a7106 various small fixes
- undo stops all running jobs (operator redo was crashing with threaded render)
- adding new armatures was crashing if there was no valid view3d
- transform with an active hidden object would crash
2009-10-29 18:49:36 +00:00
Guillermo S. Romero
88b38c30a1 SVN maintenance. 2009-10-29 18:37:34 +00:00
Damien Plisson
b1a832a7e2 Mac / COCOA : Imbuf
- replace libtiff by calls to Cocoa services to load/save tiff files
(Libtiff, dynamically linked is not distributed with OS X, and would have had to be shipped for all four architectures)

The imb_cocoaLoadImage & imb_cocoaSaveImage are generic towards the bitmap format, and thus can handle TIFF, GIF, JPG, JP2000, BMP and raw camera formats (read-only for these), even if today only TIFF is used as the other formats are already handled.

- CMake updated
- scons updated (Thx to Jens Verwiebe)
2009-10-29 18:06:49 +00:00
Thomas Dinges
f5d62d885b Fixed [#19735] No normal map button in texture->image pane
Put it into the "Image Sampling" Panel, not sure if its the right location.
2009-10-29 14:27:56 +00:00
Campbell Barton
6f1e9a843e Script templates, including game logic scripts from 2.4x and new operator template.
Files copied into scripts/templates will automatically appear in the menu.

the operator template is a bit rough but a start.
2009-10-29 11:26:44 +00:00
Campbell Barton
e14a8635cc Modified python rna property types (BPy_PropertyRNA), so PySequence_Check() returns true
this means you can do...
C = {"selected_editable_objects":bpy.data.objects}
...when defining pythons context, without doing list(bpy.data.objects)
2009-10-29 10:03:34 +00:00
Campbell Barton
c508e6198a Python can now run operators with their own context (data context).
The aim of this is to avoid having to set the selection each time before running an operator from python.

At the moment this is set as a python dictionary with string keys and rna values... eg.

C = {}
C["active_object"] = bpy.data.objects['SomeOb']
bpy.ops.object.game_property_new(C)

# ofcourse this works too..
bpy.ops.object.game_property_new({"active_object":ob})

# or...
C = {"main":bpy.data, "scene":bpy.data.scenes[0], "active_object":bpy.data.objects['SomeOb'], "selected_editable_objects":list(bpy.data.objects)}
bpy.ops.object.location_apply(C)
2009-10-29 09:25:11 +00:00
Campbell Barton
40731af9d0 use objects rather then bases where possible, use context rather then OBACT macro 2009-10-29 09:14:20 +00:00
Thomas Dinges
2aa2f53265 * Added missing "Passes" Button for AAO, reported by nudelZ.
* Some Layout tweaks for Cloth Panel, put Quality option to top. Patch by nudelZ.
2009-10-28 23:47:56 +00:00
Thomas Dinges
3ff0032ec8 2.5 Nodes:
* Wraped Texture Nodes: Output and Bricks.
* Show Quality Slider (Composite > File Output) only for JPEG.
2009-10-28 22:14:31 +00:00
Martin Poirier
40cc202dac Comment out "forked" parameter for extrude_mode macro operator (it doesn't work yet and give warning in console) 2009-10-28 20:54:20 +00:00
Martin Poirier
3187e365d9 Gimbal Transform orientations
Will use rotation gimbal axis when an object or bone set to Euler rotation mode is selected (global axis otherwise)

Use case: being able to do rotations that only affect one animation curve in the 3d view instead of just in the curve editor.

I'm committing this right now despite what follows because it's already useful as is.

Known bug: manipulator arrows can look slightly skewed (not really a big problem), but more importantly, rotation circles for the rotation manipulator are skewed and will not perfectly reflect the rotation axis (it will still use the correct one though). That will be fixed shortly.

To do: This orientation should act like Local, where each object/bone uses its own orientation and not just the one of the active object/bone.

Note: Saved files with custom orientations might end up with other orientations selected when being opened up. I don't think it's that useful to make a do_version for that, but I can if warranted.
2009-10-28 20:30:33 +00:00
Andrea Weikert
c2f9cfb40a 2.5 Sequencer
New Operator for 'Move current frame to next/previous edit point'
Keymap: PageUp/PageDown
(small Durian wish)
2009-10-28 19:53:25 +00:00
Guillermo S. Romero
ce441678de Fix compilation for r24142. 2009-10-28 18:31:13 +00:00
Brecht Van Lommel
b6459105b4 OpenGL Render restored.
I tried to make it integrate more with regular render but couldn't
do it well, it still needs a 3D view to take the settings from, and
can't run in a separate thread due to OpenGL.

However, it is now rendering to an offscreen buffer which then gets
displayed in the image window. This requires FBO's to be available, so
a fallback creating a new window is still needed. Currently available
from the Render menu in the top header.
2009-10-28 18:03:04 +00:00