Commit Graph

345 Commits

Author SHA1 Message Date
Campbell Barton
a5c35fb27f Code cleanup: use booleans where appropriate 2014-01-28 04:00:04 +11:00
Campbell Barton
0c6a01ca00 Use includes for blenderplayer stubs
exposes many incorrect and redundant stubs
2014-01-28 01:55:10 +11:00
Campbell Barton
a71f072f9c UI: Replace +/- menus with collapsible ones
Patch D160, by Scott Petrovic with  own modifications.
2014-01-27 18:42:11 +11:00
Campbell Barton
b64f897606 WM: add WM_operatortype_remove_ptr to remove a known operator 2014-01-23 19:05:56 +11:00
Bastien Montagne
dbf50683fa Add missing struct Lattice declaration. 2014-01-21 17:24:15 +01:00
Campbell Barton
2dba2e72b7 Code Cleanup: de-duplicate text pasting which only used the first line 2014-01-08 17:39:12 +11:00
163e544006 Fix bookmarks not appearing in file browser after "copy previous settings". 2013-12-20 17:57:11 +01:00
Campbell Barton
f5076d54cb 'Transform' Python Function for armature, curve and lattice.
patch by Paolo Acampora with some edits.
2013-12-17 23:04:36 +11:00
Bastien Montagne
db795b66fa Fix bplayer broken in own rB51f5c994e9f0. 2013-12-17 10:47:32 +01:00
IRIE Shinsuke
ab9822eff8 Blender Internal: Add "Lamp Data" shader node that allows shaders to acquire information such as light vector from specified Lamp.
For now this provides the following outputs:

- Color
- Light Vector
- Distance
- Shadow
- Visibility Factor

Note: Color output is multiplied by the lamp energy.  Multiplication of
color*max(dot(light_vector,normal_vector),0)*shadow*visibility_factor
produces the exact same result as the Lambert shader.

Many thanks to Brecht for code review and discussion!
2013-11-25 22:19:47 +09:00
Bastien Montagne
f842ce82e6 UI List: ctrl click on names in list can be used for renaming.
Summary:
More information here:
http://lists.blender.org/pipermail/bf-committers/2013-November/042113.html

Reviewers: brecht

Reviewed By: brecht

CC: mont29

Differential Revision: http://developer.blender.org/D8
2013-11-23 18:43:23 +01:00
Sergey Sharybin
000312ab51 Remove Surface modifier when removing force field from object
Summary:
Before this adding Surface type of force field and removing
this field would leave Surface modifier alive in the stack.

This might be really misleading and annoying.

Now removing force field will ensure no modifiers needed for
it are remained in the stack.

This also fixes missing notifier to redraw modifier stack
when changing force field type.

Reviewers: brecht, campbellbarton

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D13
2013-11-19 17:19:06 +06:00
Bastien Montagne
ad34a5cc1b Fix [#34675] *AFTER 2.69* Info view shows duplicate operators with incorrect values of args
Refactored a bit WM api to generate operator's pystring, now it can also handle correctly macro operators. Thanks to Campbell for the review!
2013-11-06 20:56:18 +00:00
Thomas Beck
d2cd8715f4 Fix blenderplayer build, stub for modifier_skin_customdata_ensure(...) 2013-11-01 16:39:11 +00:00
Campbell Barton
ff7dbdbaee rename give_cursor to ED_view3d_cursor3d_get 2013-10-26 04:07:18 +00:00
Campbell Barton
e7f1e1aed1 edits to r60777 - move ED_object_hook_reset_do into BKE object (if RNA needs to call ED_* functions its a hint they might be better in BKE). 2013-10-15 20:15:45 +00:00
Jens Verwiebe
cd6477eee0 Fix stubs for player 2013-10-15 17:19:02 +00:00
Brecht Van Lommel
8cdeba8d67 Fix #36948: blender internal viewport render crashes holding shift+Z pressed
to quickly toggle it on/off.

Problem is accessing freed data, now the job is ended immediately. Fix based
on patch from Sergey and investigation from Bastien.
2013-10-04 12:30:00 +00:00
Dalai Felinto
9745d39eff blenderplayer stubs for WM_keymap_remove
(reported by Thomas Dinges on irc)
2013-09-27 16:58:34 +00:00
Bastien Montagne
3da3c36644 Usual blenderplayer stub fix... ;) 2013-09-07 12:46:48 +00:00
Campbell Barton
35cd649c66 rename cursor setting functions to make modal set/restore more clearly related functions. 2013-09-06 22:34:29 +00:00
Bastien Montagne
6b51c27414 uiLists enhacements: dragresize and better GRID layout.
Many thanks to Brecht for the review!

* You can now drag-resize uiLists (in default or grid layouts).
** Note about "default" size: when you drag below minimal size of the uiList, it will automatically reset to automatic sizing (i.e. size between rows and maxrows, depending on the number of items to show). This often means (e.g. in Materials list with many mat slots) that the list will grow again to maxrows!

