Commit Graph

20457 Commits

Author SHA1 Message Date
Martin Poirier 84e3b2d726 NULL pointer check to prevent some crash in background mode 2009-11-10 20:34:35 +00:00
Martin Poirier 0797054c2d Running with -d, python context also prints members asked from context that are present.
Also, error messages were mixed up, wrong type and not present where inversed.
2009-11-10 19:57:04 +00:00
Roland Hess e29a70e136 Add Sticky was essentially a blank operator. Possibly context functions weren't around for this one when it was first looked at. Re-attached so it works now. 2009-11-10 19:54:59 +00:00
Guillermo S. Romero 320fb05ebc SVN maintenance. 2009-11-10 19:22:10 +00:00
Brecht Van Lommel 385875632d Math Lib
* Fix remaining issues before conversion.
* Inline various vector functions, currently enabled for all platforms.
  I expect this to work in GCC/MSVC at least, if other platforms don't
  support it, #ifdef's can be added.
2009-11-10 19:13:05 +00:00
Martin Poirier d611dd3735 Function declaration for BPY_context_get 2009-11-10 16:18:54 +00:00
Campbell Barton de7504807c fix error with python exceptions in BPy_errors_to_report 2009-11-10 16:17:49 +00:00
Campbell Barton 7efc2c2375 modify the python context access so invalid names will raise an exception rather then returning None.
this way the UI scripts are less likely to fail silently and wont let typos work ok.

also allow subclassing of the context, added a copy function,
 bpy.context.copy(), returns the context as a python dict to be modified and used in python.

This also showed up an invalid brush member in the screen context.
2009-11-10 15:09:53 +00:00
Campbell Barton 1f2fe7ec14 fix for own error in active bone commit, wasnt checking object type was an armature
also fix for warning with printf
2009-11-10 13:20:32 +00:00
Damien Plisson af2e6c38e9 Drag & drop implementation at GHOST level (only OSX for now)
The dragging sequence is performed in four phases:
 
- Start sequence (GHOST_kEventDraggingEntered) that tells a drag'n'drop operation has started. Already gives the object data type, and the entering mouse location

- Update mouse position (GHOST_kEventDraggingUpdated) sent upon each mouse move until the drag'n'drop operation stops, to give the updated mouse position.
Useful to highlight a potential destination, and update the status (through GHOST_setAcceptDragOperation) telling if the object can be dropped at the current cursor position.

- Abort drag'n'drop sequence (GHOST_kEventDraggingExited) sent when the user moved the mouse outside the window.

- Send the dropped data (GHOST_kEventDraggingDropDone)

- Outside of the normal sequence, dropped data can be sent (GHOST_kEventDraggingDropOnIcon). This can happen when the user drops an object on the application icon. (Also used in OSX to pass the filename of the document the user doubled-clicked in the finder)

Note that the event handler is responsible for freeing the received data.
And the mouse position is sent directly in blender client coordinates (y=0 at bottom)

The GHOST_setAcceptDragOperation(TRUE) call must be placed before the user drops the object for it to be accepted.

