Commit Graph

177 Commits

Author SHA1 Message Date
3e555d3d78 Merge branch 'master' into blender2.8 2017-08-21 15:41:03 +10:00
592dd9dea6 Modify menu from last commit
Also correct tool-tip.
2017-08-21 15:24:40 +10:00
361c7cbbc5 Fix T52434: Restore mesh center of mass calculation
The new method while improved for solid objects
doesn't work for non-manifold meshes, keep both.
2017-08-21 15:19:08 +10:00
1b462e5a51 Pass EvaluationContext instead of bContext
2.8x branch added bContext arg in many places,
pass eval-context instead since its not simple to reason about what
what nested functions do when they can access and change almost anything.

Also use const to prevent unexpected modifications.

This fixes crash loading files with shadows,
since off-screen buffers use a NULL context for rendering.
2017-08-16 12:46:04 +10:00
9567529b8f Merge branch 'master' into blender2.8 2017-08-12 00:23:49 +10:00
30e83d58ff Object Apply Transform: option to apply properties
In some cases users may want to disable this option
to avoid changing other properties besides vertex locations.
2017-08-11 22:32:07 +10:00
459365443f Manipulator: experimental lamp positioning tool
- New manipulator tracks lamps to position under cursor.
- Works with multiple lamps, keeping relative offsets.
- Holding Ctrl moves the lamp.
- Access via manipulator or Shift-T.

Code could be improved, but like to get feedback from users.
2017-08-06 19:50:09 +10:00
1c4c288727 Pass EvaluationContext argument everywhere
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
2017-07-21 14:47:26 +02:00
2475dbdc94 Merge branch 'master' into blender2.8 2017-07-18 13:09:36 +10:00
06505c5264 Fix T39925: Set Origin to Geometry on a new text object moves the origin away from the object
No need to take into account font size here...
2017-07-17 12:56:12 +02:00
0782c9f8dc Fix T51920: Invalidate draw cache when changing object origin 2017-06-28 14:58:25 +02:00
d675415eef Replace all old DAG calls with direct calls to new DEG and remove BKE_depsgraph.h
This removes BKE_depsgraph.h and depsgraph.c
2017-06-08 10:17:04 +02:00
e0c163661d Add missing braces 2016-07-11 08:45:16 +10:00
245f97d7dc Clear Transforms and Deltas
* Alt-G, Alt-R, Alt-S  --> These don't clear delta transforms by default anymore,
  making it possible to use these to properly store a "rest" pose

* Alt-Shift-G, Alt-Shift-R, Alt-Shift-S  --> These WILL clear both the normal
  transform and the delta, should you need to do so.
2016-07-09 12:00:28 +12:00
d231260212 Replace of (id->lib != NULL) check by meaningful macro.
Idea is to replace hard-to-track (id->lib != NULL) 'is linked datablock' check everywhere in Blender
by a macro doing the same thing. This will allow to easily spot those checks in future, and more importantly,
to easily change it (see work done in asset-engine branch).

Note: did not touch to readfile.c, since there most of the time 'id->lib' check actually concerns the pointer,
and not a check whether ID is linked or not. Will have a closer look at it later.

Reviewers: campbellbarton, brecht, sergey

Differential Revision: https://developer.blender.org/D2082
2016-07-06 14:11:01 +02:00
3fcf535d2e Split id->flag in two, persistent flags and runtime tags.
This is purely internal sanitizing/cleanup, no change in behavior is expected at all.

This change was also needed because we were getting short on ID flags, and
future enhancement of 'user_one' ID behavior requires two new ones.

id->flag remains for persistent data (fakeuser only, so far!), this also allows us
100% backward & forward compatibility.

New id->tag is used for most flags. Though written in .blend files, its content
is cleared at read time.

Note that .blend file version was bumped, so that we can clear runtimeflags from
old .blends, important in case we add new persistent flags in future.

Also, behavior of tags (either status ones, or whether they need to be cleared before/after use)
has been added as comments to their declaration.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D1683
2015-12-27 12:00:33 +01:00
9e56c570c3 Cleanup: use more logical names for View3D.around
D1651 (own patch)
2015-12-01 18:53:26 +11:00
e0c05a1e6a Support applying scale for font objects 2015-10-12 13:13:38 +11:00
c760c0dbb3 Cleanup: use mul_v3_mat3_m4v3 2015-04-28 01:18:50 +10:00
bcbbc66795 Cleanup: unused headers 2014-11-28 15:52:30 +01:00
cbe68f70a8 Cleanup: spelling 2014-09-29 15:51:47 +10:00
e8f3fa99de Support more object types scene-scale (on creation)
- lamp
- camera
- font
- empty & effector

