Commit Graph

42469 Commits

Author SHA1 Message Date
Brecht Van Lommel
e02b23b81a Render API: shader script node for custom shaders.
* Shader script node added, which stores either a link to a text datablock or
  file on disk, and has functions to add and remove sockets.
* Callback RenderEngine.update_script_node(self, node) added for render engines
  to compile the shader and update the node with new sockets.

Thanks to Thomas, Lukas and Dalai for the implementation.
2012-11-03 14:32:26 +00:00
Brecht Van Lommel
615fe0295f Cycles OSL: refactoring and fixes
* Moved kernel/osl/nodes to kernel/shaders
* Renamed standard attributes to use geom:, particle:, object: prefixes
* Update stdosl.h to properly reflect the closures we support
* Fix the wrong stdosl.h being used for building shaders
* Add geom:numpolyvertices, geom:trianglevertices, geom:polyvertices attributes
2012-11-03 14:32:13 +00:00
Brecht Van Lommel
6b098d7406 RNA/C++: string property writing was missing. 2012-11-03 14:31:55 +00:00
Brecht Van Lommel
47cd3cf225 BPY/RNA: determine callback functions that are allowed to write data by a flag
on the function instead of checking the name.
2012-11-03 14:31:38 +00:00
Ton Roosendaal
5fe0bd800f Bugfix (own collection)
Adding new image texture to Meshes didn't initialize UVs to 0-1 default.
This makes initial display of textures on meshes not work.

