Commit Graph

48227 Commits

Author SHA1 Message Date
Brecht Van Lommel
d16a608f6d Fix cycles backwards compatibility for specular_toon shader this actually needs
to be done in cycles itself to keep compatibility for bytecode too.

Also fix broken button to compile OSL from the text editors, this got broken after
recent change to disable editing of library linked nodes.
2013-06-10 20:10:03 +00:00
Brecht Van Lommel
6322f01783 Cycles lamp specials menu now includes separate X/Y size for area lamps
and strength (for the basic default node setup, this can't work with with
arbitrary nodes).
2013-06-10 19:01:40 +00:00
Brecht Van Lommel
2ce0ecd956 Attempt to fix #35665: disable correlated multi jitter sampling on the GPU for now,
seems to be giving issues with CUDA 4.2 but I can't figure out why exactly.
2013-06-10 19:01:37 +00:00
Bastien Montagne
67a5d1b660 Follow up to r57354: WeightVG and Wave modifiers too need to handle tex id refcount ;) 2013-06-10 18:12:07 +00:00
Lukas Toenne
5183ba74a8 Fix for crash when assigning NULL pointer to node group node_tree property. This is generally allowed (though operators usually would prevent it). 2013-06-10 17:48:41 +00:00
Sergey Sharybin
bfbac9b448 Fix #35678: Duplicating an object with Displace modifier does not increase the reference count of the texture 2013-06-10 14:04:03 +00:00
Sergey Sharybin
1f7096bb58 Fix #35658: OpenEXR (from Maya) - missing passes
Added some special case for two-component channels name.

Maybe magic could be simplified to just use last char of
channel name as an id, but extra paranoid check never hurts.
2013-06-10 13:54:09 +00:00
Brecht Van Lommel
ab52b15964 Fix #35681: cycles excluded layers still got evaluated before and after
rendering even if they were not used on any render layers.
2013-06-10 13:53:38 +00:00
Sergey Sharybin
4863feb956 Changes to mask evaluation
- BKE_mask_update_scene was only used with do_newframe=FALSE,
  removed this argument.

- Made it so BKE_mask_update_scene is able to handle LIB_ID_RECALC_DATA
  case. Namely, if mask ID is tagged for data update it means shapekeys
  will be re-evaluated (as if do_newframe=true).

  If mask id only tagged for LIB_ID_RECALC, then no shapekey evaluation
  happens (same as it used to behave before).

  This means, doing DAG_id_tag_update(&mask->id, OB_RECALC_DATA) will
  lead to shapekeys re-evaluation which is really needed in such
  operators as clearing shapekeys (and cleaning shapekeys which is
  in tomato branch yet).

  This is a bit silly to use OB_RECALC_DATA sine mask is not an OB,
  but could not see better way to do it now.

This fixes missing mask re-evaluation after clearing shapekey,
would expect no other functional changes.
2013-06-10 13:07:02 +00:00
Brecht Van Lommel
183629b451 Fix cycles OSL backwards compatibility for specular_toon, it got renamed to glossy_toon
but we can keep the old name working too.
2013-06-10 13:06:10 +00:00
Brecht Van Lommel
88ab28dc5f Fix #35653: manual texture space location and size not working in cycles viewport. 2013-06-10 13:01:41 +00:00
Lukas Toenne
4a8f71fc1d Custom Group Node type for extending existing nodes from python scripts. This is a sort of workaround for the lack of APIs in our existing node systems (compositor, cycles, BI, textures). These systems
don't have any way to deal with scripted node types yet, which could in principle by added with pynodes. The NodeCustomGroup type adds a way of scripting nodes by automating node groups which the
hardcoded system can then interpret like regular groups.

The new NodeCustomGroup type has the basic node_tree pointer property like the regular group node types and also uses the same socket interface system as regular groups. This means that input/output
sockets can be mapped to internal nodes in the same way as regular node groups in renderers and the compositor. On top of that, however, the NodeCustomGroup type can be subclassed in python scripts to flesh out
scripted node types with own draw functions, properties, updates and so on.

