Commit Graph

61743 Commits

Author SHA1 Message Date
af7967b010 CPython: py_capi_utils: format char utilities do not need to be inline. 2018-10-07 12:22:17 -03:00
91bfea5b05 CPython: py_capi_utils: use more descriptive names for format string utilities. 2018-10-07 12:21:09 -03:00
ee2e30683c Cleanup: style 2018-10-07 17:49:22 +11:00
db1a04313c Fix crash unregistering parent panel before children.
This caused crashes with addon enabling/disabling and template loading.
2018-10-06 20:56:31 +02:00
7d5fb2e103 Vertex Paint: support switching to secondary color temporarily holding Ctrl
while it is possible to permanently flip the colors using the 'X' button, this makes it consistent with Texture Paint.

fixes T56994

Reviewers: campbellbarton, brecht

Reviewed By: brecht

Subscribers: JulienKaspar

Tags: #sculpting_and_painting

Maniphest Tasks: T56994

Differential Revision: https://developer.blender.org/D3753
2018-10-06 15:11:24 +02:00
495a7128cb Cleanup: use the naming convention in py_capi_utils
And use inline functions instead of preprocessor directives.
2018-10-06 01:15:15 -03:00
0f55334413 Cleanup: use new format string utility 2018-10-06 00:13:54 -03:00
98e62d459a py_capi_utils: add utilities for format string in struct module style syntax. 2018-10-06 00:13:40 -03:00
Dalai Felinto
bb0b4b008e Pseudo-fix for ARMATURE_OT_autoside_names and x-mirror
It now works like 2.7x. That said this operator is kind of incompatible with
x-mirror (the way it is implemented anyways). But if people were happy with
this in 2.7x they will be multi-object happier.

That said, do turn off x-mirror before using this or select all bones, or just
stop using this operator altogether ;)

Jokes aside, the operator can also be fixed. It shouldn't be hard.
2018-10-05 19:50:20 -03:00
Dalai Felinto
d5e72c0e96 Fix for ARMATURE_OT_flip_names and x-mirror
There was a reason this was using CTX_DATA_BEGIN in the first place.
Issue introduced on 47cf8bd928.
2018-10-05 19:29:19 -03:00
Dalai Felinto
c762074b7b Multi-Objects: ARMATURE_OT_parent_clear 2018-10-05 19:08:30 -03:00
Dalai Felinto
219a4987b9 Multi-Objects: ARMATURE_OT_symmetrize 2018-10-05 18:34:16 -03:00
Dalai Felinto
fa8e91f03c Multi-Objects: ARMATURE_OT_separate 2018-10-05 18:13:57 -03:00
Dalai Felinto
74e01d2235 Multi-Objects: ARMATURE_OT_split 2018-10-05 17:55:54 -03:00
Dalai Felinto
7d1bf58760 Silence warning 2018-10-05 17:55:34 -03:00
Dalai Felinto
28d617199d ARMATURE_OT_fill: cleanup
Remove nonsensical insanity check.
Remove FIXME that would never be addressed anyways.
2018-10-05 17:50:09 -03:00
Dalai Felinto
d67972a9e1 Multi-Objects: ARMATURE_OT_merge
Also removed the insane insanity check. This would fail in the
poll function. No point in that level of paranoia.

And return OPERATOR_FINISHED regardless. Since this has a parameter
(though not used) you may get want to tweak REDO (in the future).
2018-10-05 17:50:09 -03:00
9bd65528e3 GPU Python: optionally init the vertexformat in the vertexbuffer itself. 2018-10-05 17:22:03 -03:00
Dalai Felinto
8882b3d7b6 Multi-Objects: ARMATURE_OT_autoside_names 2018-10-05 17:02:37 -03:00
a33a4e132e Add and use a utility for computing B-Bone roll from custom handles.
This also fixes a stability problem with the start handle
due to an incorrect matrix multiplication order.
2018-10-05 21:52:01 +03:00
8044743741 Texture Paint: reorganize texture slots UI panel. 2018-10-05 20:09:59 +02:00
84f8862b06 Texture Paint: automatically set default color when adding texture slot. 2018-10-05 20:09:59 +02:00
975af239ed Fix wrong RNA handling of some internal pchan pointers.
There were two issues here:
* cutsom_shape_transform was not properly tagged as not-owned pointer.
* custom_shape_transform and bbone_start/_end could be set to a pchan from
  another data-block (not from UI, but RNA access code itself allowed it).

Those two issues were specificaly breaking complex rigs in static
override case.

EDIT: since yesterday, bbone_start/_end are mere accessors to edit_bone
data in RNA, so most of fix related to those was ditched (they still needed
to be 'deactivated' from RNA diffing with PROPOVERRIDE_NO_COMPARISON).
2018-10-05 20:07:51 +02:00
Dalai Felinto
0b8e92783e Multi-Objects: ARMATURE_OT_duplicate 2018-10-05 15:05:51 -03:00
550fee8eb6 GPU Python: use _PyArg_ParseTupleAndKeywordsFast. 2018-10-05 14:38:35 -03:00
25bd9feadb Add a new B-Bone Custom Handle type that uses the handle bone direction.
Both original handle types are based on location, and Absolute uses it
in a weird way: the Start handle uses the head, while End uses the tail.

