Commit Graph

47594 Commits

Author SHA1 Message Date
Campbell Barton
578950c977 ID property access from python for pose channels, bones and any ID objects.
The advantage with this is that global property definitions are not needed to add a property to an object.

to avoid confusion these are accessed like a dictionary (closely matching how the BGE accesses properties)

 ob["mySetting"] = 1.0

 bone["foo"] = {"one":1, "two":2.1, "three":"Three"}

 if "foo" in bone: print("prop found...")

At the moment these can also be accessed as attributes, will be changed shortly. eg.
 bone.foo == bone["foo"]
2009-11-16 19:03:40 +00:00
Campbell Barton
66dfaabb9d update idproperty python api for python 3.1
- removed 'group.has_key("key")', use... '"key" in group' instead
- removed verbose float and int conversions that are not needed
- fixed memory leak
2009-11-16 18:56:58 +00:00
Campbell Barton
cf1700bdd5 python api for ID property access by Joseph Eager, copied from blender 2.4x. 2009-11-16 18:53:11 +00:00
William Reynish
ca5a912c3e Added single column support to modifiers
Tiny cleanups and improvements in some modifier layouts
2009-11-16 16:07:22 +00:00
Campbell Barton
d6c0680268 un-initialized variable, fix for own recent commit 2009-11-16 14:29:46 +00:00
Campbell Barton
20043a0fc0 add hook in vertex and control point menu's, Ctrl+H
TODO's
- add for lattice
- break up add_hook
- add other hook operators
2009-11-16 13:59:27 +00:00
Joshua Leung
88fe2d187b Bugfix: Remove drivers button was broken
Somehow this worked here, even though the pointer being referenced was supposed to have been freed already...
2009-11-16 12:44:33 +00:00
Joshua Leung
a12c2a8561 Constraints: Code cleanup
* Removing duplicate api functions
* Shuffled around newly added api functions to make the ordering more consistent
* Fixes for a few bugs in the api functions as I checked over them
* Replaced most of the #defines for flags and modes with enums
2009-11-16 12:33:42 +00:00
Campbell Barton
567ee32f14 - fcurve modifiers.new()/remove()/active
- renamed .add() to .new() for rna collection functions since they dont add an existing item.
- remove 'name' as an argument from the new driver target function, better to keep the api minimal and let scripters use the data api for editing values after.
- added some api functions to keep rna api from becoming a mess.
2009-11-16 11:11:16 +00:00
Campbell Barton
be07bb3cc3 functions returning non ID pointers that relied on having the ID set could crash, (adding a pose constraint crashed in one testcase)
now use the functions ID pointer.
2009-11-16 09:20:21 +00:00
Joseph Eagar
3a19c341de fix for materials not displaying in object mode wiht subsurf 2009-11-16 08:26:47 +00:00
Dalai Felinto
2e104b44c6 bge: fix for "dome mode not working with Letterboxing".
This bug was introduced after commit # 24102 (BGE: when letterbox is enabled use the camera framing as a clipping area) reported in IRC by Pete Carss (domejunky)

*) an extra stub fix for recent commit. By the way: we want to have blenderplayer running in blender 2.5 beta0. Therefore if you are doing big changes in the last minutes (Friday, Saturday??) It would help a lot if you could enable blenderplayer in your builds. links problems are really easy to fix)

**) an typo I spotted in recent mesh dynamic load in bge.
2009-11-16 02:52:02 +00:00
Guillermo S. Romero
aa739e7a71 Add include path to find BLO_readfile.h. 2009-11-16 00:44:07 +00:00
Benoit Bolsee
b45ab480e0 BGE: dynamic loading patch commited. API and demo files available here: https://projects.blender.org/tracker/?func=detail&aid=19492&group_id=9&atid=127 2009-11-15 23:58:56 +00:00
Dalai Felinto
349fa813ea bpplayer compiling fixes: ([#19890] Getting the Blenderplayer to build again by Mitchel Stokes (moguri) and some changes form mine)
1) SetDisplayArea was created in Blender but we forgot to set it in the player
2) Fix some SCons incs (using lists instead of strings)
3) added more nasty stubs calls (this file is getting big)

* typo fix from last commit

**) it's raining with bolts here and I have to turn the internet off. I couldnt hard test this commit but it looks like working. sorry if sometihng go wrong
2009-11-15 23:48:21 +00:00
Benoit Bolsee
923e67fe1f Fix runtime check uninitialized pointer 2009-11-15 23:43:20 +00:00
Martin Poirier
11cfdfa264 === Better support for user defined modal keymaps ===
Fixing/Missing RNA properties:
- "virtual" property for "ANY" modifier for keymapitem
- modal property for keymap
- Look up modal_items in usermaps too