* Grid uiLists now have a customizable number of columns (previously it was a fixed value of 9), and they will respect the rows/maxrows settings as well (i.e. show a scrollbar when needed), instead of growing indefinitly!
2013-08-27 15:27:41 +00:00
Lukas Toenne
b9e34d2938 Fix for own commit, stub functions all use the STUB_ASSERT macro now. 2013-07-25 16:04:26 +00:00
Lukas Toenne
2af08ee7ea Fix for bad level call introduced in r58597. 2013-07-25 15:38:22 +00:00
Campbell Barton
9634f8f115 transform was flushing the selection (inline), now skip this and use the selection as-is.
flush the selection on entering editmode instead (since the selection mode can be changed with another mesh).
is other tools leave the selection incorrectly flushed, those will need to be fixed so transform works as expected.
2013-07-22 10:44:24 +00:00
Dalai Felinto
77e4227c25 fix stubs for blenderplayer linking 2013-06-01 08:59:52 +00:00
Campbell Barton
ef4db04da8 code cleanup: lots of calls to BKE_mesh_calc_normals_mapping were not using the mapping functionality.
replace ED_mesh_calc_normals with BKE_mesh_calc_normals().
2013-05-28 14:23:07 +00:00
Bastien Montagne
9d567dd366 This commit addresses the somewhat weak handling of stackless textures in Blender with default (BI) renderer. To do so, it's defining an "other" texture context, and when in this one, it switches to using the "new shading" texture handling already known with Cycles engine.
So now, in the new "other" tex context, you can (depending on active data) have direct access to modifiers', force's or brushes' textures...

I also refactored a bit how texture contexts are handled (once again, we had some quite similar code in both space_buttons and RNA sources). This should also solve some harmless glitches like "no texture context selected in UI" sometimes when you remove data related to current texture (see e.g. after removing the material from default cube, in startup scene).

This usage of two different systems for textures, and the handling of switches between them, has been a bit tricky to get working right, but it is OK now I think. I also had to add a bool flag to buttons space, SB_TEX_USER_LIMITED (use_limited_texture_context in RNA), which indicates "new shading" texture code whether it has to ignore materials, lamps etc. (BI) or not (Cycles).

Btw, pinned textures from modifiers/force/etc. were also broken (showing nothing), now it should work too.

Thanks to Brecht for reviewing.
2013-05-17 07:10:10 +00:00
Sergey Sharybin
8641baa958 C forbids having variables declarations in the middle of code block. 2013-05-13 11:20:32 +00:00
Mitchell Stokes
82612ae950 BGE: I had the assert in stubs.c backwards. However, it looks like the Blenderplayer ends up making a bad level call on startup. So, I've added a way to easily turn the asserts on and off (default to off) to allow people to still hunt down bad level calls without interfering with other people's debug builds. 2013-05-13 04:08:16 +00:00
Mitchell Stokes
714f8a4af0 BGE: Adding an assert(true); to every function defined in stubs.c. This should help in hunting down errors caused by code calling into stubs.c, which shouldn't happen while the Blenderplayer is running. Remember, stubs.c is just to help with linking, these calls should never be used! 2013-05-13 02:59:13 +00:00
Mitchell Stokes
e5bbf2441a BGE: Tweaking the linking order of the Blenderplayer (CMake) to avoid needing to put BLI code in stubs.c. This fixes an infinite loop with the Edge Split modifier in the Blenderplayer. SCons still has to be tested. 2013-05-13 02:49:18 +00:00
Bastien Montagne
f9250ad515 Yet another Stupid Stub Fix™! 2013-04-22 17:51:08 +00:00
Bastien Montagne
7776e7e7d8 Usual Stupid Blenderplayer Stub Fix™! :P 2013-04-19 15:46:32 +00:00
Jens Verwiebe
bd07cac232 Correct stub for snapObjectsRayEx 2013-04-11 15:40:57 +00:00
Jens Verwiebe
f8293b8068 Add stub for snapObjectsRayEx 2013-04-11 15:35:16 +00:00
Jens Verwiebe
8128444bad Add stub for snapObjectsRayEx 2013-04-11 15:33:10 +00:00
Campbell Barton
89926a0598 svn merge ^/trunk/blender -r55776:55813 2013-04-05 15:42:31 +00:00
Campbell Barton
83fff218cc svn merge ^/trunk/blender -r55700:55776 2013-04-04 13:37:07 +00:00
Bastien Montagne
f6add59e91 Fix blenderplayer (missing stub...). 2013-04-04 12:12:33 +00:00
Campbell Barton
7bbaf4853a code cleanup: use bools in UI and WM code, quiet some shadow warnings, remove unused function uiEmboss() 2013-04-04 02:05:11 +00:00
Campbell Barton
03b07a719f code cleanup: unused functions 2013-04-03 15:04:24 +00:00
Sergey Sharybin
18d2dd7e3a Merging r55547 through r55594 from trunk into soc-2008-mxcurioni 2013-03-26 09:09:31 +00:00
Campbell Barton
64d161de87 style cleanup:
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
2013-03-26 07:29:01 +00:00
Tamito Kajiyama
385c72f5f2 Merged changes in the trunk up to revision 55546.
Conflicts resolved:
source/blenderplayer/bad_level_call_stubs/SConscript

Partly reverted changes to intern/cycles/blender/addon/ui.py in revision 52899
to make it easier to merge trunk changes.
2013-03-24 12:13:13 +00:00
Campbell Barton
b57fc113aa python api: add functionality to remove uv-texture layers. 2013-03-21 20:54:48 +00:00
Campbell Barton
fa1cd9ce9b python api: add functionality to remove vertex color layers.
note: that this intentionally removes check to exit vpaint mode when a vertex color layer is removed,
	  since being in vertex-paint mode without a vertex color layer is supported.

also minor change to drawing camera limits while picking from previous commit.
2013-03-21 20:15:39 +00:00
Campbell Barton
fdc3b7dfef fix for own recent commit - added function into wrong side of ifdef 2013-03-21 16:06:46 +00:00
Campbell Barton
790374d07d code cleanup: rename editmode functions so we have ED_object_editmode_load/enter/exit 2013-03-21 14:18:17 +00:00
Campbell Barton
ae25aa2210 svn merge ^/trunk/blender -r55372:55392 2013-03-18 22:37:04 +00:00