NB: Only cycles currently supports this node type and its derivatives, other systems may follow later.
2013-06-10 12:19:39 +00:00
Campbell Barton
31e74d00c1 fix [#35691] Context Override replaces instead of overrides 2013-06-10 12:17:36 +00:00
Joshua Leung
c5ba912a3d Bugfix [#35382] NLA "Multiply" Blend Mode calculated incorrectly
The "Multiply" blending mode for NLA strips worked incorrectly. Instead of
modulating the influence of the current strip, it was in fact scaling the result
of the entire stack (with the strip applied). This caused problems when
influence = 0, as it was in fact muting everything instead of just controlling
the strip we are interested in.
2013-06-10 11:58:57 +00:00
Brecht Van Lommel
b1fb86cbe7 Fix bug in vertex group code after recent changes, did not do proper NULL
pointer check.
2013-06-10 11:08:39 +00:00
Brecht Van Lommel
4aae3e3698 RNA: simplify space type items code, no need to have this duplicated. 2013-06-10 11:08:37 +00:00
Tamito Kajiyama
a86e7c8b01 Replaced a hard-coded array length with MAX_ID_NAME. 2013-06-10 10:58:49 +00:00
Campbell Barton
bff8a4c594 correction to typo in r57327, ui-load wasnt working on splash screen.
also minor changes:
- update the load-UI flag when changing in the preferences.
- remove unused initialization values for subdivide.
2013-06-10 10:55:57 +00:00
Sergey Sharybin
e8408efdba Correction to previous maya keymap commit
Added UNDOflag to the wrong operator..
2013-06-10 10:45:25 +00:00
Bastien Montagne
93c1bf6d88 Fix for r57316: SPACE_EMPTY *is* needed in RNA enum for now, exported keymaps abuse it...
So for now, static enum is back to its previous form, and the menu one is dynamically generated by a callback. Not nice, but works.
2013-06-10 10:37:24 +00:00
Sergey Sharybin
00f37e911b Fix #35661: Maya key config - select operations are skipped by "undo" 2013-06-10 09:57:10 +00:00
Sergey Sharybin
252e7431f6 Made blender compilable with strict flags again.
Maybe Joshua would want to check on arguments for nlaevalchan_verify.
2013-06-10 09:45:55 +00:00
Sergey Sharybin
84429e5d39 Fix #35683: Addon working fine in console. But crashed when click GUI button.
Crash happened in ED_view3d_calc_zfac and happend in cases operator was invoked
from a region different from RGN_TYPE_WINDOW.

For a transformation zfac is only used in convertViewVec in cases region is
RGN_TYPE_WINDOW, so solved by just adding extra check in calculateCenter
for this particular case.
2013-06-10 09:45:51 +00:00
Campbell Barton
cae0d9df52 optimize customdata lookups for subdivision. 2013-06-10 05:18:45 +00:00
Joshua Leung
27d792fa9c Bugfixes [#35263], [#35382] NLA Animated Influence is ignored if strips below
have zero total influence

Previously, when evaluating the NLA stack at a particular point in time, if a
channel hadn't been encountered before, influence values were simply ignored
when accumulating the values contributed by each strip to the overall stack.

This behaviour simplified the handling of the problem of what "baseline" to
blend relative to (i.e. influence basically scales the magnitude of a scalar
around 0, but we may not exactly want a property to get it's value set to 0 as
baseline). However, the problem was that this meant that you'd get popping
artifacts when the a lower strip finally reaches influence=0 but your upper
strips haven't fully reached maximum yet ([#35382]). Another problem was that
you'd end up with less ability to scale the influence of all strips (as in
[#35263]).

So, as a stop-gap fix now, we will allow influence scaling to work on these
strips too. This still doesn't fix some of the other problems regarding
baselines/rest-poses and deterministic behaviour when some channels are only
keyed in one strip which isn't set to extend it's influence... Fixing those
issues is a bit more involved, and would require a bit of refactoring of how we
keep track of accumulation channels.
2013-06-10 05:10:58 +00:00
Joshua Leung
6f2e36f4ee Bugfix [#35643] Animated textures are invisible in Graph Editor if it is not
linked via material

Textures linked to modifiers are now shown in the AnimEditor channel hierarchy
under object level now (i.e. on same level as ob-data, shapekeys, and object's
action). This makes it possible to edit such animation data without having to
ensure that these textures are also linked to the object's material so that they
will appear.

As a side-effect of how this is implemented, if playback is slower on scenes
following this commit, disable the "modifier" filter under the filtering
settings in the relevant animation editor header. In particular, it may be
beneficial to disable this when you've got scenes with meshes that have many
modifiers (but none of these have any linked data with settings which can be
animated), as Blender will still try to go through all those modifiers checking
for anything to show.
2013-06-10 04:39:05 +00:00
Campbell Barton
501f655503 fix [#35648] Loop cut, smoothness showing wrong symmetrical
this is more of a feature request then a bug, but nicer to use even smoothing offset for loopcut smoothing.
2013-06-10 04:33:05 +00:00
Campbell Barton
e3afec1461 fix [#35669] Snap curvepoints dont work correct when another object is selected
Ctrl+Click extrude curves now supports snapping to faces as with meshes.
2013-06-10 03:56:50 +00:00
Campbell Barton
355f87d3d4 fix [#35670] Selectionmode LMB dont change the controlling for putting curve points with strg+lmb 2013-06-10 02:28:19 +00:00
Campbell Barton
0d699fb46a minor edit to previous commit, only show option to reload the file if its been saved. 2013-06-10 02:05:38 +00:00
Campbell Barton
412c043474 Python script auto-execution changes:
- script execution is off by default

- if a blend file attempts to execute a script
  this shows a message in the header with the action
  that was suppressed (script/driver/game-autostart) and 2 buttons to either reload the file trusted, or to ignore the message.

- the file selector will always default to use the trust setting in the user preferences,
  but reloading an open file will keep using the current setting (whatever was set before or set on the command-line).

- added SCons setting WITH_BF_PYTHON_SECURITY, this sets the default state for the user prefereces not to trust blend files on load.
  ... this option was in CMake before, but always off, now its enabled by default for SCons and CMake, and forced on in CMake for now.
2013-06-10 00:42:16 +00:00
Campbell Barton
e7a487d1e9 code cleanup: group python reset functions in BPY_python_reset() 2013-06-09 23:31:53 +00:00
Campbell Barton
e70476db4b fix [#35663] Some object types don't draw bounds other than "Box" 2013-06-09 21:29:20 +00:00
Campbell Barton
a91964e0e2 code cleanup: use boolean for intersection functions. 2013-06-09 21:25:27 +00:00
Thomas Dinges
cf359f6c7f Cycles / Wavelength to RGB node:
* Added a node to convert wavelength (in nanometer, from 380nm to 780nm) to RGB values. This can be useful to match real world colors easier.

Example render:
http://www.pasteall.org/pic/show.php?id=53202

ToDo:
* Move some functions into an util file, maybe a common util_color.h or so.
* Test GPU, unfortunately sm_21 doesn't work for me yet.
2013-06-09 20:46:22 +00:00
Thomas Dinges
cca324e468 SVN merge r57315-57319 into soc-2013-dingto 2013-06-09 20:28:16 +00:00
Campbell Barton
eabb30a236 patch [#35631] Active element for Lattice
by Kevin Mackay (yakca)

Was one of our TODO's from the wiki.
2013-06-09 20:28:08 +00:00
Brecht Van Lommel
28add50083 Fix #35696: cycles crash with no world assigned to scene, after recent changes. 2013-06-09 18:05:53 +00:00
Brecht Van Lommel
860fce4eb9 Code cleanup: removed some unused UI button types
* CHARTAB: not needed anymore with improved copy/paste support and text input.
* IDPOIN: replaced by SEARCH_MENU.
* ICONROW/ICONTEXTROW: replaced by RNA enums.
* NUMABS: can use min/max limits instead.
* BUT_TOGDUAL, TOG3, TOGR, SLI: not used in 2.5 interface.
2013-06-09 18:05:50 +00:00
Brecht Van Lommel
13b3b425f8 Fix #35665: cycles CUDA crash after recent changes. This works around a compiler
bug in CUDA 4.2 (solved in 5.5) with typedef'd function parameters.
2013-06-09 16:37:04 +00:00
Bastien Montagne
0123c7d2be This commit replaces old "manual" Editors menu with nice RNA-based one (so once again, some cleanup of old UI code). It makes the following changes:
* RNA's editor types enum (space_type_items) has been re-ordered, added icons, and removed internal-only SPACE_EMPTY value, so that it matches the menu.

* Two fixes in code drawing enums as dropdown menu:
** All items were taken into account when computing the number of needed columns, now simple separators (void string items) are ignored.
** Simple separators items were drawn as labels, taking far too much space!

And now translators will be free from that ugly, insane menu-string! :P

Thanks to Brecht for the review.
2013-06-09 16:18:23 +00:00
Brecht Van Lommel
e50ef3c2b6 Create soc-2013-dingto branch for shader nodes project 2013-06-09 15:17:03 +00:00
Thomas Dinges
49115b4dd3 Cycles:
* Use float_to_int() functions in a few more places.
2013-06-09 15:09:15 +00:00
Sergey Sharybin
b2c81664ae Fix #35611: 'Quick Edit' in Texture mode + RGBA16bit gives bright results
Was missing linearization of colro came from byte buffer.
2013-06-09 14:20:46 +00:00
Joshua Leung
05ffe37df4 NLA Editor: It is now possible to add strips to AnimData blocks with no existing
tracks

As a convenience feature for those who are loading in action libraries and using
these to quickly block out things in the NLA editor, it is now possible to add
strips to AnimData blocks without first manually creating empty tracks to add
these strips to. Simply ensure that such empty AnimData blocks are selected
(Hint: click on the action line of the affected AnimData block to do so), and
try to add a strip normally.
2013-06-09 13:13:47 +00:00
Sergey Sharybin
40f21d829d Fix #35638: Object disappears when rotating after using the simplify brush 2013-06-09 12:53:17 +00:00
Joshua Leung
f3a4eab751 jpbouza Feature Request: Transformation Constraint now allows applies rotation
offsets too (like for location)

This is useful in some cases when Copy Rotation constraints would otherwise be
used for this purpose but cannot be used for various reasons. Basically, this
works in practically the same way that the Copy Rotation offsets work, including
the same weirdness that you'll get when trying to manually rotate these in the
3D viewport using "global" space manipulations ("local/normal" spaces though
still seem to work really nicely).

WARNING: this may potentially break old files with transform constraint setups
involving rotation outputs. Please check whether this causes any problems on old
files, and report back if there are any issues.
2013-06-09 12:30:13 +00:00
Joshua Leung
79ef7169e9 Bugfix [#35686] Grease pencil to curve conversion causes NAN weights on vertices
When you convert a grease pencil stroke to a polygon curve and look at the
vertices, the first and last vertex have weight = 0, but all others have a -NaN
value. This was caused by division by zero issues when minmax_weights[0] ==
minmax_weights[1].
2013-06-09 12:05:29 +00:00
Brecht Van Lommel
d749413ef7 Fix related to #35681: avoid some unnecessary cycles updated when using exclude
render layers.
2013-06-09 11:57:51 +00:00
Brecht Van Lommel
0f4e775689 Fix #35677, #35525: cycles viewport not updating properly in some situations.
Revision 56883 broke a mechanism where cycles tags itself to be updated later
while it is busy.
2013-06-09 11:57:50 +00:00