Lazy init usermaps needs to init modal_items too.

New function to initialize a user keymap (fill in modal_item and poll pointers).

Operator modal keymaps now look up if there's a user defined keymap that overwrites it.

Full Event UI buttons now show "Any" when modifier is set to that (instead of listing all of them).

Note: Having the modifiers as boolean still doesn't express the full breath of values possible for them. There is commented code in this commit to represent them as enum, which would solve this, but make the keymap editor more cryptic.
2009-11-15 19:25:34 +00:00
Dalai Felinto
6ea605797c patch [#19722] Text labels for Stereo and dome modes from Jorge Bernal (lordloki)
I'm not 100% happy with the dome mode description ("physical" doesn't really match the difference between all modes). But for the time being let's leave like this.
2009-11-15 17:10:52 +00:00
Joshua Leung
bbb2668ce0 Bugfix #19878: pressing shift+b or alt+b locks up blender
Modal keymaps for clip zoom and zoom border in 3D-View were missing, which lead to events for those operators never getting processed.
2009-11-15 11:46:08 +00:00
Campbell Barton
635a98a4ce [#19896] [bugfix] Fixing converting of rotation f-curves
from Mitchell Stokes (moguri) 

--- from the patch
With f-curves there are 3 rotation modes, rotation_euler, rotation_axis_angle, and rotation_quaternion. The IPO converter
was still simply looking for "rotation" f-curves instead of specific ones. This patch fixes that and also
fixes bug #19873 ( http://projects.blender.org/tracker/index.php?func=detail&aid=19873&group_id=9&atid=306
).
2009-11-15 11:32:53 +00:00
Joshua Leung
61fe981a0f Bugfix #19887: Blender crash when resizing nodes in node editor
This commit fixes the crash, but there are currently some issues with getting the active node in general with the Nodes Editor.
2009-11-15 11:32:29 +00:00
Joshua Leung
6468f21ddf Red-Black Tree Code Cleanups:
Added some more methods for the Red-Black Tree implementation in Blender (used for runtime viewing and searching of keyframes) which abstract away some of the lower-level handling of the BST (i.e. adding nodes without balancing and searching for nodes). 

Also, improved the implementation of the jump next/prev keyframe operator so that it pops up an error message when the last keyframe in whatever direction is encountered.
2009-11-15 11:20:44 +00:00
Campbell Barton
d04f94d0c6 skip rna property & function lookups for members starting with "_" (since makesrna disallows this)
added a way profile python startup in bpy/__init__.py, if'd out by default.
2009-11-14 23:11:46 +00:00
Martin Poirier
33da66d7b3 RNA property for propvalue in keymapitems.
Enables modification of modal keymaps.
2009-11-14 22:43:42 +00:00
Campbell Barton
a6eeb88aac sequencer select linked time option, (Selectmouse /w Ctrl & Ctrl+Shift), selects all strips that have the same start/end as the active strip or.. if your selecting a handle select all strips and handles on the same time 2009-11-14 20:46:18 +00:00
Joerg Mueller
694525e38b Make it possible to put audio strips into meta strips in the sequencer. 2009-11-14 20:17:05 +00:00
Campbell Barton
e94640040b sequencer support for loading multiple movie and sounds at once.
- more api like functions for adding movie, sound & images (easier to use from pyrna api)
- operators share more settings
- renamed get_last_seq() to active_seq_get() - same for set.
2009-11-14 19:26:58 +00:00
Campbell Barton
c2e092ef8b reload with the active sequence strip set 2009-11-14 15:31:52 +00:00
Campbell Barton
c9d2186561 - sequencer speed effect back using fcurves, still needs manual reloading to refresh.
- added a function id_data_find_fcurve() to get the fcurve without RNA vars. Aligorith: this could be made to use a path rather then a property name.
2009-11-14 14:58:19 +00:00
Thomas Dinges
b386ef0abe * Compile fix. prop was declared in the middle of scope. 2009-11-14 08:50:02 +00:00
Joshua Leung
e191007d5f Action Constraints Bugfix:
Action Constraints were failing when the rotation mode was non-default. Fixed this by copying over the current rotation mode when creating temp elements to evaluate with.
2009-11-14 02:50:45 +00:00
Campbell Barton
e53b05fbd8 report this broke MSVC 2009-11-13 18:47:20 +00:00
Campbell Barton
e12fe32feb documentat & cross reference collection types 2009-11-13 17:42:44 +00:00
Campbell Barton
c1d0f9179d fix for error with property getattro in recent commit which broke autocomp.
active base/bone & editbone were not converted to property srna
2009-11-13 16:37:44 +00:00
Campbell Barton
91352006c4 arbitrary property and function support for rna properties (arrays and collections), this means functions can be easily added.
eg.
 scene.objects.link()
 object.constraints.new()
 mesh.verts.transform(...)
 mesh.faces.active