This fixes my favorite demo case: Open Blender, drop image from desktop on cube.
2012-11-03 14:31:28 +00:00
Joerg Mueller
b59290a835 Preparation to use boost::shared_ptr. 2012-11-03 09:49:49 +00:00
Campbell Barton
7353f8d58e remove unneeded string in datatoc.c and correct some of the context types in our documentation. 2012-11-03 09:14:06 +00:00
Campbell Barton
d24278635a auto-generated py api now shows bpy.context.* items in the 'References' section of each type. 2012-11-03 07:28:51 +00:00
Jens Verwiebe
5a8cef4a85 OSX: take back 51826 for now, does not fix dalai's problem 2012-11-02 20:55:12 +00:00
Jens Verwiebe
1930a51f09 OSX: a more friendly way to get mounted volumes, alo allows for whitespaces etc. 2012-11-02 20:26:37 +00:00
Bastien Montagne
c9307ec6a3 Fix for [#32992] Switching language does nothing under Windows.
Our current intl build for windows is quite old (don't know the exact version), and does not have the new setlocale overwrite. Problem is, new windows dll have no more the gettext_putenv helper, which is currently mandatory to make it work for this OS.

So back for now to the ugly long_locales for win. Best fix is probably to build our own static version of libl, but this is not trivial and will require some time. :/

PS: I had a look over i18n/translation in wxWidget, Qt and boost: all implement their own system, even though wxWidget and boost use po/mo files...
2012-11-02 20:03:15 +00:00
Brecht Van Lommel
41cd2d8e84 Fix #33040: baking selected to active could miss at pixels at the edge of faces
when there was a tiny mismatch between low and high poly models, maybe because
of float precision when editing the mesh. Added a small epsilon now to avoid this.
2012-11-02 13:36:26 +00:00
Brecht Van Lommel
40b3c3a4e6 RNA C++: fixes for lookup_int/lookup_string which were not working in some cases,
and don't use ReportList for function arguments.
2012-11-02 13:36:20 +00:00
Brecht Van Lommel
87bc16a9a0 UV editor: change unwrap warning about object non-unit size to only warning about
non-uniform scale, otherwise it gives warnings for cases when it's not needed.
2012-11-02 13:36:10 +00:00
Campbell Barton
0a0c8a4a22 fix for own recent commit checking bounds off-by-one. 2012-11-02 12:47:32 +00:00
Campbell Barton
6e17d1a5e0 fix for compositor regression where blur note offset the image one pixel to the top right. 2012-11-02 12:44:09 +00:00
Campbell Barton
f8112b40a6 correct operator preset tooltip and dont save their settings for re-use 2012-11-02 12:09:59 +00:00
Campbell Barton
ad191960a7 own recent commit to add pointer passing between py-rna and our C code, broke function calls for C++ rna api.
reported as [#33048] Cycles crashes when rendering
2012-11-02 10:37:33 +00:00
Jens Verwiebe
b3c1aae320 OSX: suppress meaningless /net and /home in fileselector also on 10.5+ 2012-11-02 10:33:54 +00:00
Campbell Barton
a31449edad all remove functions now invalidate the RNA objects passed, to help script authors to avoid bugs with accessing removed data. 2012-11-02 09:41:26 +00:00
Ton Roosendaal
2944d42c26 Bugfix #24030
Greasepencil mode 'hold d' was also inserting drivers (hotkey D) on mouse over.
The modal operator was default passing on all events, I made it swallowing it.
Doesn't seem to be affecting use at all.
2012-11-01 17:52:21 +00:00
Campbell Barton
9a82b47b4f all library data now gets the PointerRNA's invalidated on removal. 2012-11-01 17:16:24 +00:00
Lukas Toenne
17934e1803 Fix for Hue/Sat/Val compositor node. This was using the wrong input socket for the color constant (Fac instead Image). 2012-11-01 17:05:01 +00:00
Campbell Barton
b2d21a1747 fix for release building 2012-11-01 17:02:01 +00:00
Ton Roosendaal
7b9360e05a Bugfix [#33036] Invalid memory read in wm_handlers_do (valgrind warning) 2012-11-01 16:15:00 +00:00
Campbell Barton
f4e5404e4a fix for long standing problem with blender 2.5x py api.
Removing data then accessing would allow invalid memory access and often crash.

Example:
  import bpy
  image = bpy.data.images.new(name="a", width=5, height=5)
  bpy.data.images.remove(image)
  print(image.name)

Now access to the removed data raises an error:
  ReferenceError: StructRNA of type Image has been removed

This is the same level of error checking that was done in blender 2.4x but was made difficult by RNA functions not having access to the PyObject's.
2012-11-01 15:56:42 +00:00
Ton Roosendaal
818e9ff88d Bugfix #33038
TIMER events could get keymodifier set - in this case the user assigned
spacebar modifier for setting views (running smoothview timer)

Also: cleaned op old hacks from event checking code. 
The rule should be:

1) generate event properly, frozen state
2) pass on to handlers without exceptions or changing internal state

The only exception currently is for the "CLICK" (map key-release to unhandled
key-press).

Also: made --debug-event print OK. Slight cleanup in eventprinting in general.
It was putting the wmEvent state print in wrong place, doing it 4 or 8 times.
2012-11-01 15:51:24 +00:00
Campbell Barton
a0f01ef8d8 remove BLI_utildefines from BKE_DerivedMesh.h header 2012-11-01 15:34:38 +00:00
Ton Roosendaal
09cf0fa6f3 Bugreport - Christian Krupa in irc:
Curves behaved totally bad suddenly. Caused by Campbell code cleanup, replacing
this:

	/* this is for float inaccuracy */
	if (t < knots[0])
		t = knots[0];
	else if (t > knots[opp2]) 
		t = knots[opp2];


with:

	t = (t < knots[0]) ? knots[0] : knots[opp2];

Tss!
2012-11-01 13:00:24 +00:00
Campbell Barton
4fc1a3c8b3 fix for possible buffer overflow in gpu_nodes_get_vertex_attributes() and hair_velocity_smoothing()
and a unlikely NULL pointer dereference in unlink_material_cb().
2012-11-01 09:56:18 +00:00
Campbell Barton
f213ae0b19 style cleanup 2012-11-01 09:54:00 +00:00
Campbell Barton
bd574fe2a2 fix for own error - vertex custom-data flag wasnt working with the decimator 2012-11-01 06:38:25 +00:00
Campbell Barton
53160bd508 minor edits to mesh operators
- Rename 'mesh.select_nth' operator menu item 'Every N Number of Verts' to 'Checker Deselect',
  since its not just de-selecting verts (works on edges and faces too) and the term 'checker' gives a better description of the result.

- Rename 'mesh.select_by_number_vertices' to 'mesh.select_face_by_sides', since this is a face selection tool, which wasnt obvious from its name.

also remove dissolve by type menu since the option has been removed from the operator and was giving an error.
2012-11-01 05:07:15 +00:00
Campbell Barton
dcb3a5cbf4 fix for crash in own recent commit to add comparison options for select-similar, missing NULL terminator item in the array. 2012-11-01 04:27:59 +00:00
Mitchell Stokes
b6596467d9 BGE: Fix for bug #33025 "Character physics object won't stop moving with simple motion actuator" reported by Jared Smith (jsmithketchup). Characters no longer use a simple translation change for ApplyMovement(), they instead delegate to the character controller's setWalkDirection(). The motion actuator now sets this to (0, 0, 0) on a negative pulse. 2012-11-01 03:11:39 +00:00
Campbell Barton
1bcadda46b fix [#30910] Problems: Add Shortcut(s) for "Ctrl Tab" menu
comparing keymaps was too sloppy or too strict, now sloppy keymap comparison works by setting all the operator
properties to their default values if they are not already set, then compare this with the keymap item (ignoring values missing from either one).

... this way any non default keymap setting wont match with an operator menu item which doesnt set this operator at all (a problem sighted in this bug report).


developer notes:
- IDP_EqualsProperties_ex() function adds an argument to treat missing members of either group to act as if there is a match.
- WM_operator_properties_default() function to reset RNA values to their defaults.
- add IDP_spit(), debug only function to print out ID properties.
2012-10-31 20:29:32 +00:00
Campbell Barton
26541afc8b code style: use switch for IDP_EqualsProperties() 2012-10-31 19:42:02 +00:00
Campbell Barton
c7fbeded4c add IDP_MergeGroup(dst, src, overwrite) function,
like PyDict_Merge()
2012-10-31 19:07:25 +00:00
Ton Roosendaal
ae097e72a3 Bugfix #33031
Holding down non-modifer keys was generating double-clicks - my fault!
2012-10-31 18:47:49 +00:00
Brecht Van Lommel
ca23999b2c Fix blender internal strand render issue with deep shadow buffers, and AA samples
smaller than the number of shadow sample buffers. There was not enough shadow in
such cases, as some of the sample buffers were not filled in.
2012-10-31 17:32:18 +00:00
Ton Roosendaal
38a0d48fa7 Bugfix #33032
(since 2010)

- Using 2-button mouse emulation (common for tablets)
- Press LMB, start painting, press ALT, release LMB
- This kept painting to run, since the release event was a MMB,
  not handled by paint code.
2012-10-31 17:28:21 +00:00
Campbell Barton
d705c52e65 no longer use 'check_existing' to see if we need to have a save popup, instead use 'exec' operator on a saved file and
invoke on unsaved files.

correct missing memset --> CustomData_reset switch too.
2012-10-31 17:03:31 +00:00
Campbell Barton
5dfe20d87b fix for asserts caused by own recent commits to use customdata typemap. 2012-10-31 15:17:35 +00:00
Campbell Barton
b58d0e1335 fix for assert when rendering with cycles, caused by my recent commits. 2012-10-31 15:14:14 +00:00
Brecht Van Lommel
54c0ba84d4 Fix #31482: menu with scrollers when window is too small, didn't auto scroll
when using the arrow keys or mouse wheel to activate the next item.
2012-10-31 12:56:04 +00:00
Campbell Barton
db8b7fcabb style cleanup and correct own invalid comment. 2012-10-31 11:45:41 +00:00
Brecht Van Lommel
3406586d88 UI: fix for menu scrolling when window is too small. It was not working well
with arbitrary button layouts like multi column menus, because it was making
assumptions about position of previous/next buttons which doesn't work in
general.
2012-10-31 11:31:30 +00:00
Brecht Van Lommel
ebdc9056af Fix for #29056: NDOF motion events not configurable in user preferences. 2012-10-31 11:31:25 +00:00
Campbell Barton
c85488ff9e fix for crash in own commit r51773. drawing VBO's used the wrong origindex. 2012-10-31 11:05:32 +00:00
Campbell Barton
00b8c2afa1 style cleanup 2012-10-31 10:09:06 +00:00