This makes controlling the shape of the B-Bone via control bone rotation
really non-intuitive, especially if trying to add a single control for
the tangent in the middle of a B-Bone chain.

To remedy this, add a new custom handle type that uses the orientation
of the control bone, while completely ignoring location. It is even
possible to control both ends of one B-Bone with the same handle bone,
resulting in an S shape.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3769
2018-10-05 20:19:58 +03:00
Dalai Felinto
6723e173a5 Multi-Objects: ARMATURE_OT_click_extrude
This operator is actually working as expected, but I added some
comments explained that it was already "ported".
2018-10-05 14:01:16 -03:00
Dalai Felinto
1d6817d580 Fixes for ARMATURE_OT_extrude / ARMATURE_OT_extrude_move
* Return OPERATOR_FINISHED only if at least one object succeeded.
* Have a per object fork value, otherwise an object may influence the next.
(which is why we should use `const foo = ...; foo_iter = foo;`)
2018-10-05 13:33:31 -03:00
Dalai Felinto
234d609f94 Multi-Objects: ARMATURE_OT_extrude / ARMATURE_OT_extrude_move
Based on D3384 by Nick Milios.
2018-10-05 13:21:07 -03:00
Dalai Felinto
13dfb91149 Multi-Objects: ARMATURE_OT_calculate_roll
The patch itself was fine (save for sending notifiers for objects instead of ob).
But I couldn't apply it, so I re-did from scratch.

Based on D3394 by @codemanx
2018-10-05 12:56:27 -03:00
Dalai Felinto
def3b8c68c Multi-Objects: ARMATURE_OT_roll_clear 2018-10-05 12:37:07 -03:00
Dalai Felinto
149e912b1f Special enum item when no sound is found
This happens when you build without sound libraries and such.
Without that the console is spammed with tons of RNA messages because
the enum is empty.
2018-10-05 12:37:07 -03:00
eab00bf202 GPU Python: fix crash when calling batch.draw without passing a shader. 2018-10-05 11:55:17 -03:00
35dcc3d4f4 Transform: hide the Dial3d drawing if the operator has not been called by a Gizmo. 2018-10-05 10:43:06 -03:00
44df83a588 Dial3d Gizmo: consider the offset value in the incremental angle drawing.
This prevents misalignment with the Spin tool gizmo for example.
2018-10-05 10:43:06 -03:00
564d37c4b6 Python API: new GPUVertFormat constructor and vbo.fill_attribute method
Reviewer: fclem

Differential Revision: https://developer.blender.org/D3760
2018-10-05 15:10:56 +02:00
7c443ded1e Vertex Paint: multiply vertex paint overlay
Fixes the first part of T56999.

Reviewer: brecht

Differential Revision: https://developer.blender.org/D3768
2018-10-05 14:05:48 +02:00
3c0736bc4b Redefine the Relative custom B-Bone handle type to be more reasonable.
Specifically, it should always use the position of the custom handle
bone head, even when affecting the handle at the tail of the main bone,
and shouldn't apply the special handling for joining two B-Bones.

This handle type was unusably broken before a bug fix included in
recent changes, so it should be safe to break backward compatibility.
2018-10-05 13:29:05 +03:00
e8f135c2cf GP: Cleanup grid RNA settings moving to separated struct 2018-10-05 10:23:31 +02:00
f28dd2c944 Cleanup: capitalize runtime in struct name 2018-10-05 17:20:23 +10:00
b69301d4aa Context: add uv_sculpt_object
While this may be temporary, it avoids copy-pasting these
checks in Python code.
2018-10-05 17:10:27 +10:00
8b05d38305 GP: Cleanup names and code 2018-10-05 08:59:33 +02:00
f36f029321 Cleanup: style 2018-10-05 15:01:58 +10:00
402bde39d1 UI: show uv sculpt options in topbar & toolsettings 2018-10-05 14:54:53 +10:00
1b38effd5f RNA: add access to tool mode 2018-10-05 13:29:51 +10:00
143ece7199 Tool System: initial support for UV-sculpt
This currently conflicts with the UV-sculpt toggle being manually set,
ideally this would work more like other paint modes in Blender.
2018-10-05 13:13:30 +10:00
c15439bcdc Cleanup: use PyModule_AddIntConstant 2018-10-04 23:53:57 -03:00
b0c1fe3618 Fix invalid flag passed to mesh batch dirty tag 2018-10-05 11:22:08 +10:00
0b98a679bb UI: rename Border Select -> Box Select
See: T56648
2018-10-05 10:29:31 +10:00
50cb8013eb UI: rename overlay: Ornaments -> Extras
See: T56648
2018-10-05 09:49:09 +10:00