PropertyRNA stores an StructRNA pointer where these can be defined.
2009-11-13 16:08:03 +00:00
Arystanbek Dyussenov
6df83fba02 Merge -c 24547 from COLLADA branch (fix flipping of triangles created by tesselation). 2009-11-13 15:48:45 +00:00
Arystanbek Dyussenov
555ce42c01 COLLADA: triangles created by polygon tesselation now get correct winding order (i.e. no flipping). Thanks Joseph for the algorithm! 2009-11-13 15:36:46 +00:00
Campbell Barton
5a322bd67c F8 reload works again, script errors are printed but dont stop loading every other script 2009-11-13 11:10:29 +00:00
Campbell Barton
b17964af11 temp disable fix from r24541, constrains extruding verts 2009-11-13 10:53:58 +00:00
Campbell Barton
4c7dc3e5c5 changes python initialization
- bpy is now a python package, this makes it easier to add utility modules and adjust python startup which was previously using verbose Py/C api. Access should not be any slower since both C and Python modules use dictionary access.
- loop over scripts and load via python (currently F8 reload isnt working, will add back shortly)
- the C module is kept but renamed to _bpy and not meant for direct access from anything but the bpy package.
- bpy_types.py is an exception since it runs before the bpy package is initialized.
2009-11-13 09:28:05 +00:00
Joshua Leung
206563241c Bugfix #19871: Extrude does not extrude on normal anymore
Just moving some old commented-out code over from the invoke() callback for extrude to the macro operator.
2009-11-13 01:26:13 +00:00
Joshua Leung
acd7225dea Driver Editing Tweaks:
* Updating dependencies for drivers now clears the disabled status of the relevant Driver FCurve too
* Changing the type of ID-block used for Driver Targets and Keying Set Paths will now clear the pointer to the ID-block if it is of the wrong type.
2009-11-13 01:04:01 +00:00
Joshua Leung
e12f39d116 Spline IK: Fixes for the crashes with non-existant path data that are applied elsewhere 2009-11-12 23:27:33 +00:00
Joshua Leung
6062e434d3 Deselect all for bones works again
It's still very irritating that the active bone pointer doesn't get cleared when this happens, but at least it's more consistent with how Objects work...
2009-11-12 23:12:34 +00:00
Martin Poirier
d0c1d182e9 Bug: [#19712] Manipulator widget missing functionality
With help from Patch [#19757] by Michael Jefferies.

-------------

Also, following talks with Matt and Campbell, make pressing Ctrl in transform toggle snap/gears instead of having to hold it down.

Important note: holding it down will no longer work correctly because of key repeats (it will toggle it constantly). It's possible to edit the modal keymap to bring back the old behavior (perhaps it should even be default).
2009-11-12 19:49:26 +00:00
Martin Poirier
20681f4980 Shift click on modifier works again.
For some reason, adding a keymap entry with KM_SHIFT didn't work, had to use KM_ANY and passthrough invalid modifiers.

Left a note to investigate later.
2009-11-12 19:42:53 +00:00
Chris Want
6c1a7a9a2d == Blender 2.4x ==
Removed highly annoying "recalc data OBxxxx" debug print.
2009-11-12 18:35:26 +00:00
Arystanbek Dyussenov
fdcc0ff7c7 Merge -c 24531 from COLLADA branch (fix holes in imported meshes). 2009-11-12 17:08:32 +00:00
Campbell Barton
8f80297832 generating docs can make the rna api generate wrnings (which is fine)
but was giving python decoding errors and didnt even show the warning.

for now just print to the console fixes this
2009-11-12 15:46:45 +00:00
Arystanbek Dyussenov
b093e12584 COLLADA importer:
* no more holes in imported meshes (I hope so) - test/fix face indices with test_index_face on mesh import. Thanks Brecht for pointing this out!
* cleanup triangulation code. Polygon triangulation (using filldisplist) can result in flipped faces (for example http://www.pasteall.org/pic/117 (textured shading) and http://www.pasteall.org/pic/118 (solid shading)). Don't know how to fix this (flipping the order of produced triangles results in other faces being flipped)...
2009-11-12 15:45:08 +00:00