Current handled data types :
- Text string
- Array of filenames (full paths)
- Bitmap image (not implemented yet)
2009-11-10 12:56:46 +00:00
Brecht Van Lommel 14f9e686fa Fix for math lib commit, had duplicate definitions of functions,
giving build issues on some platforms.
2009-11-10 10:24:58 +00:00
Joshua Leung 89c2e6c803 Bugfix #19835: While playing animation, Render>Dimensions>FrameRate does not change animation speed
The timestep used for the playback timer now gets adjusted accordingly when the frames-per-second setting gets changed during playback (i.e. in the "animation_step" operator). This is not as ideal as only updating this when the framerate setting is changed, but using an appropriate update function for this failed miserably.
2009-11-10 09:50:39 +00:00
Matt Ebb 4573120399 Fix for [#19847] Joined meshes fail to render
Join function was accessing invalid memory for material indices when no materials were originally present on the joining objects
2009-11-10 06:29:10 +00:00
Matt Ebb 297045fd96 Fix for [#19852] Animation rendering not working in new scene
As part of this commit, I moved the scene frame_step to RenderData, where the other frame-related data is.
2009-11-10 04:56:55 +00:00
Matt Ebb b24b858394 Fix inconsistent order in Image editor alpha display buttons 2009-11-10 04:03:29 +00:00
Matt Ebb 84abb8ecb6 Fix for [#19855] Color Ramp Interpolation is not working 2009-11-10 04:02:44 +00:00
Matt Ebb bc006655ba * Finished (well, almost ;) RNA wrapping and layout-engine-ing all the nodes.
Still a few quirks, including redraw issues on multilayer image input nodes, but it's pretty much there.
Would also be good to wrap the input/output sockets, too, will check on it.

This fixes bug [#19740] INPUT NODE: Cannot load images / motion pictures
2009-11-10 04:01:44 +00:00
Matt Ebb ad409e5c7e * Small UI drawing tweaks, part of it allowing a bit of extra space for text in number fields 2009-11-10 03:48:02 +00:00
Joshua Leung d0cd641de3 Bugfixes for Armatures, SplineIK, and F-Curve RNA:
* Fixed the handling of the 'draw_active' flag for drawing of armatures. This is now cleared from bones in old files (so one bone always got represented as active in the viewport even when others were selected), and the flag is correctly set temporarily when drawing the bones (only one place had been done).

* Fixed typo with SplineIK that was making the root bone of the bone chains always be ignored. Similar functionality can come back at some point, but in a more useful form.

* Shortened the UI names for the F-Curve colouring modes to increase readability. The old ones were too long to be able to distinguish between entries in the UI.
2009-11-09 23:41:48 +00:00
Martin Poirier d34261edab Don't free Context from python.
There might be a better way to do this, Cambo, please check.

This solves the Totblock == -1 error
2009-11-09 23:33:56 +00:00
Brecht Van Lommel 60ea745613 Math Lib Reorganization
* New header and source files.
* Still need a few tweaks before switching code to use them.
2009-11-09 22:42:41 +00:00
Campbell Barton 5935ef0049 use armature active bone as a pointer rather then a flag for each bone that needs looking up.
- rna vars arm.bones.active & rna.edit_bones.active
- needed special undo support.
- readfile.c loads.
- duplicate and copy_armature support.
- keep the draw flag, renamed to BONE_DRAW_ACTIVE, only use for openGL drawing.

Note: it may be better to allow active/unselected as with objects.
2009-11-09 21:03:54 +00:00
Guillermo S. Romero 3e2766bc2e Add FFTW3 support to Makefiles, make OpenJpeg use OS lib for Linux.
And handful of whitespace clean ups.
2009-11-09 20:08:19 +00:00
Campbell Barton 8ab49a4c5e fix for running datatoc on files in a subdir (was adding slashes into the C variable name) 2009-11-09 20:03:59 +00:00
Roland Hess 6dd96fcfa8 Update of older commit (23102) from Bob Holcomb -- fix for Darken mode blending was only in place for nodes, not for general texture blending. This updates texture blending to reflect the fix. Now results don't trend toward black on Darken anymore as factor approaches 0. 2009-11-09 19:20:48 +00:00
Damien Plisson 45c0f70e3e - scons fix for linux build 2009-11-09 18:32:59 +00:00
Damien Plisson ff0ba86a9b Mac :
- scons update to build with openCollada

- scons & cmake update for render optimization cflags
2009-11-09 17:52:13 +00:00
Damien Plisson 9c0cdd2501 - fix Cocoa window setOrder function to maintain focus on a blender window (e.g. ensure the blender window gets the focus when the user presses ESC to move back the render window)
- QuickTime export fixes.
Note that QuickTime export still crashes because it tries to open a "codec settings" dialog from the rendering background thread (and not the main/UI thread).
One quick fix may be to move the movie export initialization out of the render thread back into the operator function.
But a cleaner way would be to get rid of such a carbon/win32 dialog and place the codec settings inside blender interface
(additional fields in the output panel as it is currently the case for other file formats ?).
2009-11-09 17:06:48 +00:00
Campbell Barton 196ecb7bab material shader curve factor (same as compo node) 2009-11-09 16:00:12 +00:00
Thomas Dinges ded68d81d8 * Fixing tooltips: "ratraced" > "raytraced". Patch by Oxben on mailing list. Thanks. 2009-11-09 13:55:04 +00:00
Campbell Barton 0bb70e4fae workaround for crash when dragging nodes 2009-11-09 11:15:49 +00:00
Campbell Barton 0750a8dc5c simple fix, still worked on my PC somehow 2009-11-09 09:16:16 +00:00
Campbell Barton 97e7e26bab - added particle select_inverse
- added select root/tip to the select menu
- selection drawing updates for select more/less were not working
2009-11-09 08:51:34 +00:00
Campbell Barton ae91ca7217 OpenGL grease pencil render
Algorith: needed to add some functions since offscreen render doesn't have a context pointer
 - draw_gpencil_3dview_ext
 - gpencil_data_get_active_v3d
2009-11-09 08:03:43 +00:00
Robin Allen 521af99f59 Fixed this startup crash on windows:
- cd to blender dir
- type 'blender'
- crash
2009-11-08 21:33:43 +00:00
Thomas Dinges 55beacfa47 *Small tooltip fix for strand start/end. 2009-11-08 17:58:06 +00:00
Andrea Weikert 9e90cf6d78 Sequencer: (small Durian wish)
* new operator: set rendersize (SEQUENCE_OT_rendersize) sets the render output size in the current scene to the size of the active sequence strip
* works for movies and images right now
* TODO: currently only works if image or movie strip has been loaded (as in showing the preview for example) - reason is that otherwise the size is not initialized in the strip
2009-11-08 15:03:10 +00:00
Campbell Barton af011f33a6 use the cwd for the shell prompt, use subprocess.getstatusoutput rather then popen() 2009-11-08 12:35:37 +00:00
Campbell Barton 49cb4d0065 support much longer prompts for the console 2009-11-08 11:33:01 +00:00
Thomas Dinges 18a5cd095a * Removed "Lock" Prefix from items inside Transform Lock Panel for consistency.
* Code cleanup to match guidelines, we don't use subrow1 or so anymore, remember? :)
2009-11-08 11:07:00 +00:00
Thomas Dinges e214023c11 Nodes:
* Slight offset tweak for Node header icons, not so cluttered now.
2009-11-08 10:20:03 +00:00
Andrea Weikert 12ee852c11 MSVC 9 projectfiles
* small maintenance: rna_fcurve_api.c added
2009-11-08 10:07:37 +00:00
Joshua Leung 10900f1de8 Graph Editor Drawing Tweaks:
* When there is only a single keyframe for a F-Curve, the handles aren't shown anymore. This looks nicer than the fat orange blobs that appeared
* Tweaked the management of GL_BLEND when drawing animation channels in the Graph Editor in an attempt to fix some of the missing text drawn issues.
* Converted the properties panel to use layout engine + added color selectors
2009-11-08 06:43:08 +00:00
Campbell Barton fac2ca1c7c bpy/rna api class feature
- python defined classes will be used when available (otherwise automaically generated metaclasses are made as before)
- use properties rather then functions for python defined rna class's
- call the classes getattr AFTER doing an RNA lookup, avoids setting and clearing exceptions for most attribute lookups, tested UI scripts are ~25% faster.
- extending rna py classes this way is a nicer alternative to modifying the generated metaclasses in place.

Example class

--- snip
class Object(bpy.types.ID):

    def _get_children(self):
        return [child for child in bpy.data.objects if child.parent == self]

    children = property(_get_children)
--- snip

The C initialization function looks in bpy_types.py for classes matching RNA structure names, using them when available.
This means all objects in python will be instances of these classes.
Python properties/funcs defined in ID py class will also be available for subclasses for eg. (Group Mesh etc)
2009-11-08 01:13:19 +00:00
Campbell Barton 30c4c4599d pedantic enum string consistancy 2009-11-07 22:12:03 +00:00
Campbell Barton 4e61f8a836 pep8 whitespace commit
bpy/rna api (no functionality change, just move getting the srna py base into a function)
2009-11-07 22:07:46 +00:00
Martin Poirier 5bb88685ca fluid cache need a +1 offset, their frame 0 is blender frame 1 (fun stuff) 2009-11-07 17:47:54 +00:00
Arystanbek Dyussenov 7b96bc00d5 Merge -c 24393 (patch by Jan) from COLLADA branch. 2009-11-07 14:34:04 +00:00
Campbell Barton f25bc95688 missed committing this file (from Stani's patch) 2009-11-07 14:17:49 +00:00
Campbell Barton ddeb9f8e24 - added console language type
- separated python console from the interactive console
- added shell console type (simple example)
- console types are autodetected and can be selected in the menu
2009-11-06 23:53:40 +00:00