Also fix inconsistency with apply transform
(modified shape-keys for meshes but not curve/lattice)
2014-09-01 21:01:11 +10:00
b64e36d26d BLI_listbase: consistent name prefix 2014-07-30 15:01:16 +10:00
00b29156e0 Defines: replace ELEM3-16 with ELEM(...), that can take varargs 2014-07-20 01:33:40 +10:00
38a430c027 Fix T40029: Apply transform to empties reset their location
also add check for negative scale
2014-05-05 15:47:25 +10:00
4769b44bdd Fix T39745: "Origin to geometry" not working with Text objects. (regression) 2014-04-16 13:19:31 +10:00
a15b3c4d11 Code cleanup: use bool 2014-04-11 11:33:29 +10:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
be8f628b89 Fix T38851: Apply Transform doesn't work when called from search popup 2014-02-27 13:39:35 +11:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
f5076d54cb 'Transform' Python Function for armature, curve and lattice.
patch by Paolo Acampora with some edits.
2013-12-17 23:04:36 +11:00
63caaa2b12 Code Cleanup: rename vars for detecting change to be more consistent
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
2013-11-26 06:39:14 +11:00
ff7dbdbaee rename give_cursor to ED_view3d_cursor3d_get 2013-10-26 04:07:18 +00:00
206359db25 fix [#36771] Prevent 'Apply Transform' for Objects with a linked mesh 2013-09-18 22:45:14 +00:00
ea94411db6 Enable vertex snapping to bundle positions
This means it's possible now to snap stuff to
reconstructed tracks positions.
2013-09-09 11:37:37 +00:00
2e0422b17f add function for rotating linked list so at item is last. 2013-09-05 11:40:38 +00:00
0a24e05cb3 Apply Scale for Empties
It is now possible to use "Apply Scale" for Empties. While Empties don't exactly
have any Object data attached to them which can be used for supporting "true"
apply scale (i.e. with non-uniform scaling), they do have a drawsize value which
controls how large the empties are drawn (before scaling). This works by taking
the scale factor on the most-scaled axis, and combines this with the existing
empty drawsize to maintain the correct dimensions on that axis at least.

Core Assumptions:
1) Most scaled empties have uniform scaling anyways (i.e. most empties used for
bone shapes)
2) On balance, preserving non-uniform scaling of empties after apply scale is
not as important as not being able to do it at all
2013-09-02 22:57:22 +00:00
48a637a4e4 warn when applying transformation does nothing, confusion pointed out in [#36583] 2013-08-28 04:17:48 +00:00
d4ab6f3a9e fix [#36107] Moving origin of instanced objects doesn't work properly
now use the active object first if its selected, this means when multiple instances are selected, using the active object gives a predictable outcome.
2013-07-15 01:34:59 +00:00
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
682da3ac98 Apply scale on scene reconstruction when applying scale on camera
This means when you've got reconstructed scene assigned to a
3d camera (via camera solver constraint) and applies scale on
this camera from Ctrl-A menu, scale will be applied on the
reconstructed scene and reset camera size to identity.

This is very useful feature for scene orientation, when you'll
just scale camera by S in the viewport to match bundles
some points in the space, and then you'll easiy make camera
have identity scale (which is needed for nice working moblur
and other things mentioning by Sebastian :) without loosing
scale of bundles themselves.

Behavior of apply scale for cameras without clip assigned
to them does not change at all.
2013-05-13 13:37:05 +00:00
6da961775f code cleanup: rename BKE_tessmesh -> BKE_editmesh, rename EditDerivedBMesh.tc -> em. ('tc' is odd name which isn't used elsewhere). 2013-04-13 20:31:52 +00:00
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
e8d42ab48e Properly prefixing name of exproted armature API 2013-02-27 23:56:51 +00:00
20220d47e3 Dependency Graph: some refactoring which should have no user visible impact
besides performance in some cases.

* DAG_scene_sort is now removed and replaced by DAG_relations_tag_update in
  most cases. This will clear the dependency graph, and only rebuild it right
  before it's needed again when the scene is re-evaluated.

  This is done because DAG_scene_sort is slow when called many times from
  python operators. Further the scene argument is not needed because most
  operations can potentially affect more than the current scene.

* DAG_scene_relations_update will now rebuild the dependency graph if it's not
  there yet, and DAG_scene_relations_rebuild will force a rebuild for the rare
  cases that need it.

* Remove various places where ob->recalc was set manually. This should go
  through DAG_id_tag_update() in nearly all cases instead since this is now
  a fast operation. Also removed DAG_ids_flush_update that goes along with
  such manual tagging of ob->recalc.
2013-02-21 19:33:04 +00:00
bc52cb1be3 fix for apply rotation/location failing for surface object types (were recognized as 2d curves). 2013-02-19 14:19:53 +00:00
3a192ca359 patch [#33697] Apply transformation added to metaballs.
from Jesse Werner (vidjogamer), with own addition of RNA function, scale and rotation support.
2013-02-11 10:56:21 +00:00
441c7fb79a fix for crashes running some operators in background mode and some divide by zero errors. 2013-02-06 02:48:03 +00:00
5a51800a41 Compile fix
Patch [#34075] by Davis Sorenson (dsavi), thanks.
2013-02-01 16:03:42 +00:00
496c3e4f8f Fix #34070: set origin operator did not work for lattice objects. 2013-02-01 15:17:39 +00:00