2019-02-12 11:43:33 +11:00
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
* All rights reserved.
|
|
|
|
* DNA handling
|
|
|
|
*/
|
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
* \ingroup DNA
|
2019-02-12 11:43:33 +11:00
|
|
|
*
|
|
|
|
* Defines in this header are only used to define blend file storage.
|
|
|
|
* This allows us to rename variables & structs without breaking compatibility.
|
|
|
|
*
|
|
|
|
* - When renaming the member of a struct which has itself been renamed
|
|
|
|
* refer to the newer name, not the original.
|
|
|
|
*
|
|
|
|
* - Changes here only change generated code for `makesdna.c` and `makesrna.c`
|
|
|
|
* without impacting Blender's run-time, besides allowing us to use the new names.
|
|
|
|
*
|
2019-04-22 01:42:45 +10:00
|
|
|
* - Renaming something that has already been renamed can be done
|
|
|
|
* by editing the existing rename macro.
|
2019-02-12 11:43:33 +11:00
|
|
|
* All references to the previous destination name can be removed since they're
|
|
|
|
* never written to disk.
|
|
|
|
*
|
2019-02-16 12:54:33 +11:00
|
|
|
* - Old names aren't sanity checked (since this file is the only place that knows about them)
|
|
|
|
* typos in the old names will break both backwards & forwards compatibility **TAKE CARE**.
|
|
|
|
*
|
2019-02-17 19:10:34 +11:00
|
|
|
* - Before editing rename defines run:
|
|
|
|
*
|
|
|
|
* `sha1sum $BUILD_DIR/source/blender/makesdna/intern/dna.c`
|
|
|
|
*
|
|
|
|
* Compare the results before & after to ensure all changes are reversed by renaming
|
|
|
|
* and the DNA remains unchanged.
|
|
|
|
*
|
2019-02-18 10:38:34 +11:00
|
|
|
* \see versioning_dna.c for actual version patching.
|
2019-02-12 11:43:33 +11:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* No include guard (intentional). */
|
|
|
|
|
2019-02-16 09:40:19 +11:00
|
|
|
/* Match RNA names where possible, keep sorted. */
|
|
|
|
|
2019-02-27 10:46:48 +11:00
|
|
|
DNA_STRUCT_RENAME(Lamp, Light)
|
2019-02-16 10:44:15 +11:00
|
|
|
DNA_STRUCT_RENAME(SpaceButs, SpaceProperties)
|
2019-02-16 10:16:16 +11:00
|
|
|
DNA_STRUCT_RENAME(SpaceIpo, SpaceGraph)
|
2019-02-16 09:47:19 +11:00
|
|
|
DNA_STRUCT_RENAME(SpaceOops, SpaceOutliner)
|
2019-03-04 01:14:27 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(BPoint, alfa, tilt)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(BezTriple, alfa, tilt)
|
2019-04-23 13:15:30 +03:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Bone, curveInX, curve_in_x)
|
Armature: add B-Bone Y scale channel and extra flag fields to DNA.
In addition to the base bone transformation itself, B-Bones have
controls that affect transformation of its segments. For rotation
the features are quite complete, allowing to both reorient the
Bezier handles via properties, and to control them using custom
handle bones. However for scaling there are two deficiencies.
First, there are only X and Y scale factors (actually X and Z),
while lengthwise all segments have the same scaling. The ease
option merely affects the shape of the curve, and does not cause
actual scaling.
Second, scaling can only be controlled via properties, thus
requiring up to 6 drivers per joint between B-Bones to transfer
scaling factors from the handle bone. This is very inefficient.
Finally, the Z channels are confusingly called Y.
This commit adds a B-Bone Y Scale channel and extra B-Bone flag
fields to DNA with appropriate versioning (including for F-Curves
and drivers) in preparation to addressing these limitations.
Functionality is not changed, so the new fields are not used
until the following commits.
Differential Revision: https://developer.blender.org/D9870
2020-12-11 19:17:39 +03:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Bone, curveInY, curve_in_z)
|
2019-04-23 13:15:30 +03:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Bone, curveOutX, curve_out_x)
|
Armature: add B-Bone Y scale channel and extra flag fields to DNA.
In addition to the base bone transformation itself, B-Bones have
controls that affect transformation of its segments. For rotation
the features are quite complete, allowing to both reorient the
Bezier handles via properties, and to control them using custom
handle bones. However for scaling there are two deficiencies.
First, there are only X and Y scale factors (actually X and Z),
while lengthwise all segments have the same scaling. The ease
option merely affects the shape of the curve, and does not cause
actual scaling.
Second, scaling can only be controlled via properties, thus
requiring up to 6 drivers per joint between B-Bones to transfer
scaling factors from the handle bone. This is very inefficient.
Finally, the Z channels are confusingly called Y.
This commit adds a B-Bone Y Scale channel and extra B-Bone flag
fields to DNA with appropriate versioning (including for F-Curves
and drivers) in preparation to addressing these limitations.
Functionality is not changed, so the new fields are not used
until the following commits.
Differential Revision: https://developer.blender.org/D9870
2020-12-11 19:17:39 +03:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Bone, curveOutY, curve_out_z)
|
2019-05-16 09:47:00 +10:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Bone, scaleIn, scale_in_x)
|
Armature: add B-Bone Y scale channel and extra flag fields to DNA.
In addition to the base bone transformation itself, B-Bones have
controls that affect transformation of its segments. For rotation
the features are quite complete, allowing to both reorient the
Bezier handles via properties, and to control them using custom
handle bones. However for scaling there are two deficiencies.
First, there are only X and Y scale factors (actually X and Z),
while lengthwise all segments have the same scaling. The ease
option merely affects the shape of the curve, and does not cause
actual scaling.
Second, scaling can only be controlled via properties, thus
requiring up to 6 drivers per joint between B-Bones to transfer
scaling factors from the handle bone. This is very inefficient.
Finally, the Z channels are confusingly called Y.
This commit adds a B-Bone Y Scale channel and extra B-Bone flag
fields to DNA with appropriate versioning (including for F-Curves
and drivers) in preparation to addressing these limitations.
Functionality is not changed, so the new fields are not used
until the following commits.
Differential Revision: https://developer.blender.org/D9870
2020-12-11 19:17:39 +03:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Bone, scale_in_y, scale_in_z)
|
2019-05-16 09:47:00 +10:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Bone, scaleOut, scale_out_x)
|
Armature: add B-Bone Y scale channel and extra flag fields to DNA.
In addition to the base bone transformation itself, B-Bones have
controls that affect transformation of its segments. For rotation
the features are quite complete, allowing to both reorient the
Bezier handles via properties, and to control them using custom
handle bones. However for scaling there are two deficiencies.
First, there are only X and Y scale factors (actually X and Z),
while lengthwise all segments have the same scaling. The ease
option merely affects the shape of the curve, and does not cause
actual scaling.
Second, scaling can only be controlled via properties, thus
requiring up to 6 drivers per joint between B-Bones to transfer
scaling factors from the handle bone. This is very inefficient.
Finally, the Z channels are confusingly called Y.
This commit adds a B-Bone Y Scale channel and extra B-Bone flag
fields to DNA with appropriate versioning (including for F-Curves
and drivers) in preparation to addressing these limitations.
Functionality is not changed, so the new fields are not used
until the following commits.
Differential Revision: https://developer.blender.org/D9870
2020-12-11 19:17:39 +03:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Bone, scale_out_y, scale_out_z)
|
2020-03-17 11:29:54 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(BrushGpencilSettings, gradient_f, hardeness)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(BrushGpencilSettings, gradient_s, aspect_ratio)
|
2019-02-16 09:40:19 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Camera, YF_dofdist, dof_distance)
|
2020-07-23 11:50:03 +10:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Curve, len_wchar, len_char32)
|
2019-02-16 12:21:44 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Camera, clipend, clip_end)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(Camera, clipsta, clip_start)
|
2019-02-18 10:38:34 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Collection, dupli_ofs, instance_offset)
|
2019-12-17 14:00:19 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(FluidDomainSettings, cache_frame_pause_guiding, cache_frame_pause_guide)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(FluidDomainSettings, guiding_alpha, guide_alpha)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(FluidDomainSettings, guiding_beta, guide_beta)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(FluidDomainSettings, guiding_parent, guide_parent)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(FluidDomainSettings, guiding_source, guide_source)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(FluidDomainSettings, guiding_vel_factor, guide_vel_factor)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(FluidEffectorSettings, guiding_mode, guide_mode)
|
2020-06-23 09:54:14 +10:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Image, name, filepath)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(Library, name, filepath)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(MovieClip, name, filepath)
|
2019-02-19 08:44:53 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Object, col, color)
|
2019-02-17 19:00:54 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Object, dup_group, instance_collection)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(Object, dupfacesca, instance_faces_scale)
|
2019-02-18 15:43:06 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Object, size, scale)
|
2019-02-17 19:00:54 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(ParticleSettings, dup_group, instance_collection)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(ParticleSettings, dup_ob, instance_object)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(ParticleSettings, dupliweights, instance_weights)
|
2020-06-23 09:54:14 +10:00
|
|
|
DNA_STRUCT_RENAME_ELEM(Text, name, filepath)
|
2019-05-28 16:17:15 +10:00
|
|
|
DNA_STRUCT_RENAME_ELEM(ThemeSpace, scrubbing_background, time_scrub_background)
|
2020-03-17 11:29:54 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(ThemeSpace, show_back_grad, background_type)
|
2020-07-28 22:06:44 +10:00
|
|
|
DNA_STRUCT_RENAME_ELEM(UserDef, gp_manhattendist, gp_manhattandist)
|
2020-06-23 09:54:14 +10:00
|
|
|
DNA_STRUCT_RENAME_ELEM(VFont, name, filepath)
|
2019-02-16 12:21:44 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(View3D, far, clip_end)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(View3D, near, clip_start)
|
2020-03-17 11:32:03 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(View3D, ob_centre, ob_center)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(View3D, ob_centre_bone, ob_center_bone)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(View3D, ob_centre_cursor, ob_center_cursor)
|
2020-03-17 11:29:54 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(bGPDstroke, gradient_f, hardeness)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bGPDstroke, gradient_s, aspect_ratio)
|
2019-04-23 13:15:30 +03:00
|
|
|
DNA_STRUCT_RENAME_ELEM(bPoseChannel, curveInX, curve_in_x)
|
Armature: add B-Bone Y scale channel and extra flag fields to DNA.
In addition to the base bone transformation itself, B-Bones have
controls that affect transformation of its segments. For rotation
the features are quite complete, allowing to both reorient the
Bezier handles via properties, and to control them using custom
handle bones. However for scaling there are two deficiencies.
First, there are only X and Y scale factors (actually X and Z),
while lengthwise all segments have the same scaling. The ease
option merely affects the shape of the curve, and does not cause
actual scaling.
Second, scaling can only be controlled via properties, thus
requiring up to 6 drivers per joint between B-Bones to transfer
scaling factors from the handle bone. This is very inefficient.
Finally, the Z channels are confusingly called Y.
This commit adds a B-Bone Y Scale channel and extra B-Bone flag
fields to DNA with appropriate versioning (including for F-Curves
and drivers) in preparation to addressing these limitations.
Functionality is not changed, so the new fields are not used
until the following commits.
Differential Revision: https://developer.blender.org/D9870
2020-12-11 19:17:39 +03:00
|
|
|
DNA_STRUCT_RENAME_ELEM(bPoseChannel, curveInY, curve_in_z)
|
2019-04-23 13:15:30 +03:00
|
|
|
DNA_STRUCT_RENAME_ELEM(bPoseChannel, curveOutX, curve_out_x)
|
Armature: add B-Bone Y scale channel and extra flag fields to DNA.
In addition to the base bone transformation itself, B-Bones have
controls that affect transformation of its segments. For rotation
the features are quite complete, allowing to both reorient the
Bezier handles via properties, and to control them using custom
handle bones. However for scaling there are two deficiencies.
First, there are only X and Y scale factors (actually X and Z),
while lengthwise all segments have the same scaling. The ease
option merely affects the shape of the curve, and does not cause
actual scaling.
Second, scaling can only be controlled via properties, thus
requiring up to 6 drivers per joint between B-Bones to transfer
scaling factors from the handle bone. This is very inefficient.
Finally, the Z channels are confusingly called Y.
This commit adds a B-Bone Y Scale channel and extra B-Bone flag
fields to DNA with appropriate versioning (including for F-Curves
and drivers) in preparation to addressing these limitations.
Functionality is not changed, so the new fields are not used
until the following commits.
Differential Revision: https://developer.blender.org/D9870
2020-12-11 19:17:39 +03:00
|
|
|
DNA_STRUCT_RENAME_ELEM(bPoseChannel, curveOutY, curve_out_z)
|
2019-05-16 09:47:00 +10:00
|
|
|
DNA_STRUCT_RENAME_ELEM(bPoseChannel, scaleIn, scale_in_x)
|
Armature: add B-Bone Y scale channel and extra flag fields to DNA.
In addition to the base bone transformation itself, B-Bones have
controls that affect transformation of its segments. For rotation
the features are quite complete, allowing to both reorient the
Bezier handles via properties, and to control them using custom
handle bones. However for scaling there are two deficiencies.
First, there are only X and Y scale factors (actually X and Z),
while lengthwise all segments have the same scaling. The ease
option merely affects the shape of the curve, and does not cause
actual scaling.
Second, scaling can only be controlled via properties, thus
requiring up to 6 drivers per joint between B-Bones to transfer
scaling factors from the handle bone. This is very inefficient.
Finally, the Z channels are confusingly called Y.
This commit adds a B-Bone Y Scale channel and extra B-Bone flag
fields to DNA with appropriate versioning (including for F-Curves
and drivers) in preparation to addressing these limitations.
Functionality is not changed, so the new fields are not used
until the following commits.
Differential Revision: https://developer.blender.org/D9870
2020-12-11 19:17:39 +03:00
|
|
|
DNA_STRUCT_RENAME_ELEM(bPoseChannel, scale_in_y, scale_in_z)
|
2019-05-16 09:47:00 +10:00
|
|
|
DNA_STRUCT_RENAME_ELEM(bPoseChannel, scaleOut, scale_out_x)
|
Armature: add B-Bone Y scale channel and extra flag fields to DNA.
In addition to the base bone transformation itself, B-Bones have
controls that affect transformation of its segments. For rotation
the features are quite complete, allowing to both reorient the
Bezier handles via properties, and to control them using custom
handle bones. However for scaling there are two deficiencies.
First, there are only X and Y scale factors (actually X and Z),
while lengthwise all segments have the same scaling. The ease
option merely affects the shape of the curve, and does not cause
actual scaling.
Second, scaling can only be controlled via properties, thus
requiring up to 6 drivers per joint between B-Bones to transfer
scaling factors from the handle bone. This is very inefficient.
Finally, the Z channels are confusingly called Y.
This commit adds a B-Bone Y Scale channel and extra B-Bone flag
fields to DNA with appropriate versioning (including for F-Curves
and drivers) in preparation to addressing these limitations.
Functionality is not changed, so the new fields are not used
until the following commits.
Differential Revision: https://developer.blender.org/D9870
2020-12-11 19:17:39 +03:00
|
|
|
DNA_STRUCT_RENAME_ELEM(bPoseChannel, scale_out_y, scale_out_z)
|
Maintain Volume: introduce an option switching between modes.
After a lot of thinking about this, I decided that all operation modes
that I've tried over the past couple of years, including the original
2.79 one, have their uses after all. Thus the only reasonable solution
is to add yet another option.
The modes are:
- Strict: The current 2.80 mode, which overrides the original scaling
of the non-free axes to strictly preserve the volume. This is the most
obvious way one would expect a 'Maintain Volume' constraint to work.
- Uniform: The original 2.79 mode, which assumes that all axes have been
scaled the same as the free one when computing the volume. This seems
strange, but the net effect is that when simply scaling the object
uniformly with S, the volume is preserved; however, scaling the non-
free axes individually allows deviating from the locked volume.
This was obviously intended as a more or less convenient UI tool.
- Single Axis: My own variant of the intent of the Uniform scale, which
does volume-preserving if the object is scaled just on the Free axis,
while passing the non-free axis scaling through. I.e. instead of
uniform S scaling, the user has to scale the object just on its
primary axis to achieve constant volume. This can allow reducing the
number of animation curves when only constant volume scaling is needed,
or be an easier to control tool inside a complex rig.
2019-05-06 21:47:51 +03:00
|
|
|
DNA_STRUCT_RENAME_ELEM(bSameVolumeConstraint, flag, free_axis)
|
2020-06-23 09:54:14 +10:00
|
|
|
DNA_STRUCT_RENAME_ELEM(bSound, name, filepath)
|
2019-02-16 16:13:12 +11:00
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, tact, space_action)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, tbuts, space_properties)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, tclip, space_clip)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, tconsole, space_console)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, text, space_text)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, tfile, space_file)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, tima, space_image)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, tinfo, space_info)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, tipo, space_graph)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, tnla, space_nla)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, tnode, space_node)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, toops, space_outliner)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, tseq, space_sequencer)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, tstatusbar, space_statusbar)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, ttopbar, space_topbar)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, tuserpref, space_preferences)
|
|
|
|
DNA_STRUCT_RENAME_ELEM(bTheme, tv3d, space_view3d)
|
2020-09-02 14:14:47 +02:00
|
|
|
DNA_STRUCT_RENAME_ELEM(RigidBodyWorld, steps_per_second, substeps_per_frame)
|
2020-11-06 11:52:55 +01:00
|
|
|
/* Write with a different name, old Blender versions crash loading files with non-NULL
|
|
|
|
* global_areas. See D9442. */
|
|
|
|
DNA_STRUCT_RENAME_ELEM(wmWindow, global_area_map, global_areas)
|
2021-03-18 14:21:18 +01:00
|
|
|
DNA_STRUCT_RENAME_ELEM(LineartGpencilModifierData, line_types, edge_types)
|