2011-02-17 05:57:18 +00:00
|
|
|
/*
|
2008-10-31 23:50:02 +00: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,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2008-10-31 23:50:02 +00:00
|
|
|
*/
|
|
|
|
|
|
2021-01-04 13:10:22 +11:00
|
|
|
/* Use a define instead of `#pragma once` because of `rna_internal.h` */
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __RNA_ACCESS_H__
|
|
|
|
|
#define __RNA_ACCESS_H__
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup RNA
|
2011-02-17 05:57:18 +00:00
|
|
|
*/
|
|
|
|
|
|
2009-04-07 00:49:39 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
2008-11-14 14:34:19 +00:00
|
|
|
#include "RNA_types.h"
|
|
|
|
|
|
2013-09-01 15:01:15 +00:00
|
|
|
#include "BLI_compiler_attrs.h"
|
|
|
|
|
|
2009-03-14 23:17:55 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2008-11-24 15:51:55 +00:00
|
|
|
struct ID;
|
2019-06-14 23:16:04 +02:00
|
|
|
struct IDOverrideLibrary;
|
|
|
|
|
struct IDOverrideLibraryProperty;
|
|
|
|
|
struct IDOverrideLibraryPropertyOperation;
|
2019-12-17 10:08:47 +11:00
|
|
|
struct IDProperty;
|
2011-05-18 11:21:10 +00:00
|
|
|
struct ListBase;
|
2008-11-07 02:58:25 +00:00
|
|
|
struct Main;
|
2009-06-18 19:48:55 +00:00
|
|
|
struct ReportList;
|
2009-12-08 17:23:48 +00:00
|
|
|
struct Scene;
|
2019-01-28 21:08:24 +11:00
|
|
|
struct bContext;
|
2008-11-07 02:58:25 +00:00
|
|
|
|
2008-11-24 15:51:55 +00:00
|
|
|
/* Types */
|
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
|
|
|
extern BlenderRNA BLENDER_RNA;
|
2018-10-30 11:06:19 +11:00
|
|
|
|
|
|
|
|
/* Keep sorted. */
|
2009-01-05 16:31:00 +00:00
|
|
|
extern StructRNA RNA_Action;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ActionConstraint;
|
2011-07-13 14:41:12 +00:00
|
|
|
extern StructRNA RNA_ActionFCurves;
|
2009-01-07 21:05:51 +00:00
|
|
|
extern StructRNA RNA_ActionGroup;
|
2011-07-13 14:41:12 +00:00
|
|
|
extern StructRNA RNA_ActionGroups;
|
|
|
|
|
extern StructRNA RNA_ActionPoseMarkers;
|
2010-02-26 14:28:29 +00:00
|
|
|
extern StructRNA RNA_Addon;
|
2012-12-29 10:24:42 +00:00
|
|
|
extern StructRNA RNA_AddonPreferences;
|
2011-05-16 17:14:47 +00:00
|
|
|
extern StructRNA RNA_AdjustmentSequence;
|
2008-12-02 23:45:11 +00:00
|
|
|
extern StructRNA RNA_AlwaysSensor;
|
2009-02-02 11:51:10 +00:00
|
|
|
extern StructRNA RNA_AnimData;
|
2010-01-07 22:54:05 +00:00
|
|
|
extern StructRNA RNA_AnimViz;
|
|
|
|
|
extern StructRNA RNA_AnimVizMotionPaths;
|
2009-04-07 00:49:39 +00:00
|
|
|
extern StructRNA RNA_AnyType;
|
2020-12-04 08:13:54 +01:00
|
|
|
extern StructRNA RNA_AOV;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_Area;
|
2018-06-27 14:41:53 +02:00
|
|
|
extern StructRNA RNA_AreaLight;
|
2008-12-09 11:29:40 +00:00
|
|
|
extern StructRNA RNA_Armature;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_ArmatureGpencilModifier;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_ArmatureModifier;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_ArrayGpencilModifier;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_ArrayModifier;
|
2020-07-03 15:30:04 +02:00
|
|
|
extern StructRNA RNA_Attribute;
|
|
|
|
|
extern StructRNA RNA_AttributeGroup;
|
2020-12-11 18:15:25 +01:00
|
|
|
extern StructRNA RNA_AssetMetaData;
|
|
|
|
|
extern StructRNA RNA_AssetTag;
|
2009-05-31 01:22:34 +00:00
|
|
|
extern StructRNA RNA_BackgroundImage;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_BevelModifier;
|
2009-11-29 16:42:51 +00:00
|
|
|
extern StructRNA RNA_BezierSplinePoint;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_BlendData;
|
2020-05-29 14:50:29 +10:00
|
|
|
extern StructRNA RNA_BlendDataLibraries;
|
2009-11-29 16:42:51 +00:00
|
|
|
extern StructRNA RNA_BlendTexture;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_BlenderRNA;
|
2009-07-21 14:11:51 +00:00
|
|
|
extern StructRNA RNA_BoidRule;
|
|
|
|
|
extern StructRNA RNA_BoidRuleAverageSpeed;
|
|
|
|
|
extern StructRNA RNA_BoidRuleAvoid;
|
|
|
|
|
extern StructRNA RNA_BoidRuleAvoidCollision;
|
|
|
|
|
extern StructRNA RNA_BoidRuleFight;
|
|
|
|
|
extern StructRNA RNA_BoidRuleFollowLeader;
|
|
|
|
|
extern StructRNA RNA_BoidRuleGoal;
|
|
|
|
|
extern StructRNA RNA_BoidSettings;
|
|
|
|
|
extern StructRNA RNA_BoidState;
|
2008-12-09 11:29:40 +00:00
|
|
|
extern StructRNA RNA_Bone;
|
2009-07-21 10:18:08 +00:00
|
|
|
extern StructRNA RNA_BoneGroup;
|
2021-02-11 13:44:58 +01:00
|
|
|
extern StructRNA RNA_BoolAttribute;
|
2011-12-01 22:08:42 +00:00
|
|
|
extern StructRNA RNA_BoolProperty;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_BooleanModifier;
|
2008-12-01 06:52:18 +00:00
|
|
|
extern StructRNA RNA_Brush;
|
2019-01-15 10:53:02 +11:00
|
|
|
extern StructRNA RNA_BrushCapabilitiesImagePaint;
|
|
|
|
|
extern StructRNA RNA_BrushCapabilitiesVertexPaint;
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
extern StructRNA RNA_BrushTextureSlot;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_BuildGpencilModifier;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_BuildModifier;
|
2020-07-03 15:30:04 +02:00
|
|
|
extern StructRNA RNA_ByteColorAttribute;
|
|
|
|
|
extern StructRNA RNA_ByteColorAttributeValue;
|
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
|
|
|
extern StructRNA RNA_CacheFile;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Camera;
|
2019-05-17 16:57:31 +02:00
|
|
|
extern StructRNA RNA_CameraDOFSettings;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_CastModifier;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ChildOfConstraint;
|
|
|
|
|
extern StructRNA RNA_ChildParticle;
|
|
|
|
|
extern StructRNA RNA_ClampToConstraint;
|
2009-01-04 19:25:24 +00:00
|
|
|
extern StructRNA RNA_ClothCollisionSettings;
|
2009-01-07 21:05:51 +00:00
|
|
|
extern StructRNA RNA_ClothModifier;
|
2009-01-04 19:25:24 +00:00
|
|
|
extern StructRNA RNA_ClothSettings;
|
2009-04-09 20:33:39 +00:00
|
|
|
extern StructRNA RNA_CloudsTexture;
|
Collections and groups unification
OVERVIEW
* In 2.7 terminology, all layers and groups are now collection datablocks.
* These collections are nestable, linkable, instanceable, overrideable, ..
which opens up new ways to set up scenes and link + override data.
* Viewport/render visibility and selectability are now a part of the collection
and shared across all view layers and linkable.
* View layers define which subset of the scene collection hierarchy is excluded
for each. For many workflows one view layer can be used, these are more of an
advanced feature now.
OUTLINER
* The outliner now has a "View Layer" display mode instead of "Collections",
which can display the collections and/or objects in the view layer.
* In this display mode, collections can be excluded with the right click menu.
These will then be greyed out and their objects will be excluded.
* To view collections not linked to any scene, the "Blender File" display mode
can be used, with the new filtering option to just see Colleciton datablocks.
* The outliner right click menus for collections and objects were reorganized.
* Drag and drop still needs to be improved. Like before, dragging the icon or
text gives different results, we'll unify this later.
LINKING AND OVERRIDES
* Collections can now be linked into the scene without creating an instance,
with the link/append operator or from the collections view in the outliner.
* Collections can get static overrides with the right click menu in the outliner,
but this is rather unreliable and not clearly communicated at the moment.
* We still need to improve the make override operator to turn collection instances
into collections with overrides directly in the scene.
PERFORMANCE
* We tried to make performance not worse than before and improve it in some
cases. The main thing that's still a bit slower is multiple scenes, we have to
change the layer syncing to only updated affected scenes.
* Collections keep a list of their parent collections for faster incremental
updates in syncing and caching.
* View layer bases are now in a object -> base hash to avoid quadratic time
lookups internally and in API functions like visible_get().
VERSIONING
* Compatibility with 2.7 files should be improved due to the new visibility
controls. Of course users may not want to set up their scenes differently
now to avoid having separate layers and groups.
* Compatibility with 2.8 is mostly there, and was tested on Eevee demo and Hero
files. There's a few things which are know to be not quite compatible, like
nested layer collections inside groups.
* The versioning code for 2.8 files is quite complicated, and isolated behind
#ifdef so it can be removed at the end of the release cycle.
KNOWN ISSUES
* The G-key group operators in the 3D viewport were left mostly as is, they
need to be modified still to fit better.
* Same for the groups panel in the object properties. This needs to be updated
still, or perhaps replaced by something better.
* Collections must all have a unique name. Less restrictive namespacing is to
be done later, we'll have to see how important this is as all objects within
the collections must also have a unique name anyway.
* Full scene copy and delete scene are exactly doing the right thing yet.
Differential Revision: https://developer.blender.org/D3383
https://code.blender.org/2018/05/collections-and-groups/
2018-04-30 15:57:22 +02:00
|
|
|
extern StructRNA RNA_Collection;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_CollectionProperty;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_CollisionModifier;
|
2009-01-02 13:47:33 +00:00
|
|
|
extern StructRNA RNA_CollisionSettings;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_ColorGpencilModifier;
|
|
|
|
|
extern StructRNA RNA_ColorManagedDisplaySettings;
|
2012-12-24 15:51:27 +00:00
|
|
|
extern StructRNA RNA_ColorManagedInputColorspaceSettings;
|
|
|
|
|
extern StructRNA RNA_ColorManagedSequencerColorspaceSettings;
|
Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.
This introduces two configurable color spaces:
- Input color space for images and movie clips. This space is used to convert
images/movies from color space in which file is saved to Blender's linear
space (for float images, byte images are not internally converted, only input
space is stored for such images and used later).
This setting could be found in image/clip data block settings.
- Display color space which defines space in which particular display is working.
This settings could be found in scene's Color Management panel.
When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.
This conversions are:
- View, which defines tone curve applying before display transformation.
These are different ways to view the image on the same display device.
For example it could be used to emulate film view on sRGB display.
- Exposure affects on image exposure before tone map is applied.
- Gamma is post-display gamma correction, could be used to match particular
display gamma.
- RGB curves are user-defined curves which are applying before display
transformation, could be used for different purposes.
All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.
This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).
Some technical notes:
- Image buffer's float buffer is now always in linear space, even if it was
created from 16bit byte images.
- Space of byte buffer is stored in image buffer's rect_colorspace property.
- Profile of image buffer was removed since it's not longer meaningful.
- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
to support other spaces, but it's quite large project which isn't so
much important.
- Legacy Color Management option disabled is emulated by using None display.
It could have some regressions, but there's no clear way to avoid them.
- If OpenColorIO is disabled on build time, it should make blender behaving
in the same way as previous release with color management enabled.
More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management
--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 10:05:07 +00:00
|
|
|
extern StructRNA RNA_ColorManagedViewSettings;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_ColorMixSequence;
|
2009-01-06 00:56:20 +00:00
|
|
|
extern StructRNA RNA_ColorRamp;
|
|
|
|
|
extern StructRNA RNA_ColorRampElement;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_ColorSequence;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_CompositorNode;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeAlphaOver;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeBilateralblur;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeBlur;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeBrightContrast;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeChannelMatte;
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeChromaMatte;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeColorMatte;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeColorSpill;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeCombHSVA;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeCombRGBA;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeCombYCCA;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeCombYUVA;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeComposite;
|
2017-08-10 21:01:03 +10:00
|
|
|
extern StructRNA RNA_CompositorNodeCornerPin;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeCrop;
|
Compositor: Redesign Cryptomatte node for better usability
In the current implementation, cryptomatte passes are connected to the node
and elements are picked by using the eyedropper tool on a special pick channel.
This design has two disadvantages - both connecting all passes individually
and always having to switch to the picker channel are tedious.
With the new design, the user selects the RenderLayer or Image from which the
Cryptomatte layers are directly loaded (the type of pass is determined by an
enum). This allows the node to automatically detect all relevant passes.
Then, when using the eyedropper tool, the operator looks up the selected
coordinates from the picked Image, Node backdrop or Clip and reads the picked
object directly from the Renderlayer/Image, therefore allowing to pick in any
context (e.g. by clicking on the Combined pass in the Image Viewer). The
sampled color is looked up in the metadata and the actual name is stored
in the cryptomatte node. This also allows to remove a hash by just removing
the name from the matte id.
Technically there is some loss of flexibility because the Cryptomatte pass
inputs can no longer be connected to other nodes, but since any compositing
done on them is likely to break the Cryptomatte system anyways, this isn't
really a concern in practise.
In the future, this would also allow to automatically translate values to names
by looking up the value in the associated metadata of the input, or to get a
better visualization of overlapping areas in the Pick output since we could
blend colors now that the output doesn't have to contain the exact value.
Idea + Original patch: Lucas Stockner
Reviewed By: Brecht van Lommel
Differential Revision: https://developer.blender.org/D3959
2021-03-16 07:37:30 +01:00
|
|
|
extern StructRNA RNA_CompositorNodeCryptomatte;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeCryptomatteV2;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeCurveRGB;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeCurveVec;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeDBlur;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeDefocus;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeDiffMatte;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeDilateErode;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeDisplace;
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeDistanceMatte;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_CompositorNodeDoubleEdgeMask;
|
2020-12-19 14:40:31 -05:00
|
|
|
extern StructRNA RNA_CompositorNodeExposure;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeFilter;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeFlip;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeGamma;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeGlare;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeHueSat;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeIDMask;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeImage;
|
2012-08-06 15:59:09 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeInpaint;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeInvert;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeLensdist;
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeLevels;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeLumaMatte;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_CompositorNodeMapRange;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeMapUV;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeMapValue;
|
2012-06-04 16:42:58 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeMask;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_CompositorNodeMath;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeMixRGB;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeNormal;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeNormalize;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeOutputFile;
|
|
|
|
|
extern StructRNA RNA_CompositorNodePremulKey;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeRGB;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeRGBToBW;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeRLayers;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeRotate;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeScale;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeSepHSVA;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeSepRGBA;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeSepYCCA;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeSepYUVA;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeSetAlpha;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeSplitViewer;
|
2017-08-09 15:36:42 +10:00
|
|
|
extern StructRNA RNA_CompositorNodeSunBeams;
|
2015-04-06 10:40:12 -03:00
|
|
|
extern StructRNA RNA_CompositorNodeSwitchView;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeTexture;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeTime;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeTonemap;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeTranslate;
|
2010-12-02 01:18:59 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeTree;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeValToRGB;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeValue;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeVecBlur;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeViewer;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeZcombine;
|
2009-07-21 14:11:51 +00:00
|
|
|
extern StructRNA RNA_ConsoleLine;
|
2008-12-12 23:30:23 +00:00
|
|
|
extern StructRNA RNA_Constraint;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ConstraintTarget;
|
2018-11-14 14:01:28 +03:00
|
|
|
extern StructRNA RNA_ConstraintTargetBone;
|
2009-03-19 19:03:38 +00:00
|
|
|
extern StructRNA RNA_Context;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_CopyLocationConstraint;
|
|
|
|
|
extern StructRNA RNA_CopyRotationConstraint;
|
|
|
|
|
extern StructRNA RNA_CopyScaleConstraint;
|
2010-01-02 04:14:17 +00:00
|
|
|
extern StructRNA RNA_CopyTransformsConstraint;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_CorrectiveSmoothModifier;
|
2020-12-14 16:14:21 +01:00
|
|
|
extern StructRNA RNA_CryptomatteEntry;
|
2008-12-01 19:02:27 +00:00
|
|
|
extern StructRNA RNA_Curve;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_CurveMap;
|
2009-11-29 16:42:51 +00:00
|
|
|
extern StructRNA RNA_CurveMapPoint;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_CurveMapping;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_CurveModifier;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_CurvePoint;
|
2019-11-20 16:12:32 -05:00
|
|
|
extern StructRNA RNA_CurveProfile;
|
|
|
|
|
extern StructRNA RNA_CurveProfilePoint;
|
2009-10-30 06:33:40 +00:00
|
|
|
extern StructRNA RNA_DampedTrackConstraint;
|
2015-01-09 21:19:12 +01:00
|
|
|
extern StructRNA RNA_DataTransferModifier;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_DecimateModifier;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_Depsgraph;
|
|
|
|
|
extern StructRNA RNA_DepsgraphObjectInstance;
|
|
|
|
|
extern StructRNA RNA_DepsgraphUpdate;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_DisplaceModifier;
|
2015-01-19 16:30:35 +11:00
|
|
|
extern StructRNA RNA_DisplaySafeAreas;
|
2009-04-09 20:33:39 +00:00
|
|
|
extern StructRNA RNA_DistortedNoiseTexture;
|
2011-07-13 14:41:12 +00:00
|
|
|
extern StructRNA RNA_DopeSheet;
|
2009-02-02 11:51:10 +00:00
|
|
|
extern StructRNA RNA_Driver;
|
Animato - Drivers with Multiple Targets:
Drivers now support multiple targets which act as 'variables'. The targets have a short 'name' (see later), and reference some property (in much the same way as F-Curves do, using RNA-Paths) which acts as the 'value'.
These named variables can then be used in a Python Expression which relates them to each other for more fine-grained control over the result of the driver. By using only the names of these variables in the expressions, we are able to define expressions/relationships in a much more readable way, as data access is separated from data use. This makes the underlying relationships easier to understand.
By default, if no Python Expression is given, the variables are simply averaged together, so old files won't break. :)
For example, check the following diagram (thanks Cessen/Nathan V from Peach team):
http://download.blender.org/ftp/incoming/250_drivers_mockup_cessen.png
TODO List:
* Depsgraph building for new driver relationships doesn't work yet. This needs to be recoded again, but this new system makes this much easier, since the targets are clearly defined (i.e. no need to parse py expressions to get list of objects)
* Graph Editor interface for editing these needs to be rewritten
* Python function for evaluating these expressions is needed (Campbell?)
2009-04-16 07:37:06 +00:00
|
|
|
extern StructRNA RNA_DriverTarget;
|
Durian Request: Drivers Recode
Highlights:
* Support for Multi-Target Variables
This was the main reason for this recode. Previously, variables could only be used to give some RNA property used as an input source to the driver a name. However, this meant that effects such as Rotational Difference couldn't be used in conjunction with other effects and/or settings to achieve the powerful results. Now, a variable can take several input targets, perform some interesting operations on them, and spit out a representative value based on that.
* New Variable Types
With the introduction of multi-target variables, there are now 3 types of variable that can be used: single property (i.e. the only type previously), Rotational Difference (angle between two bones), and Distance (distance between two objects or bones).
* New Driver Types
In addition to the existing 'Average', 'Sum', and 'Expression' types, there is now the additional options of 'Minimum' and 'Maximum'. These take the smallest/largest value that one of the variables evaluates to.
* Fix for Driver F-Curve colouring bug
Newly added drivers did not get automatically coloured in the Graph Editor properly. Was caused by inappropriate notifiers being used.
Notes:
* This commit breaks existing 2.5 files with drivers (in other words, they are lost forever).
* Rigify has been corrected to work with the new system. The PyAPI for accessing targets used for the variables could still be made nicer (using subclassing to directly access?), but that is left for later.
* Version patching for 2.49 files still needs to be put back in place.
2010-01-04 21:15:45 +00:00
|
|
|
extern StructRNA RNA_DriverVariable;
|
2011-06-16 10:41:00 +00:00
|
|
|
extern StructRNA RNA_DynamicPaintBrushSettings;
|
2011-05-24 07:08:58 +00:00
|
|
|
extern StructRNA RNA_DynamicPaintCanvasSettings;
|
|
|
|
|
extern StructRNA RNA_DynamicPaintModifier;
|
2011-06-16 10:41:00 +00:00
|
|
|
extern StructRNA RNA_DynamicPaintSurface;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_EdgeSplitModifier;
|
2009-06-19 14:56:49 +00:00
|
|
|
extern StructRNA RNA_EditBone;
|
2009-11-29 16:42:51 +00:00
|
|
|
extern StructRNA RNA_EffectSequence;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_EffectorWeights;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_EnumProperty;
|
|
|
|
|
extern StructRNA RNA_EnumPropertyItem;
|
2009-07-21 14:11:51 +00:00
|
|
|
extern StructRNA RNA_Event;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_ExplodeModifier;
|
2009-02-02 11:51:10 +00:00
|
|
|
extern StructRNA RNA_FCurve;
|
2009-07-02 04:47:36 +00:00
|
|
|
extern StructRNA RNA_FCurveSample;
|
2012-01-13 12:34:41 +00:00
|
|
|
extern StructRNA RNA_FFmpegSettings;
|
2009-04-19 10:44:07 +00:00
|
|
|
extern StructRNA RNA_FModifier;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_FModifierCycles;
|
|
|
|
|
extern StructRNA RNA_FModifierEnvelope;
|
2009-07-02 12:41:03 +00:00
|
|
|
extern StructRNA RNA_FModifierEnvelopeControlPoint;
|
2009-07-02 02:12:37 +00:00
|
|
|
extern StructRNA RNA_FModifierFunctionGenerator;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_FModifierGenerator;
|
|
|
|
|
extern StructRNA RNA_FModifierLimits;
|
|
|
|
|
extern StructRNA RNA_FModifierNoise;
|
|
|
|
|
extern StructRNA RNA_FModifierPython;
|
2010-03-18 13:04:46 +00:00
|
|
|
extern StructRNA RNA_FModifierStepped;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_FaceMap;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_FieldSettings;
|
2020-12-14 13:50:36 +01:00
|
|
|
extern StructRNA RNA_FileAssetSelectParams;
|
2015-02-11 00:09:45 +01:00
|
|
|
extern StructRNA RNA_FileBrowserFSMenuEntry;
|
2020-12-14 13:50:36 +01:00
|
|
|
extern StructRNA RNA_FileSelectEntry;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_FileSelectParams;
|
2020-07-03 15:30:04 +02:00
|
|
|
extern StructRNA RNA_FloatAttribute;
|
|
|
|
|
extern StructRNA RNA_FloatAttributeValue;
|
|
|
|
|
extern StructRNA RNA_FloatColorAttribute;
|
|
|
|
|
extern StructRNA RNA_FloatColorAttributeValue;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_FloatProperty;
|
2021-02-20 11:33:43 +01:00
|
|
|
extern StructRNA RNA_Float2Attribute;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_FloorConstraint;
|
2020-02-10 10:08:31 +11:00
|
|
|
extern StructRNA RNA_FluidDomainSettings;
|
|
|
|
|
extern StructRNA RNA_FluidEffectorSettings;
|
|
|
|
|
extern StructRNA RNA_FluidFlowSettings;
|
|
|
|
|
extern StructRNA RNA_FluidModifier;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_FluidSettings;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_FollowPathConstraint;
|
2010-06-25 22:45:42 +00:00
|
|
|
extern StructRNA RNA_FreestyleLineSet;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_FreestyleLineStyle;
|
2009-10-07 05:16:23 +00:00
|
|
|
extern StructRNA RNA_FreestyleModuleSettings;
|
2010-06-25 22:45:42 +00:00
|
|
|
extern StructRNA RNA_FreestyleSettings;
|
2009-04-07 00:49:39 +00:00
|
|
|
extern StructRNA RNA_Function;
|
2020-04-20 15:27:12 +02:00
|
|
|
extern StructRNA RNA_FunctionNode;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_GPencilFrame;
|
2017-01-18 16:43:17 +13:00
|
|
|
extern StructRNA RNA_GPencilInterpolateSettings;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_GPencilLayer;
|
|
|
|
|
extern StructRNA RNA_GPencilSculptBrush;
|
2019-01-11 19:15:23 +01:00
|
|
|
extern StructRNA RNA_GPencilSculptGuide;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_GPencilSculptSettings;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_GPencilStroke;
|
|
|
|
|
extern StructRNA RNA_GPencilStrokePoint;
|
2014-08-13 08:37:41 +10:00
|
|
|
extern StructRNA RNA_GaussianBlurSequence;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_Gizmo;
|
|
|
|
|
extern StructRNA RNA_GizmoGroupProperties;
|
|
|
|
|
extern StructRNA RNA_GizmoProperties;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_GlowSequence;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_GpencilModifier;
|
2009-08-27 06:03:41 +00:00
|
|
|
extern StructRNA RNA_GreasePencil;
|
2020-03-17 14:41:48 +01:00
|
|
|
extern StructRNA RNA_Hair;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_Header;
|
2010-01-19 01:32:06 +00:00
|
|
|
extern StructRNA RNA_Histogram;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_HookGpencilModifier;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_HookModifier;
|
2008-11-24 15:51:55 +00:00
|
|
|
extern StructRNA RNA_ID;
|
2019-06-14 23:16:04 +02:00
|
|
|
extern StructRNA RNA_IDOverrideLibrary;
|
|
|
|
|
extern StructRNA RNA_IDOverrideLibraryProperty;
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
extern StructRNA RNA_IKParam;
|
2008-11-30 18:39:49 +00:00
|
|
|
extern StructRNA RNA_Image;
|
2011-11-21 20:19:58 +00:00
|
|
|
extern StructRNA RNA_ImageFormatSettings;
|
2009-07-25 22:31:02 +00:00
|
|
|
extern StructRNA RNA_ImagePaint;
|
2015-05-11 16:29:12 +02:00
|
|
|
extern StructRNA RNA_ImagePreview;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_ImageSequence;
|
2009-04-09 20:33:39 +00:00
|
|
|
extern StructRNA RNA_ImageTexture;
|
2008-11-30 18:39:49 +00:00
|
|
|
extern StructRNA RNA_ImageUser;
|
2020-07-03 15:30:04 +02:00
|
|
|
extern StructRNA RNA_IntAttribute;
|
|
|
|
|
extern StructRNA RNA_IntAttributeValue;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_IntProperty;
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
extern StructRNA RNA_Itasc;
|
2008-12-03 21:18:10 +00:00
|
|
|
extern StructRNA RNA_Key;
|
2009-11-29 16:42:51 +00:00
|
|
|
extern StructRNA RNA_KeyConfig;
|
2018-11-16 11:24:49 +11:00
|
|
|
extern StructRNA RNA_KeyConfigPreferences;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_KeyMap;
|
|
|
|
|
extern StructRNA RNA_KeyMapItem;
|
2011-07-02 03:17:09 +00:00
|
|
|
extern StructRNA RNA_KeyMapItems;
|
2010-02-10 08:53:08 +00:00
|
|
|
extern StructRNA RNA_Keyframe;
|
2009-02-13 01:51:33 +00:00
|
|
|
extern StructRNA RNA_KeyingSet;
|
== Massive Keying Sets Recode ==
After a few days of wrong turns and learning the finer points of RNA-type-subclassing the hard way, this commit finally presents a refactored version of the Keying Sets system (now version 2) based on some requirements from Cessen.
For a more thorough discussion of this commit, see
http://sites.google.com/site/aligorith/keyingsets_2.pdf?attredirects=0&d=1
------
The main highlight of this refactor is that relative Keying Sets have now been recoded so that Python callbacks are run to generate the Keying Set's list of paths everytime the Keying Set is used (to insert or delete keyframes), allowing complex heuristics to be used to determine whether a property gets keyframed based on the current context. These checks may include checking on selection status of related entities, or transform locks.
Built-In KeyingSets have also been recoded, and moved from C and out into Python. These are now coded as Relative Keying Sets, and can to some extent serve as basis for adding new relative Keying Sets. However, these have mostly been coded in a slightly 'modular' way which may be confusing for those not so familiar with Python in general. A usable template will be added soon for more general usage.
Keyframing settings (i.e. 'visual', 'needed') can now be specified on a per-path basis now, which is especially useful for Absolute Keying Sets, where control over this is often beneficial.
Most of the places where Auto-Keyframing is performed have been tidied up for consistency. I'm sure quite a few issues still exist there, but these I'll clean up over the next few days.
2010-03-16 06:18:49 +00:00
|
|
|
extern StructRNA RNA_KeyingSetInfo;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_KeyingSetPath;
|
2011-07-13 14:41:12 +00:00
|
|
|
extern StructRNA RNA_KeyingSetsAll;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_KinematicConstraint;
|
2013-11-24 07:00:49 +11:00
|
|
|
extern StructRNA RNA_LaplacianDeformModifier;
|
2012-10-24 10:39:11 +00:00
|
|
|
extern StructRNA RNA_LaplacianSmoothModifier;
|
2008-11-30 18:39:49 +00:00
|
|
|
extern StructRNA RNA_Lattice;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_LatticeGpencilModifier;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_LatticeModifier;
|
2009-01-02 14:48:03 +00:00
|
|
|
extern StructRNA RNA_LatticePoint;
|
Render Layers and Collections (merge from render-layers)
Design Documents
----------------
* https://wiki.blender.org/index.php/Dev:2.8/Source/Layers
* https://wiki.blender.org/index.php/Dev:2.8/Source/DataDesignRevised
User Commit Log
---------------
* New Layer and Collection system to replace render layers and viewport layers.
* A layer is a set of collections of objects (and their drawing options) required for specific tasks.
* A collection is a set of objects, equivalent of the old layers in Blender. A collection can be shared across multiple layers.
* All Scenes have a master collection that all other collections are children of.
* New collection "context" tab (in Properties Editor)
* New temporary viewport "collections" panel to control per-collection
visibility
Missing User Features
---------------------
* Collection "Filter"
Option to add objects based on their names
* Collection Manager operators
The existing buttons are placeholders
* Collection Manager drawing
The editor main region is empty
* Collection Override
* Per-Collection engine settings
This will come as a separate commit, as part of the clay-engine branch
Dev Commit Log
--------------
* New DNA file (DNA_layer_types.h) with the new structs
We are replacing Base by a new extended Base while keeping it backward
compatible with some legacy settings (i.e., lay, flag_legacy).
Renamed all Base to BaseLegacy to make it clear the areas of code that
still need to be converted
Note: manual changes were required on - deg_builder_nodes.h, rna_object.c, KX_Light.cpp
* Unittesting for main syncronization requirements
- read, write, add/copy/remove objects, copy scene, collection
link/unlinking, context)
* New Editor: Collection Manager
Based on patch by Julian Eisel
This is extracted from the layer-manager branch. With the following changes:
- Renamed references of layer manager to collections manager
- I doesn't include the editors/space_collections/ draw and util files
- The drawing code itself will be implemented separately by Julian
* Base / Object:
A little note about them. Original Blender code would try to keep them
in sync through the code, juggling flags back and forth. This will now
be handled by Depsgraph, keeping Object and Bases more separated
throughout the non-rendering code.
Scene.base is being cleared in doversion, and the old viewport drawing
code was poorly converted to use the new bases while the new viewport
code doesn't get merged and replace the old one.
Python API Changes
------------------
```
- scene.layers
+ # no longer exists
- scene.objects
+ scene.scene_layers.active.objects
- scene.objects.active
+ scene.render_layers.active.objects.active
- bpy.context.scene.objects.link()
+ bpy.context.scene_collection.objects.link()
- bpy_extras.object_utils.object_data_add(context, obdata, operator=None, use_active_layer=True, name=None)
+ bpy_extras.object_utils.object_data_add(context, obdata, operator=None, name=None)
- bpy.context.object.select
+ bpy.context.object.select = True
+ bpy.context.object.select = False
+ bpy.context.object.select_get()
+ bpy.context.object.select_set(action='SELECT')
+ bpy.context.object.select_set(action='DESELECT')
-AddObjectHelper.layers
+ # no longer exists
```
2017-02-07 10:18:38 +01:00
|
|
|
extern StructRNA RNA_LayerCollection;
|
2019-02-14 23:32:53 +11:00
|
|
|
extern StructRNA RNA_LayerObjects;
|
2021-05-20 23:35:53 +08:00
|
|
|
extern StructRNA RNA_LengthGpencilModifier;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Library;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_Light;
|
|
|
|
|
extern StructRNA RNA_LightProbe;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_LimitDistanceConstraint;
|
|
|
|
|
extern StructRNA RNA_LimitLocationConstraint;
|
|
|
|
|
extern StructRNA RNA_LimitRotationConstraint;
|
|
|
|
|
extern StructRNA RNA_LimitScaleConstraint;
|
2010-07-20 17:57:33 +00:00
|
|
|
extern StructRNA RNA_LineStyleAlphaModifier;
|
|
|
|
|
extern StructRNA RNA_LineStyleAlphaModifier_AlongStroke;
|
2015-07-10 21:57:23 +09:00
|
|
|
extern StructRNA RNA_LineStyleAlphaModifier_CreaseAngle;
|
|
|
|
|
extern StructRNA RNA_LineStyleAlphaModifier_Curvature_3D;
|
2010-07-20 17:57:33 +00:00
|
|
|
extern StructRNA RNA_LineStyleAlphaModifier_DistanceFromCamera;
|
|
|
|
|
extern StructRNA RNA_LineStyleAlphaModifier_DistanceFromObject;
|
2011-07-24 23:29:19 +00:00
|
|
|
extern StructRNA RNA_LineStyleAlphaModifier_Material;
|
2015-07-10 21:57:23 +09:00
|
|
|
extern StructRNA RNA_LineStyleAlphaModifier_Noise;
|
|
|
|
|
extern StructRNA RNA_LineStyleAlphaModifier_Tangent;
|
2010-07-20 17:57:33 +00:00
|
|
|
extern StructRNA RNA_LineStyleColorModifier;
|
|
|
|
|
extern StructRNA RNA_LineStyleColorModifier_AlongStroke;
|
2015-07-10 21:57:23 +09:00
|
|
|
extern StructRNA RNA_LineStyleColorModifier_CreaseAngle;
|
|
|
|
|
extern StructRNA RNA_LineStyleColorModifier_Curvature_3D;
|
2010-07-20 17:57:33 +00:00
|
|
|
extern StructRNA RNA_LineStyleColorModifier_DistanceFromCamera;
|
|
|
|
|
extern StructRNA RNA_LineStyleColorModifier_DistanceFromObject;
|
2011-07-24 23:29:19 +00:00
|
|
|
extern StructRNA RNA_LineStyleColorModifier_Material;
|
2015-07-10 21:57:23 +09:00
|
|
|
extern StructRNA RNA_LineStyleColorModifier_Noise;
|
|
|
|
|
extern StructRNA RNA_LineStyleColorModifier_Tangent;
|
2011-08-19 14:05:11 +00:00
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier;
|
2012-01-04 00:23:34 +00:00
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier_2DOffset;
|
|
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier_2DTransform;
|
2011-08-19 14:05:11 +00:00
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier_BackboneStretcher;
|
|
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier_BezierCurve;
|
2011-11-11 20:35:03 +00:00
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier_Blueprint;
|
2011-11-01 09:47:41 +00:00
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier_GuidingLines;
|
2011-08-19 14:05:11 +00:00
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier_PerlinNoise1D;
|
|
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier_PerlinNoise2D;
|
2011-11-01 09:47:41 +00:00
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier_Polygonalization;
|
2011-08-19 14:05:11 +00:00
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier_Sampling;
|
2015-07-10 21:57:23 +09:00
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier_Simplification;
|
2011-08-19 14:05:11 +00:00
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier_SinusDisplacement;
|
|
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier_SpatialNoise;
|
|
|
|
|
extern StructRNA RNA_LineStyleGeometryModifier_TipRemover;
|
2010-07-20 17:57:33 +00:00
|
|
|
extern StructRNA RNA_LineStyleModifier;
|
2014-05-03 18:51:53 +09:00
|
|
|
extern StructRNA RNA_LineStyleTextureSlot;
|
2010-07-20 17:57:33 +00:00
|
|
|
extern StructRNA RNA_LineStyleThicknessModifier;
|
|
|
|
|
extern StructRNA RNA_LineStyleThicknessModifier_AlongStroke;
|
2011-09-11 19:57:38 +00:00
|
|
|
extern StructRNA RNA_LineStyleThicknessModifier_Calligraphy;
|
2015-07-10 21:57:23 +09:00
|
|
|
extern StructRNA RNA_LineStyleThicknessModifier_CreaseAngle;
|
|
|
|
|
extern StructRNA RNA_LineStyleThicknessModifier_Curvature_3D;
|
2010-07-20 17:57:33 +00:00
|
|
|
extern StructRNA RNA_LineStyleThicknessModifier_DistanceFromCamera;
|
|
|
|
|
extern StructRNA RNA_LineStyleThicknessModifier_DistanceFromObject;
|
2011-07-24 23:29:19 +00:00
|
|
|
extern StructRNA RNA_LineStyleThicknessModifier_Material;
|
2015-07-10 21:57:23 +09:00
|
|
|
extern StructRNA RNA_LineStyleThicknessModifier_Noise;
|
|
|
|
|
extern StructRNA RNA_LineStyleThicknessModifier_Tangent;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_LockedTrackConstraint;
|
2010-02-10 08:53:08 +00:00
|
|
|
extern StructRNA RNA_Macro;
|
2009-04-09 20:33:39 +00:00
|
|
|
extern StructRNA RNA_MagicTexture;
|
|
|
|
|
extern StructRNA RNA_MarbleTexture;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_Mask;
|
|
|
|
|
extern StructRNA RNA_MaskLayer;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_MaskModifier;
|
2012-06-07 18:24:36 +00:00
|
|
|
extern StructRNA RNA_MaskSequence;
|
2008-11-27 13:36:28 +00:00
|
|
|
extern StructRNA RNA_Material;
|
2009-06-03 23:22:43 +00:00
|
|
|
extern StructRNA RNA_MaterialSlot;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_Menu;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Mesh;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_MeshCacheModifier;
|
2020-09-29 16:02:40 +02:00
|
|
|
extern StructRNA RNA_MeshToVolumeModifier;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_MeshColor;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_MeshDeformModifier;
|
2009-01-02 14:48:03 +00:00
|
|
|
extern StructRNA RNA_MeshEdge;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_MeshFloatProperty;
|
|
|
|
|
extern StructRNA RNA_MeshIntProperty;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_MeshLoop;
|
2019-10-18 18:38:24 +11:00
|
|
|
extern StructRNA RNA_MeshLoopColor;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_MeshLoopColorLayer;
|
Sculpt Vertex Colors: Initial implementation
Sculpt Vertex Colors is a painting system that runs inside sculpt mode, reusing all its tools and optimizations. This provides much better performance, easier to maintain code and more advanced features (new brush engine, filters, symmetry options, masks and face sets compatibility...). This is also the initial step for future features like vertex painting in Multires and brushes that can sculpt and paint at the same time.
This commit includes:
- SCULPT_UNDO_COLOR for undo support in sculpt mode
- SCULPT_UPDATE_COLOR and PBVH flags and rendering
- Sculpt Color API functions
- Sculpt capability for sculpt tools (only enabled in the Paint Brush for now)
- Rendering support in workbench (default to Sculpt Vertex Colors except in Vertex Paint)
- Conversion operator between MPropCol (Sculpt Vertex Colors) and MLoopCol (Vertex Paint)
- Remesher reprojection in the Voxel Remehser
- Paint Brush and Smear Brush with color smoothing in alt-smooth mode
- Parameters for the new brush engine (density, opacity, flow, wet paint mixing, tip scale) implemented in Sculpt Vertex Colors
- Color Filter
- Color picker (uses S shortcut, replaces smooth)
- Color selector in the top bar
Reviewed By: brecht
Maniphest Tasks: T72866
Differential Revision: https://developer.blender.org/D5975
2020-06-22 20:05:28 +02:00
|
|
|
extern StructRNA RNA_MeshVertColor;
|
|
|
|
|
extern StructRNA RNA_MeshVertColorLayer;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_MeshLoopTriangle;
|
|
|
|
|
extern StructRNA RNA_MeshPolygon;
|
|
|
|
|
extern StructRNA RNA_MeshSequenceCacheModifier;
|
2012-05-22 15:18:43 +00:00
|
|
|
extern StructRNA RNA_MeshSkinVertex;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_MeshSkinVertexLayer;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_MeshStringProperty;
|
2009-01-02 14:48:03 +00:00
|
|
|
extern StructRNA RNA_MeshTextureFace;
|
2011-11-25 13:28:04 +00:00
|
|
|
extern StructRNA RNA_MeshTexturePoly;
|
2019-09-19 15:46:50 +02:00
|
|
|
extern StructRNA RNA_MeshUVLoop;
|
2009-01-02 14:48:03 +00:00
|
|
|
extern StructRNA RNA_MeshVertex;
|
2008-11-30 20:18:55 +00:00
|
|
|
extern StructRNA RNA_MetaBall;
|
2008-12-02 23:45:11 +00:00
|
|
|
extern StructRNA RNA_MetaElement;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_MetaSequence;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_MirrorGpencilModifier;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_MirrorModifier;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_Modifier;
|
2010-01-07 22:54:05 +00:00
|
|
|
extern StructRNA RNA_MotionPath;
|
|
|
|
|
extern StructRNA RNA_MotionPathVert;
|
2012-03-21 18:02:29 +00:00
|
|
|
extern StructRNA RNA_MovieClipSequence;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_MovieSequence;
|
Planar tracking support for motion tracking
===========================================
Major list of changes done in tomato branch:
- Add a planar tracking implementation to libmv
This adds a new planar tracking implementation to libmv. The
tracker is based on Ceres[1], the new nonlinear minimizer that
myself and Sameer released from Google as open source. Since
the motion model is more involved, the interface is
different than the RegionTracker interface used previously
in Blender.
The start of a C API in libmv-capi.{cpp,h} is also included.
- Migrate from pat_{min,max} for markers to 4 corners representation
Convert markers in the movie clip editor / 2D tracker from using
pat_min and pat_max notation to using the a more general, 4-corner
representation.
There is still considerable porting work to do; in particular
sliding from preview widget does not work correct for rotated
markers.
All other areas should be ported to new representation:
* Added support of sliding individual corners. LMB slide + Ctrl
would scale the whole pattern
* S would scale the whole marker, S-S would scale pattern only
* Added support of marker's rotation which is currently rotates
only patterns around their centers or all markers around median,
Rotation or other non-translation/scaling transformation of search
area doesn't make sense.
* Track Preview widget would display transformed pattern which
libmv actually operates with.
- "Efficient Second-order Minimization" for the planar tracker
This implements the "Efficient Second-order Minimization"
scheme, as supported by the existing translation tracker.
This increases the amount of per-iteration work, but
decreases the number of iterations required to converge and
also increases the size of the basin of attraction for the
optimization.
- Remove the use of the legacy RegionTracker API from Blender,
and replaces it with the new TrackRegion API. This also
adds several features to the planar tracker in libmv:
* Do a brute-force initialization of tracking similar to "Hybrid"
mode in the stable release, but using all floats. This is slower
but more accurate. It is still necessary to evaluate if the
performance loss is worth it. In particular, this change is
necessary to support high bit depth imagery.
* Add support for masks over the search window. This is a step
towards supporting user-defined tracker masks. The tracker masks
will make it easy for users to make a mask for e.g. a ball.
Not exposed into interface yet/
* Add Pearson product moment correlation coefficient checking (aka
"Correlation" in the UI. This causes tracking failure if the
tracked patch is not linearly related to the template.
* Add support for warping a few points in addition to the supplied
points. This is useful because the tracking code deliberately
does not expose the underlying warp representation. Instead,
warps are specified in an aparametric way via the correspondences.
- Replace the old style tracker configuration panel with the
new planar tracking panel. From a users perspective, this means:
* The old "tracking algorithm" picker is gone. There is only 1
algorithm now. We may revisit this later, but I would much
prefer to have only 1 algorithm. So far no optimization work
has been done so the speed is not there yet.
* There is now a dropdown to select the motion model. Choices:
* Translation
* Translation, rotation
* Translation, scale
* Translation, rotation, scale
* Affine
* Perspective
* The old "Hybrid" mode is gone; instead there is a toggle to
enable or disable translation-only tracker initialization. This
is the equivalent of the hyrbid mode before, but rewritten to work
with the new planar tracking modes.
* The pyramid levels setting is gone. At a future date, the planar
tracker will decide to use pyramids or not automatically. The
pyramid setting was ultimately a mistake; with the brute force
initialization it is unnecessary.
- Add light-normalized tracking
Added the ability to normalize patterns by their average value while
tracking, to make them invariant to global illumination changes.
Additional details could be found at wiki page [2]
[1] http://code.google.com/p/ceres-solver
[2] http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Motion_Tracker
2012-06-10 15:28:19 +00:00
|
|
|
extern StructRNA RNA_MovieTracking;
|
2011-12-05 18:57:17 +00:00
|
|
|
extern StructRNA RNA_MovieTrackingObject;
|
Rework 2D stabilizator
See this page for motivation and description of concepts:
https://github.com/Ichthyostega/blender/wiki
See this video for UI explanation and demonstration of usage
http://vimeo.com/blenderHack/stabilizerdemo
This proposal attempts to improve usability of Blender's image stabilization
feature for real-world footage esp. with moving and panning camera. It builds
upon the feature tracking to get a measurement of 2D image movement.
- Use a weighted average of movement contributions (instead of a median).
- Allow for rotation compensation and zoom (image scale) compensation.
- Allow to pick a different set of tracks for translation and for
rotation/zoom.
- Treat translation / rotation / zoom contributions systematically in a
similar way.
- Improve handling of partial tracking data with gaps and varying
start / end points.
- Have a user definable anchor frame and interpolate / extrapolate data to
avoid jumping back to "neutral" position when no tracking data is available.
- Support for travelling and panning shots by including an //intended//
position/rotation/zoom ("target position"). The idea is for these parameters
to be //animated// by the user, in order to supply an smooth, intended
camera movement. This way, we can keep the image content roughly in frame
even when moving completely away from the initial view.
A known shortcoming is that the pivot point for rotation compensation is set to
the translation compensated image center. This can produce spurious rotation on
travelling shots, which needs to be compensated manually (by animating the
target rotation parameter). There are several possible ways to address that
problem, yet all of them are considered beyond the scope of this improvement
proposal for now.
Own modifications:
- Restrict line length, it's really handy for split-view editing
- In motion tracking we prefer fully human-readable comments, meaning we
don't use doxygen with it's weird markup and comments are supposed to
start with capital and end with a full stop,
- Add explicit comparison of pointer to NULL.
Reviewers: sergey
Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung
Maniphest Tasks: T49036
Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
|
|
|
extern StructRNA RNA_MovieTrackingStabilization;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_MovieTrackingTrack;
|
== Sequencer ==
This adds MULTICAM-editing support for blender. (Well, the beginning of.)
There is now a new effect track, named MULTICAM, which just selects
one of the lower tracks.
Doesn't sound that exciting, but if you combine this with A/B-Trim (moving
split points of two directly connected tracks around, while magically
resizing both strips, something to be added), you just do:
* add several tracks for your camera angles
* (optionally) sync those tracks
* add one multicam track on top
Use that multicam-track to edit your movie. (Either using fcurves on the
multicam source selector or using knife-tool and A/B-Trim.)
Compare that to:
* add several tracks
* add cross fades between them
* do some python scripting to add several fcurves to make that beast
somewhat work.
* cry out loud, using it, if you have to move cut points around
Alternatively, even harder:
* just edit the old way and put strip after strip
You might think, that this isn't really helpfull for animators, but
consider using scene-strips (in OpenGL-mode) for input, that are set for
different camera angles and can now be intercut a lot more easily...
Also: small fix on the way: the speed effect can now be used in cascade.
(Don't know, if anyone used it that way, but now it works.)
2010-04-25 12:53:39 +00:00
|
|
|
extern StructRNA RNA_MulticamSequence;
|
2019-11-14 19:18:23 +01:00
|
|
|
extern StructRNA RNA_MultiplyGpencilModifier;
|
2009-01-06 20:15:23 +00:00
|
|
|
extern StructRNA RNA_MultiresModifier;
|
2009-04-09 20:33:39 +00:00
|
|
|
extern StructRNA RNA_MusgraveTexture;
|
2009-06-07 06:49:04 +00:00
|
|
|
extern StructRNA RNA_NlaStrip;
|
2009-07-21 14:11:51 +00:00
|
|
|
extern StructRNA RNA_NlaTrack;
|
2008-11-29 01:04:15 +00:00
|
|
|
extern StructRNA RNA_Node;
|
2013-03-18 16:34:57 +00:00
|
|
|
extern StructRNA RNA_NodeInstanceHash;
|
2010-11-14 08:11:58 +00:00
|
|
|
extern StructRNA RNA_NodeLink;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_NodeOutputFileSlotFile;
|
|
|
|
|
extern StructRNA RNA_NodeOutputFileSlotLayer;
|
2009-11-11 02:15:09 +00:00
|
|
|
extern StructRNA RNA_NodeSocket;
|
2013-03-18 16:34:57 +00:00
|
|
|
extern StructRNA RNA_NodeSocketInterface;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_NodeTree;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_NoiseGpencilModifier;
|
2009-04-09 20:33:39 +00:00
|
|
|
extern StructRNA RNA_NoiseTexture;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_NormalEditModifier;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Object;
|
2009-11-11 09:16:53 +00:00
|
|
|
extern StructRNA RNA_ObjectBase;
|
2018-05-09 15:13:12 +02:00
|
|
|
extern StructRNA RNA_ObjectDisplay;
|
2021-03-16 19:35:53 +01:00
|
|
|
extern StructRNA RNA_ObjectLineArt;
|
2011-11-13 12:17:27 +00:00
|
|
|
extern StructRNA RNA_OceanModifier;
|
|
|
|
|
extern StructRNA RNA_OceanTexData;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_OffsetGpencilModifier;
|
|
|
|
|
extern StructRNA RNA_OpacityGpencilModifier;
|
2008-11-24 15:51:55 +00:00
|
|
|
extern StructRNA RNA_Operator;
|
2009-06-05 16:11:35 +00:00
|
|
|
extern StructRNA RNA_OperatorFileListElement;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_OperatorMacro;
|
RNA:
* Added support for using pointers + collections as operator properties,
but with the restriction that they must point to other type derived from
ID property groups. The "add" function for these properties will allocate
a new ID property group and point to that.
* Added support for arrays with type IDP_GROUP in ID properties.
* Fix bug getting/setting float array values.
Example code for collections, note the "OperatorMousePath" type is defined
in rna_wm.c and has a float[2] property named "loc".
Defining the operator property:
prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath);
Adding values:
PointerRNA itemptr;
float loc[2] = {1, 1},
RNA_collection_add(op->ptr, "path", &itemptr);
RNA_float_set_array(&itemptr, "loc", loc);
Iterating:
RNA_BEGIN(op->ptr, itemptr, "path") {
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
printf("Location: %f %f\n", loc[0], loc[1]);
}
RNA_END;
2008-12-26 20:38:52 +00:00
|
|
|
extern StructRNA RNA_OperatorMousePath;
|
2008-12-16 20:03:28 +00:00
|
|
|
extern StructRNA RNA_OperatorProperties;
|
2009-01-13 20:50:07 +00:00
|
|
|
extern StructRNA RNA_OperatorStrokeElement;
|
2008-12-01 21:23:58 +00:00
|
|
|
extern StructRNA RNA_PackedFile;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_Paint;
|
2014-07-21 12:02:05 +02:00
|
|
|
extern StructRNA RNA_PaintCurve;
|
2018-11-02 09:10:23 +11:00
|
|
|
extern StructRNA RNA_PaintToolSlot;
|
2014-07-21 12:02:05 +02:00
|
|
|
extern StructRNA RNA_Palette;
|
|
|
|
|
extern StructRNA RNA_PaletteColor;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Panel;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_Particle;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_ParticleBrush;
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
extern StructRNA RNA_ParticleDupliWeight;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_ParticleEdit;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ParticleHairKey;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_ParticleInstanceModifier;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ParticleKey;
|
2009-01-02 13:47:33 +00:00
|
|
|
extern StructRNA RNA_ParticleSettings;
|
2011-02-12 14:38:34 +00:00
|
|
|
extern StructRNA RNA_ParticleSettingsTextureSlot;
|
2009-01-02 13:47:33 +00:00
|
|
|
extern StructRNA RNA_ParticleSystem;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_ParticleSystemModifier;
|
2009-07-21 14:11:51 +00:00
|
|
|
extern StructRNA RNA_ParticleTarget;
|
== Pivot Constraint ==
This constraint allows an object or bone to have their rotations applied as if their origin/pivot-point was located elsewhere. The most obvious uses include foot-roll, see-saws, but could also include more complicated rolling-box examples.
== Usage Examples ==
=== Foot Roll ===
1. Add 'Pivot' Constraint to the bone without any target.
2. Set the 'Y' value of the offset to the length of the bone. Usually this should be negative (if you rig with feet facing 'forwards' along -Y axis). This gives you a pivot point relative to the bone's (preconstraint) location, which should be at the tip of the bone here. Disabling the 'Use Relative Offset' would make this offset be relative to 0,0,0 instead of to the owner/bone-head.
3. Ensure that the 'Pivot When' setting is set to '-X Rot', (default) which means that the pivot will only used when the rotation on the X-Axis is negative to get tip-toe 'roll'.
=== See Saw ===
1. Add a 'Pivot' constraint too see-saw plank object, this time with a target that you wish to have as the pivot-point. It's possible to do this without too (as before), but is less intuitive.
2. Optionally, if you want the plank slightly raised, set the z-offset value, which should make the pivot-point used to be relative to the target with the z-offset applied.
3. Ensure that 'Pivot When' is set to 'Always', which means that the pivot will always be used, irrespective of the rotation.
== Notes ==
* The 'Pivot When' setting has been integrated in the constraint, since this is something that will often be required for these setups. Having to set up additional drivers to drive the constraint to do this kindof beats the purpose of providing this.
* The 'Offset' functionality is probably not presented as clearly as it could be. We may need to go over this again.
* For foot-roll - if any scaling of the foot is required, simply set up a driver on the y-offset to make this dynamically respond to the "scale" RNA property of the bones (don't use the "Transform Channel" vartype since that won't work correct here). However, this shouldn't be common enough to warrant special treatment.
2010-05-27 10:50:06 +00:00
|
|
|
extern StructRNA RNA_PivotConstraint;
|
2009-01-02 13:47:33 +00:00
|
|
|
extern StructRNA RNA_PointCache;
|
2020-03-17 14:41:48 +01:00
|
|
|
extern StructRNA RNA_PointCloud;
|
2018-06-27 14:41:53 +02:00
|
|
|
extern StructRNA RNA_PointLight;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_PointerProperty;
|
2009-01-07 04:06:52 +00:00
|
|
|
extern StructRNA RNA_Pose;
|
2009-11-18 11:40:55 +00:00
|
|
|
extern StructRNA RNA_PoseBone;
|
2019-01-10 09:58:04 +11:00
|
|
|
extern StructRNA RNA_Preferences;
|
|
|
|
|
extern StructRNA RNA_PreferencesEdit;
|
|
|
|
|
extern StructRNA RNA_PreferencesFilePaths;
|
|
|
|
|
extern StructRNA RNA_PreferencesInput;
|
|
|
|
|
extern StructRNA RNA_PreferencesKeymap;
|
|
|
|
|
extern StructRNA RNA_PreferencesSystem;
|
|
|
|
|
extern StructRNA RNA_PreferencesView;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Property;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_PropertyGroup;
|
|
|
|
|
extern StructRNA RNA_PropertyGroupItem;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_PythonConstraint;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Region;
|
2020-09-25 12:49:18 +02:00
|
|
|
extern StructRNA RNA_RemeshModifier;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_RenderEngine;
|
2009-07-21 14:11:51 +00:00
|
|
|
extern StructRNA RNA_RenderLayer;
|
|
|
|
|
extern StructRNA RNA_RenderPass;
|
|
|
|
|
extern StructRNA RNA_RenderResult;
|
2010-02-23 12:48:35 +00:00
|
|
|
extern StructRNA RNA_RenderSettings;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_RigidBodyJointConstraint;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_RigidBodyObject;
|
|
|
|
|
extern StructRNA RNA_RigidBodyWorld;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_SPHFluidSettings;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Scene;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_SceneDisplay;
|
2018-05-16 19:34:24 +02:00
|
|
|
extern StructRNA RNA_SceneEEVEE;
|
Collections and groups unification
OVERVIEW
* In 2.7 terminology, all layers and groups are now collection datablocks.
* These collections are nestable, linkable, instanceable, overrideable, ..
which opens up new ways to set up scenes and link + override data.
* Viewport/render visibility and selectability are now a part of the collection
and shared across all view layers and linkable.
* View layers define which subset of the scene collection hierarchy is excluded
for each. For many workflows one view layer can be used, these are more of an
advanced feature now.
OUTLINER
* The outliner now has a "View Layer" display mode instead of "Collections",
which can display the collections and/or objects in the view layer.
* In this display mode, collections can be excluded with the right click menu.
These will then be greyed out and their objects will be excluded.
* To view collections not linked to any scene, the "Blender File" display mode
can be used, with the new filtering option to just see Colleciton datablocks.
* The outliner right click menus for collections and objects were reorganized.
* Drag and drop still needs to be improved. Like before, dragging the icon or
text gives different results, we'll unify this later.
LINKING AND OVERRIDES
* Collections can now be linked into the scene without creating an instance,
with the link/append operator or from the collections view in the outliner.
* Collections can get static overrides with the right click menu in the outliner,
but this is rather unreliable and not clearly communicated at the moment.
* We still need to improve the make override operator to turn collection instances
into collections with overrides directly in the scene.
PERFORMANCE
* We tried to make performance not worse than before and improve it in some
cases. The main thing that's still a bit slower is multiple scenes, we have to
change the layer syncing to only updated affected scenes.
* Collections keep a list of their parent collections for faster incremental
updates in syncing and caching.
* View layer bases are now in a object -> base hash to avoid quadratic time
lookups internally and in API functions like visible_get().
VERSIONING
* Compatibility with 2.7 files should be improved due to the new visibility
controls. Of course users may not want to set up their scenes differently
now to avoid having separate layers and groups.
* Compatibility with 2.8 is mostly there, and was tested on Eevee demo and Hero
files. There's a few things which are know to be not quite compatible, like
nested layer collections inside groups.
* The versioning code for 2.8 files is quite complicated, and isolated behind
#ifdef so it can be removed at the end of the release cycle.
KNOWN ISSUES
* The G-key group operators in the 3D viewport were left mostly as is, they
need to be modified still to fit better.
* Same for the groups panel in the object properties. This needs to be updated
still, or perhaps replaced by something better.
* Collections must all have a unique name. Less restrictive namespacing is to
be done later, we'll have to see how important this is as all objects within
the collections must also have a unique name anyway.
* Full scene copy and delete scene are exactly doing the right thing yet.
Differential Revision: https://developer.blender.org/D3383
https://code.blender.org/2018/05/collections-and-groups/
2018-04-30 15:57:22 +02:00
|
|
|
extern StructRNA RNA_SceneObjects;
|
2009-07-21 14:11:51 +00:00
|
|
|
extern StructRNA RNA_SceneRenderLayer;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_SceneSequence;
|
2010-04-06 02:05:54 +00:00
|
|
|
extern StructRNA RNA_Scopes;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Screen;
|
2010-03-22 00:22:52 +00:00
|
|
|
extern StructRNA RNA_ScrewModifier;
|
2009-01-17 16:58:05 +00:00
|
|
|
extern StructRNA RNA_Sculpt;
|
2012-01-17 16:31:13 +00:00
|
|
|
extern StructRNA RNA_SelectedUvElement;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Sensor;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_Sequence;
|
|
|
|
|
extern StructRNA RNA_SequenceColorBalance;
|
2018-10-30 11:14:23 +11:00
|
|
|
extern StructRNA RNA_SequenceColorBalanceData;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_SequenceCrop;
|
|
|
|
|
extern StructRNA RNA_SequenceEditor;
|
|
|
|
|
extern StructRNA RNA_SequenceElement;
|
2018-10-30 11:14:23 +11:00
|
|
|
extern StructRNA RNA_SequenceModifier;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_SequenceProxy;
|
|
|
|
|
extern StructRNA RNA_SequenceTransform;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_ShaderFx;
|
|
|
|
|
extern StructRNA RNA_ShaderFxBlur;
|
|
|
|
|
extern StructRNA RNA_ShaderFxColorize;
|
|
|
|
|
extern StructRNA RNA_ShaderFxFlip;
|
|
|
|
|
extern StructRNA RNA_ShaderFxGlow;
|
|
|
|
|
extern StructRNA RNA_ShaderFxLight;
|
|
|
|
|
extern StructRNA RNA_ShaderFxPixel;
|
|
|
|
|
extern StructRNA RNA_ShaderFxRim;
|
|
|
|
|
extern StructRNA RNA_ShaderFxShadow;
|
|
|
|
|
extern StructRNA RNA_ShaderFxSwirl;
|
|
|
|
|
extern StructRNA RNA_ShaderFxWave;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ShaderNode;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeCameraData;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeCombineRGB;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_ShaderNodeGamma;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ShaderNodeHueSaturation;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeInvert;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeMapping;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeMath;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeMixRGB;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeNormal;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeOutput;
|
2019-12-04 19:57:28 +01:00
|
|
|
extern StructRNA RNA_ShaderNodeOutputAOV;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ShaderNodeRGB;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeRGBCurve;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeRGBToBW;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_ShaderNodeScript;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ShaderNodeSeparateRGB;
|
2010-12-02 01:18:59 +00:00
|
|
|
extern StructRNA RNA_ShaderNodeTree;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ShaderNodeValToRGB;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeValue;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeVectorCurve;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeVectorMath;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_ShapeKey;
|
|
|
|
|
extern StructRNA RNA_ShapeKeyBezierPoint;
|
|
|
|
|
extern StructRNA RNA_ShapeKeyCurvePoint;
|
|
|
|
|
extern StructRNA RNA_ShapeKeyPoint;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ShrinkwrapConstraint;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_ShrinkwrapModifier;
|
|
|
|
|
extern StructRNA RNA_SimpleDeformModifier;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_SimplifyGpencilModifier;
|
2020-04-20 10:37:38 +02:00
|
|
|
extern StructRNA RNA_Simulation;
|
2020-12-02 13:25:25 +01:00
|
|
|
extern StructRNA RNA_NodesModifier;
|
|
|
|
|
extern StructRNA RNA_GeometryNode;
|
|
|
|
|
extern StructRNA RNA_GeometryNodeTree;
|
2012-05-22 15:29:01 +00:00
|
|
|
extern StructRNA RNA_SkinModifier;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_SmoothGpencilModifier;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_SmoothModifier;
|
2009-07-02 19:41:31 +00:00
|
|
|
extern StructRNA RNA_SoftBodyModifier;
|
2009-07-21 14:11:51 +00:00
|
|
|
extern StructRNA RNA_SoftBodySettings;
|
2009-12-21 01:02:08 +00:00
|
|
|
extern StructRNA RNA_SolidifyModifier;
|
2008-12-26 16:50:05 +00:00
|
|
|
extern StructRNA RNA_Sound;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_SoundSequence;
|
2009-01-15 04:22:23 +00:00
|
|
|
extern StructRNA RNA_Space;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_SpaceClipEditor;
|
2009-07-16 00:50:27 +00:00
|
|
|
extern StructRNA RNA_SpaceConsole;
|
2009-06-22 03:26:36 +00:00
|
|
|
extern StructRNA RNA_SpaceDopeSheetEditor;
|
2009-07-21 14:11:51 +00:00
|
|
|
extern StructRNA RNA_SpaceFileBrowser;
|
2009-06-22 03:26:36 +00:00
|
|
|
extern StructRNA RNA_SpaceGraphEditor;
|
2009-01-15 04:22:23 +00:00
|
|
|
extern StructRNA RNA_SpaceImageEditor;
|
2020-10-07 16:29:15 +02:00
|
|
|
extern StructRNA RNA_SpaceImageOverlay;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_SpaceInfo;
|
2009-06-12 06:44:49 +00:00
|
|
|
extern StructRNA RNA_SpaceNLA;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_SpaceNodeEditor;
|
2009-05-28 05:09:25 +00:00
|
|
|
extern StructRNA RNA_SpaceOutliner;
|
2019-01-10 09:58:04 +11:00
|
|
|
extern StructRNA RNA_SpacePreferences;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_SpaceProperties;
|
2009-06-09 05:39:01 +00:00
|
|
|
extern StructRNA RNA_SpaceSequenceEditor;
|
2021-03-08 16:23:21 +01:00
|
|
|
extern StructRNA RNA_SpaceSpreadsheet;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_SpaceTextEditor;
|
2009-11-29 16:42:51 +00:00
|
|
|
extern StructRNA RNA_SpaceUVEditor;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_SpaceView3D;
|
2011-08-01 11:44:20 +00:00
|
|
|
extern StructRNA RNA_Speaker;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_SpeedControlSequence;
|
2010-02-10 08:53:08 +00:00
|
|
|
extern StructRNA RNA_Spline;
|
2009-11-29 16:42:51 +00:00
|
|
|
extern StructRNA RNA_SplineIKConstraint;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_SplinePoint;
|
2018-06-27 14:41:53 +02:00
|
|
|
extern StructRNA RNA_SpotLight;
|
2021-04-15 08:57:10 +02:00
|
|
|
extern StructRNA RNA_SpreadsheetContext;
|
|
|
|
|
extern StructRNA RNA_SpreadsheetContextObject;
|
|
|
|
|
extern StructRNA RNA_SpreadsheetContextModifier;
|
|
|
|
|
extern StructRNA RNA_SpreadsheetContextNode;
|
2015-04-06 10:40:12 -03:00
|
|
|
extern StructRNA RNA_Stereo3dDisplay;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_StretchToConstraint;
|
2020-07-03 15:30:04 +02:00
|
|
|
extern StructRNA RNA_StringAttribute;
|
|
|
|
|
extern StructRNA RNA_StringAttributeValue;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_StringProperty;
|
|
|
|
|
extern StructRNA RNA_Struct;
|
2009-04-09 20:33:39 +00:00
|
|
|
extern StructRNA RNA_StucciTexture;
|
2018-06-14 10:38:17 +02:00
|
|
|
extern StructRNA RNA_StudioLight;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_SubdivGpencilModifier;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_SubsurfModifier;
|
2018-06-27 14:41:53 +02:00
|
|
|
extern StructRNA RNA_SunLight;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_SurfaceCurve;
|
2017-02-27 12:39:14 -03:00
|
|
|
extern StructRNA RNA_SurfaceDeformModifier;
|
2009-07-02 19:41:31 +00:00
|
|
|
extern StructRNA RNA_SurfaceModifier;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_TexMapping;
|
2008-12-31 15:02:40 +00:00
|
|
|
extern StructRNA RNA_Text;
|
2008-12-01 19:02:27 +00:00
|
|
|
extern StructRNA RNA_TextBox;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_TextCharacterFormat;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_TextCurve;
|
2009-01-02 13:47:33 +00:00
|
|
|
extern StructRNA RNA_TextLine;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_TextSequence;
|
2009-01-02 23:05:28 +00:00
|
|
|
extern StructRNA RNA_Texture;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_TextureNode;
|
|
|
|
|
extern StructRNA RNA_TextureNodeBricks;
|
|
|
|
|
extern StructRNA RNA_TextureNodeChecker;
|
|
|
|
|
extern StructRNA RNA_TextureNodeCompose;
|
|
|
|
|
extern StructRNA RNA_TextureNodeCoordinates;
|
|
|
|
|
extern StructRNA RNA_TextureNodeCurveRGB;
|
|
|
|
|
extern StructRNA RNA_TextureNodeCurveTime;
|
|
|
|
|
extern StructRNA RNA_TextureNodeDecompose;
|
|
|
|
|
extern StructRNA RNA_TextureNodeDistance;
|
|
|
|
|
extern StructRNA RNA_TextureNodeHueSaturation;
|
|
|
|
|
extern StructRNA RNA_TextureNodeImage;
|
|
|
|
|
extern StructRNA RNA_TextureNodeInvert;
|
|
|
|
|
extern StructRNA RNA_TextureNodeMath;
|
|
|
|
|
extern StructRNA RNA_TextureNodeMixRGB;
|
|
|
|
|
extern StructRNA RNA_TextureNodeOutput;
|
|
|
|
|
extern StructRNA RNA_TextureNodeRGBToBW;
|
|
|
|
|
extern StructRNA RNA_TextureNodeRotate;
|
|
|
|
|
extern StructRNA RNA_TextureNodeScale;
|
|
|
|
|
extern StructRNA RNA_TextureNodeTexture;
|
|
|
|
|
extern StructRNA RNA_TextureNodeTranslate;
|
2010-12-02 01:18:59 +00:00
|
|
|
extern StructRNA RNA_TextureNodeTree;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_TextureNodeValToNor;
|
|
|
|
|
extern StructRNA RNA_TextureNodeValToRGB;
|
|
|
|
|
extern StructRNA RNA_TextureNodeViewer;
|
2009-01-07 21:05:51 +00:00
|
|
|
extern StructRNA RNA_TextureSlot;
|
|
|
|
|
extern StructRNA RNA_Theme;
|
|
|
|
|
extern StructRNA RNA_ThemeBoneColorSet;
|
2020-09-15 12:13:03 -06:00
|
|
|
extern StructRNA RNA_ThemeCollectionColor;
|
2010-01-15 17:00:37 +00:00
|
|
|
extern StructRNA RNA_ThemeConsole;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ThemeDopeSheet;
|
2009-01-07 21:05:51 +00:00
|
|
|
extern StructRNA RNA_ThemeFileBrowser;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ThemeFontStyle;
|
2009-02-02 11:51:10 +00:00
|
|
|
extern StructRNA RNA_ThemeGraphEditor;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ThemeImageEditor;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_ThemeInfo;
|
2009-01-07 21:05:51 +00:00
|
|
|
extern StructRNA RNA_ThemeNLAEditor;
|
|
|
|
|
extern StructRNA RNA_ThemeNodeEditor;
|
|
|
|
|
extern StructRNA RNA_ThemeOutliner;
|
2019-01-10 09:58:04 +11:00
|
|
|
extern StructRNA RNA_ThemePreferences;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_ThemeProperties;
|
2009-01-07 21:05:51 +00:00
|
|
|
extern StructRNA RNA_ThemeSequenceEditor;
|
2012-01-14 03:24:41 +00:00
|
|
|
extern StructRNA RNA_ThemeSpaceGeneric;
|
2013-01-07 15:42:42 +00:00
|
|
|
extern StructRNA RNA_ThemeSpaceGradient;
|
2012-01-14 03:24:41 +00:00
|
|
|
extern StructRNA RNA_ThemeSpaceListGeneric;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ThemeStyle;
|
2009-01-07 21:05:51 +00:00
|
|
|
extern StructRNA RNA_ThemeTextEditor;
|
|
|
|
|
extern StructRNA RNA_ThemeUserInterface;
|
|
|
|
|
extern StructRNA RNA_ThemeView3D;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ThemeWidgetColors;
|
2009-07-21 14:11:51 +00:00
|
|
|
extern StructRNA RNA_ThemeWidgetStateColors;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_ThickGpencilModifier;
|
|
|
|
|
extern StructRNA RNA_TimeGpencilModifier;
|
2009-02-24 03:06:23 +00:00
|
|
|
extern StructRNA RNA_TimelineMarker;
|
2011-03-28 04:55:24 +00:00
|
|
|
extern StructRNA RNA_Timer;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_TintGpencilModifier;
|
2009-01-17 16:58:05 +00:00
|
|
|
extern StructRNA RNA_ToolSettings;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_TrackToConstraint;
|
|
|
|
|
extern StructRNA RNA_TransformConstraint;
|
2018-12-19 20:51:04 +11:00
|
|
|
extern StructRNA RNA_TransformOrientationSlot;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_TransformSequence;
|
2020-09-25 12:49:18 +02:00
|
|
|
extern StructRNA RNA_TriangulateModifier;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_UILayout;
|
This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!
This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!
To make all this work, other changes were also necessary:
* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.
* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.
* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.
* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
Note: not sure whether we should add that one to all UILayout's prop funcs?
Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
|
|
|
extern StructRNA RNA_UIList;
|
Pie Menus C code backend.
This commit merges the code in the pie-menu branch.
As per decisions taken the last few days, there are no pie menus
included and there will be an official add-on including overrides of
some keys with pie menus. However, people will now be able to use the
new code in python.
Full Documentation is in http://wiki.blender.org/index.php/Dev:Ref/
Thanks:
Campbell Barton, Dalai Felinto and Ton Roosendaal for the code review
and design comments
Jonathan Williamson, Pawel Lyczkowski, Pablo Vazquez among others for
suggestions during the development.
Special Thanks to Sean Olson, for his support, suggestions, testing and
merciless bugging so that I would finish the pie menu code. Without him
we wouldn't be here. Also to the rest of the developers of the original
python add-on, Patrick Moore and Dan Eicher and finally to Matt Ebb, who
did the research and first implementation and whose code I used to get
started.
2014-08-11 10:39:59 +02:00
|
|
|
extern StructRNA RNA_UIPieMenu;
|
2013-06-01 04:06:38 +00:00
|
|
|
extern StructRNA RNA_UIPopupMenu;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_UVProjectModifier;
|
|
|
|
|
extern StructRNA RNA_UVProjector;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_UVWarpModifier;
|
2009-08-13 07:37:41 +00:00
|
|
|
extern StructRNA RNA_UnitSettings;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_UnknownType;
|
2020-12-14 13:39:41 +01:00
|
|
|
extern StructRNA RNA_UserAssetLibrary;
|
2009-01-07 21:05:51 +00:00
|
|
|
extern StructRNA RNA_UserSolidLight;
|
2020-03-09 16:27:24 +01:00
|
|
|
extern StructRNA RNA_VertexcolorGpencilModifier;
|
2008-12-02 23:45:11 +00:00
|
|
|
extern StructRNA RNA_VectorFont;
|
2009-01-02 13:47:33 +00:00
|
|
|
extern StructRNA RNA_VertexGroup;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_VertexGroupElement;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_VertexPaint;
|
2012-01-01 16:09:32 +00:00
|
|
|
extern StructRNA RNA_VertexWeightEditModifier;
|
|
|
|
|
extern StructRNA RNA_VertexWeightMixModifier;
|
|
|
|
|
extern StructRNA RNA_VertexWeightProximityModifier;
|
2019-03-01 12:35:48 +11:00
|
|
|
extern StructRNA RNA_View3DCursor;
|
2018-04-30 12:33:46 +02:00
|
|
|
extern StructRNA RNA_View3DOverlay;
|
|
|
|
|
extern StructRNA RNA_View3DShading;
|
2017-11-22 10:52:39 -02:00
|
|
|
extern StructRNA RNA_ViewLayer;
|
2020-02-20 14:53:53 +01:00
|
|
|
extern StructRNA RNA_ViewLayerEEVEE;
|
2020-03-17 14:41:48 +01:00
|
|
|
extern StructRNA RNA_Volume;
|
2020-10-07 18:03:07 +02:00
|
|
|
extern StructRNA RNA_VolumeDisplaceModifier;
|
2020-10-19 12:11:38 +02:00
|
|
|
extern StructRNA RNA_VolumeToMeshModifier;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_VoronoiTexture;
|
2019-05-21 22:08:10 +10:00
|
|
|
extern StructRNA RNA_WalkNavigation;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_WarpModifier;
|
|
|
|
|
extern StructRNA RNA_WaveModifier;
|
|
|
|
|
extern StructRNA RNA_WeightedNormalModifier;
|
2020-02-10 10:08:31 +11:00
|
|
|
extern StructRNA RNA_WeldModifier;
|
2009-07-21 14:11:51 +00:00
|
|
|
extern StructRNA RNA_Window;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_WindowManager;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_WipeSequence;
|
2013-12-22 07:08:35 +11:00
|
|
|
extern StructRNA RNA_WireframeModifier;
|
2009-04-09 20:33:39 +00:00
|
|
|
extern StructRNA RNA_WoodTexture;
|
Main Workspace Integration
This commit does the main integration of workspaces, which is a design we agreed on during the 2.8 UI workshop (see https://wiki.blender.org/index.php/Dev:2.8/UI/Workshop_Writeup)
Workspaces should generally be stable, I'm not aware of any remaining bugs (or I've forgotten them :) ). If you find any, let me know!
(Exception: mode switching button might get out of sync with actual mode in some cases, would consider that a limitation/ToDo. Needs to be resolved at some point.)
== Main Changes/Features
* Introduces the new Workspaces as data-blocks.
* Allow storing a number of custom workspaces as part of the user configuration. Needs further work to allow adding and deleting individual workspaces.
* Bundle a default workspace configuration with Blender (current screen-layouts converted to workspaces).
* Pressing button to add a workspace spawns a menu to select between "Duplicate Current" and the workspaces from the user configuration. If no workspaces are stored in the user configuration, the default workspaces are listed instead.
* Store screen-layouts (`bScreen`) per workspace.
* Store an active screen-layout per workspace. Changing the workspace will enable this layout.
* Store active mode in workspace. Changing the workspace will also enter the mode of the new workspace. (Note that we still store the active mode in the object, moving this completely to workspaces is a separate project.)
* Store an active render layer per workspace.
* Moved mode switch from 3D View header to Info Editor header.
* Store active scene in window (not directly workspace related, but overlaps quite a bit).
* Removed 'Use Global Scene' User Preference option.
* Compatibility with old files - a new workspace is created for every screen-layout of old files. Old Blender versions should be able to read files saved with workspace support as well.
* Default .blend only contains one workspace ("General").
* Support appending workspaces.
Opening files without UI and commandline rendering should work fine.
Note that the UI is temporary! We plan to introduce a new global topbar
that contains the workspace options and tabs for switching workspaces.
== Technical Notes
* Workspaces are data-blocks.
* Adding and removing `bScreen`s should be done through `ED_workspace_layout` API now.
* A workspace can be active in multiple windows at the same time.
* The mode menu (which is now in the Info Editor header) doesn't display "Grease Pencil Edit" mode anymore since its availability depends on the active editor. Will be fixed by making Grease Pencil an own object type (as planned).
* The button to change the active workspace object mode may get out of sync with the mode of the active object. Will either be resolved by moving mode out of object data, or we'll disable workspace modes again (there's a `#define USE_WORKSPACE_MODE` for that).
* Screen-layouts (`bScreen`) are IDs and thus stored in a main list-base. Had to add a wrapper `WorkSpaceLayout` so we can store them in a list-base within workspaces, too. On the long run we could completely replace `bScreen` by workspace structs.
* `WorkSpace` types use some special compiler trickery to allow marking structs and struct members as private. BKE_workspace API should be used for accessing those.
* Added scene operators `SCENE_OT_`. Was previously done through screen operators.
== BPY API Changes
* Removed `Screen.scene`, added `Window.scene`
* Removed `UserPreferencesView.use_global_scene`
* Added `Context.workspace`, `Window.workspace` and `BlendData.workspaces`
* Added `bpy.types.WorkSpace` containing `screens`, `object_mode` and `render_layer`
* Added Screen.layout_name for the layout name that'll be displayed in the UI (may differ from internal name)
== What's left?
* There are a few open design questions (T50521). We should find the needed answers and implement them.
* Allow adding and removing individual workspaces from workspace configuration (needs UI design).
* Get the override system ready and support overrides per workspace.
* Support custom UI setups as part of workspaces (hidden panels, hidden buttons, customizable toolbars, etc).
* Allow enabling add-ons per workspace.
* Support custom workspace keymaps.
* Remove special exception for workspaces in linking code (so they're always appended, never linked). Depends on a few things, so best to solve later.
* Get the topbar done.
* Workspaces need a proper icon, current one is just a placeholder :)
Reviewed By: campbellbarton, mont29
Tags: #user_interface, #bf_blender_2.8
Maniphest Tasks: T50521
Differential Revision: https://developer.blender.org/D2451
2017-06-01 19:56:58 +02:00
|
|
|
extern StructRNA RNA_WorkSpace;
|
2008-11-30 22:48:43 +00:00
|
|
|
extern StructRNA RNA_World;
|
2011-08-18 15:53:30 +00:00
|
|
|
extern StructRNA RNA_WorldLighting;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_WorldMistSettings;
|
VR: Initial Virtual Reality support - Milestone 1, Scene Inspection
NOTE: While most of the milestone 1 goals are there, a few smaller features and
improvements are still to be done.
Big picture of this milestone: Initial, OpenXR-based virtual reality support
for users and foundation for advanced use cases.
Maniphest Task: https://developer.blender.org/T71347
The tasks contains more information about this milestone.
To be clear: This is not a feature rich VR implementation, it's focused on the
initial scene inspection use case. We intentionally focused on that, further
features like controller support are part of the next milestone.
- How to use?
Instructions on how to use this are here:
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/How_to_Test
These will be updated and moved to a more official place (likely the manual) soon.
Currently Windows Mixed Reality and Oculus devices are usable. Valve/HTC
headsets don't support the OpenXR standard yet and hence, do not work with this
implementation.
---------------
This is the C-side implementation of the features added for initial VR
support as per milestone 1. A "VR Scene Inspection" Add-on will be
committed separately, to expose the VR functionality in the UI. It also
adds some further features for milestone 1, namely a landmarking system
(stored view locations in the VR space)
Main additions/features:
* Support for rendering viewports to an HMD, with good performance.
* Option to sync the VR view perspective with a fully interactive,
regular 3D View (VR-Mirror).
* Option to disable positional tracking. Keeps the current position (calculated
based on the VR eye center pose) when enabled while a VR session is running.
* Some regular viewport settings for the VR view
* RNA/Python-API to query and set VR session state information.
* WM-XR: Layer tying Ghost-XR to the Blender specific APIs/data
* wmSurface API: drawable, non-window container (manages Ghost-OpenGL and GPU
context)
* DNA/RNA for management of VR session settings
* `--debug-xr` and `--debug-xr-time` commandline options
* Utility batch & config file for using the Oculus runtime on Windows.
* Most VR data is runtime only. The exception is user settings which are saved
to files (`XrSessionSettings`).
* VR support can be disabled through the `WITH_XR_OPENXR` compiler flag.
For architecture and code documentation, see
https://wiki.blender.org/wiki/Source/Interface/XR.
---------------
A few thank you's:
* A huge shoutout to Ray Molenkamp for his help during the project - it would
have not been that successful without him!
* Sebastian Koenig and Simeon Conzendorf for testing and feedback!
* The reviewers, especially Brecht Van Lommel!
* Dalai Felinto for pushing and managing me to get this done ;)
* The OpenXR working group for providing an open standard. I think we're the
first bigger application to adopt OpenXR. Congratulations to them and
ourselves :)
This project started as a Google Summer of Code 2019 project - "Core Support of
Virtual Reality Headsets through OpenXR" (see
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/).
Some further information, including ideas for further improvements can be found
in the final GSoC report:
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/Final_Report
Differential Revisions: D6193, D7098
Reviewed by: Brecht Van Lommel, Jeroen Bakker
2020-03-17 20:20:55 +01:00
|
|
|
extern StructRNA RNA_XrSessionSettings;
|
|
|
|
|
extern StructRNA RNA_XrSessionState;
|
2018-10-30 11:06:19 +11:00
|
|
|
extern StructRNA RNA_uiPopover;
|
|
|
|
|
extern StructRNA RNA_wmOwnerIDs;
|
2008-11-30 15:55:14 +00:00
|
|
|
|
2008-11-07 02:58:25 +00:00
|
|
|
/* Pointer
|
|
|
|
|
*
|
2008-11-24 15:51:55 +00:00
|
|
|
* These functions will fill in RNA pointers, this can be done in three ways:
|
|
|
|
|
* - a pointer Main is created by just passing the data pointer
|
|
|
|
|
* - a pointer to a datablock can be created with the type and id data pointer
|
|
|
|
|
* - a pointer to data contained in a datablock can be created with the id type
|
|
|
|
|
* and id data pointer, and the data type and pointer to the struct itself.
|
2008-12-15 13:46:50 +00:00
|
|
|
*
|
|
|
|
|
* There is also a way to get a pointer with the information about all structs.
|
2008-11-24 15:51:55 +00:00
|
|
|
*/
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2008-11-24 15:51:55 +00:00
|
|
|
void RNA_main_pointer_create(struct Main *main, PointerRNA *r_ptr);
|
2009-01-08 15:33:34 +00:00
|
|
|
void RNA_id_pointer_create(struct ID *id, PointerRNA *r_ptr);
|
|
|
|
|
void RNA_pointer_create(struct ID *id, StructRNA *type, void *data, PointerRNA *r_ptr);
|
2017-12-04 16:23:14 +01:00
|
|
|
bool RNA_pointer_is_null(const PointerRNA *ptr);
|
2008-11-14 14:34:19 +00:00
|
|
|
|
2016-07-30 16:34:01 +10:00
|
|
|
bool RNA_path_resolved_create(PointerRNA *ptr,
|
|
|
|
|
struct PropertyRNA *prop,
|
|
|
|
|
const int prop_index,
|
|
|
|
|
PathResolvedRNA *r_anim_rna);
|
|
|
|
|
|
2008-12-15 13:46:50 +00:00
|
|
|
void RNA_blender_rna_pointer_create(PointerRNA *r_ptr);
|
2010-01-17 20:06:34 +00:00
|
|
|
void RNA_pointer_recast(PointerRNA *ptr, PointerRNA *r_ptr);
|
2008-12-15 13:46:50 +00:00
|
|
|
|
2010-11-23 14:38:02 +00:00
|
|
|
extern const PointerRNA PointerRNA_NULL;
|
2009-06-16 00:52:21 +00:00
|
|
|
|
2008-11-14 14:34:19 +00:00
|
|
|
/* Structs */
|
|
|
|
|
|
2011-09-05 21:01:50 +00:00
|
|
|
StructRNA *RNA_struct_find(const char *identifier);
|
|
|
|
|
|
2014-04-22 22:55:10 +10:00
|
|
|
const char *RNA_struct_identifier(const StructRNA *type);
|
|
|
|
|
const char *RNA_struct_ui_name(const StructRNA *type);
|
|
|
|
|
const char *RNA_struct_ui_name_raw(const StructRNA *type);
|
|
|
|
|
const char *RNA_struct_ui_description(const StructRNA *type);
|
|
|
|
|
const char *RNA_struct_ui_description_raw(const StructRNA *type);
|
|
|
|
|
const char *RNA_struct_translation_context(const StructRNA *type);
|
|
|
|
|
int RNA_struct_ui_icon(const StructRNA *type);
|
2008-11-14 14:34:19 +00:00
|
|
|
|
2017-05-12 01:42:42 +02:00
|
|
|
PropertyRNA *RNA_struct_name_property(const StructRNA *type);
|
2017-11-23 13:41:07 +01:00
|
|
|
const EnumPropertyItem *RNA_struct_property_tag_defines(const StructRNA *type);
|
2009-04-19 13:37:59 +00:00
|
|
|
PropertyRNA *RNA_struct_iterator_property(StructRNA *type);
|
2009-07-10 04:25:49 +00:00
|
|
|
StructRNA *RNA_struct_base(StructRNA *type);
|
2017-06-21 12:13:21 +10:00
|
|
|
const StructRNA *RNA_struct_base_child_of(const StructRNA *type, const StructRNA *parent_type);
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2014-04-22 22:55:10 +10:00
|
|
|
bool RNA_struct_is_ID(const StructRNA *type);
|
|
|
|
|
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna);
|
2009-04-19 13:37:59 +00:00
|
|
|
|
2014-04-22 22:55:10 +10:00
|
|
|
bool RNA_struct_undo_check(const StructRNA *type);
|
2011-11-08 15:11:27 +00:00
|
|
|
|
2009-04-19 13:37:59 +00:00
|
|
|
StructRegisterFunc RNA_struct_register(StructRNA *type);
|
|
|
|
|
StructUnregisterFunc RNA_struct_unregister(StructRNA *type);
|
2011-05-18 11:21:10 +00:00
|
|
|
void **RNA_struct_instance(PointerRNA *ptr);
|
2008-11-29 15:43:53 +00:00
|
|
|
|
2009-04-07 00:49:39 +00:00
|
|
|
void *RNA_struct_py_type_get(StructRNA *srna);
|
|
|
|
|
void RNA_struct_py_type_set(StructRNA *srna, void *py_type);
|
|
|
|
|
|
2009-04-19 13:37:59 +00:00
|
|
|
void *RNA_struct_blender_type_get(StructRNA *srna);
|
|
|
|
|
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type);
|
|
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
struct IDProperty *RNA_struct_idprops(PointerRNA *ptr, bool create);
|
|
|
|
|
bool RNA_struct_idprops_check(StructRNA *srna);
|
2014-04-22 22:55:10 +10:00
|
|
|
bool RNA_struct_idprops_register_check(const StructRNA *type);
|
Datablock ID Properties
The absence of datablock properties "will certainly be resolved soon as the need for them is becoming obvious" said the [[http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67/Python_Nodes|Python Nodes release notes]]. So this patch allows Python scripts to create ID Properties which reference datablocks.
This functionality is implemented for `PointerProperty` and now such properties can be created with Python.
In addition to the standard update callback, `PointerProperty` can have a `poll` callback (standard RNA) which is useful for search menus. For details see the test included in this patch.
Original author: @artfunkel
Alexander (Blend4Web Team)
Reviewers: brecht, artfunkel, mont29, campbellbarton
Reviewed By: mont29, campbellbarton
Subscribers: jta, sergey, campbellbarton, wisaac, poseidon4o, mont29, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov, fjuhec, sharlybg, cardboard, duarteframos, blueprintrandom, a.romanov, BYOB, disnel, aditiapratama, bliblubli, dfelinto, lukastoenne
Maniphest Tasks: T37754
Differential Revision: https://developer.blender.org/D113
2017-04-13 12:30:03 +03:00
|
|
|
bool RNA_struct_idprops_datablock_allowed(const StructRNA *type);
|
|
|
|
|
bool RNA_struct_idprops_contains_datablock(const StructRNA *type);
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_struct_idprops_unset(PointerRNA *ptr, const char *identifier);
|
2009-05-20 09:52:02 +00:00
|
|
|
|
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
|
|
|
PropertyRNA *RNA_struct_find_property(PointerRNA *ptr, const char *identifier);
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_struct_contains_property(PointerRNA *ptr, PropertyRNA *prop_test);
|
2017-11-23 13:58:05 +01:00
|
|
|
unsigned int RNA_struct_count_properties(StructRNA *srna);
|
2011-01-25 06:54:57 +00:00
|
|
|
|
|
|
|
|
/* lower level functions for access to type properties */
|
|
|
|
|
const struct ListBase *RNA_struct_type_properties(StructRNA *srna);
|
|
|
|
|
PropertyRNA *RNA_struct_type_find_property(StructRNA *srna, const char *identifier);
|
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
|
|
|
|
2012-06-10 13:34:59 +00:00
|
|
|
FunctionRNA *RNA_struct_find_function(StructRNA *srna, const char *identifier);
|
2011-01-25 07:31:11 +00:00
|
|
|
const struct ListBase *RNA_struct_type_functions(StructRNA *srna);
|
2009-04-07 00:49:39 +00:00
|
|
|
|
2011-10-22 10:49:35 +00:00
|
|
|
char *RNA_struct_name_get_alloc(PointerRNA *ptr, char *fixedbuf, int fixedlen, int *r_len);
|
2009-06-24 14:03:55 +00:00
|
|
|
|
2017-08-23 14:59:14 +10:00
|
|
|
bool RNA_struct_available_or_report(struct ReportList *reports, const char *identifier);
|
2017-09-01 00:58:18 +10:00
|
|
|
bool RNA_struct_bl_idname_ok_or_report(struct ReportList *reports,
|
|
|
|
|
const char *identifier,
|
|
|
|
|
const char *sep);
|
2017-08-23 14:59:14 +10:00
|
|
|
|
2008-11-14 14:34:19 +00:00
|
|
|
/* Properties
|
2008-11-07 02:58:25 +00:00
|
|
|
*
|
|
|
|
|
* Access to struct properties. All this works with RNA pointers rather than
|
|
|
|
|
* direct pointers to the data. */
|
|
|
|
|
|
2008-11-14 14:34:19 +00:00
|
|
|
/* Property Information */
|
|
|
|
|
|
2018-07-26 11:07:56 +10:00
|
|
|
const char *RNA_property_identifier(const PropertyRNA *prop);
|
2009-10-27 02:54:25 +00:00
|
|
|
const char *RNA_property_description(PropertyRNA *prop);
|
|
|
|
|
|
2009-04-19 13:37:59 +00:00
|
|
|
PropertyType RNA_property_type(PropertyRNA *prop);
|
|
|
|
|
PropertySubType RNA_property_subtype(PropertyRNA *prop);
|
RNA: subtypes and units
* Reviewed subtypes, making them more specific and adding new ones.
* Subtypes now have an associated type of units (length, area, volume,
mass, rotation, time, velocity, acceleration). These are not used
yet anywhere.
* Centralized code that decides the name of array items based on
subtype (XYZ, RGB), was copied in 3 places.
* RNA_def_float etc functions still need to be update, will do this
later together with another change.
2009-08-10 21:31:05 +00:00
|
|
|
PropertyUnit RNA_property_unit(PropertyRNA *prop);
|
2021-05-17 17:28:12 +10:00
|
|
|
PropertyScaleType RNA_property_ui_scale(PropertyRNA *prop);
|
2009-04-19 13:37:59 +00:00
|
|
|
int RNA_property_flag(PropertyRNA *prop);
|
2018-06-05 11:10:05 +02:00
|
|
|
int RNA_property_override_flag(PropertyRNA *prop);
|
2017-11-23 13:41:07 +01:00
|
|
|
int RNA_property_tags(PropertyRNA *prop);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
bool RNA_property_builtin(PropertyRNA *prop);
|
2011-06-06 17:50:20 +00:00
|
|
|
void *RNA_property_py_data_get(PropertyRNA *prop);
|
2009-04-19 13:37:59 +00:00
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
bool RNA_property_array_check(PropertyRNA *prop);
|
|
|
|
|
int RNA_property_multi_array_length(PointerRNA *ptr, PropertyRNA *prop, int dimension);
|
|
|
|
|
int RNA_property_array_dimension(PointerRNA *ptr, PropertyRNA *prop, int length[]);
|
RNA: subtypes and units
* Reviewed subtypes, making them more specific and adding new ones.
* Subtypes now have an associated type of units (length, area, volume,
mass, rotation, time, velocity, acceleration). These are not used
yet anywhere.
* Centralized code that decides the name of array items based on
subtype (XYZ, RGB), was copied in 3 places.
* RNA_def_float etc functions still need to be update, will do this
later together with another change.
2009-08-10 21:31:05 +00:00
|
|
|
char RNA_property_array_item_char(PropertyRNA *prop, int index);
|
2013-03-07 02:44:55 +00:00
|
|
|
int RNA_property_array_item_index(PropertyRNA *prop, char name);
|
2009-04-19 13:37:59 +00:00
|
|
|
|
|
|
|
|
int RNA_property_string_maxlength(PropertyRNA *prop);
|
2008-11-14 14:34:19 +00:00
|
|
|
|
2020-06-20 13:50:12 +10:00
|
|
|
const char *RNA_property_ui_name(const PropertyRNA *prop);
|
|
|
|
|
const char *RNA_property_ui_name_raw(const PropertyRNA *prop);
|
|
|
|
|
const char *RNA_property_ui_description(const PropertyRNA *prop);
|
|
|
|
|
const char *RNA_property_ui_description_raw(const PropertyRNA *prop);
|
|
|
|
|
const char *RNA_property_translation_context(const PropertyRNA *prop);
|
|
|
|
|
int RNA_property_ui_icon(const PropertyRNA *prop);
|
2009-04-19 13:37:59 +00:00
|
|
|
|
|
|
|
|
/* Dynamic Property Information */
|
2008-11-14 14:34:19 +00:00
|
|
|
|
2008-11-24 15:51:55 +00:00
|
|
|
void RNA_property_int_range(PointerRNA *ptr, PropertyRNA *prop, int *hardmin, int *hardmax);
|
|
|
|
|
void RNA_property_int_ui_range(
|
|
|
|
|
PointerRNA *ptr, PropertyRNA *prop, int *softmin, int *softmax, int *step);
|
2008-11-14 14:34:19 +00:00
|
|
|
|
2008-11-24 15:51:55 +00:00
|
|
|
void RNA_property_float_range(PointerRNA *ptr, PropertyRNA *prop, float *hardmin, float *hardmax);
|
|
|
|
|
void RNA_property_float_ui_range(PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
float *softmin,
|
|
|
|
|
float *softmax,
|
|
|
|
|
float *step,
|
|
|
|
|
float *precision);
|
2008-11-14 14:34:19 +00:00
|
|
|
|
2010-02-21 14:48:28 +00:00
|
|
|
int RNA_property_float_clamp(PointerRNA *ptr, PropertyRNA *prop, float *value);
|
|
|
|
|
int RNA_property_int_clamp(PointerRNA *ptr, PropertyRNA *prop, int *value);
|
|
|
|
|
|
2017-10-18 15:07:26 +11:00
|
|
|
bool RNA_enum_identifier(const EnumPropertyItem *item, const int value, const char **identifier);
|
|
|
|
|
int RNA_enum_bitflag_identifiers(const EnumPropertyItem *item,
|
|
|
|
|
const int value,
|
|
|
|
|
const char **identifier);
|
|
|
|
|
bool RNA_enum_name(const EnumPropertyItem *item, const int value, const char **r_name);
|
|
|
|
|
bool RNA_enum_description(const EnumPropertyItem *item, const int value, const char **description);
|
|
|
|
|
int RNA_enum_from_value(const EnumPropertyItem *item, const int value);
|
|
|
|
|
int RNA_enum_from_identifier(const EnumPropertyItem *item, const char *identifier);
|
2018-11-07 10:54:14 +11:00
|
|
|
int RNA_enum_from_name(const EnumPropertyItem *item, const char *name);
|
2017-11-23 13:41:07 +01:00
|
|
|
unsigned int RNA_enum_items_count(const EnumPropertyItem *item);
|
2009-06-21 14:30:59 +00:00
|
|
|
|
2016-02-09 12:44:06 +01:00
|
|
|
void RNA_property_enum_items_ex(struct bContext *C,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
const bool use_static,
|
2017-10-18 15:07:26 +11:00
|
|
|
const EnumPropertyItem **r_item,
|
|
|
|
|
int *r_totitem,
|
|
|
|
|
bool *r_free);
|
|
|
|
|
void RNA_property_enum_items(struct bContext *C,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
const EnumPropertyItem **r_item,
|
|
|
|
|
int *r_totitem,
|
|
|
|
|
bool *r_free);
|
|
|
|
|
void RNA_property_enum_items_gettexted(struct bContext *C,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
const EnumPropertyItem **r_item,
|
|
|
|
|
int *r_totitem,
|
|
|
|
|
bool *r_free);
|
|
|
|
|
void RNA_property_enum_items_gettexted_all(struct bContext *C,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
const EnumPropertyItem **r_item,
|
|
|
|
|
int *r_totitem,
|
|
|
|
|
bool *r_free);
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_property_enum_value(
|
|
|
|
|
struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *r_value);
|
|
|
|
|
bool RNA_property_enum_identifier(struct bContext *C,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
const int value,
|
|
|
|
|
const char **identifier);
|
|
|
|
|
bool RNA_property_enum_name(
|
2014-02-19 11:30:06 +11:00
|
|
|
struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **name);
|
|
|
|
|
bool RNA_property_enum_name_gettexted(
|
2009-12-07 00:16:57 +00:00
|
|
|
struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **name);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2016-09-18 21:36:34 +02:00
|
|
|
bool RNA_property_enum_item_from_value(struct bContext *C,
|
2018-07-01 15:47:09 +02:00
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
2016-03-15 21:12:37 +11:00
|
|
|
const int value,
|
|
|
|
|
EnumPropertyItem *r_item);
|
|
|
|
|
bool RNA_property_enum_item_from_value_gettexted(struct bContext *C,
|
2018-07-01 15:47:09 +02:00
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
2018-01-15 15:49:16 +11:00
|
|
|
const int value,
|
2009-12-07 00:16:57 +00:00
|
|
|
EnumPropertyItem *r_item);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2009-12-07 00:16:57 +00:00
|
|
|
int RNA_property_enum_bitflag_identifiers(struct bContext *C,
|
2018-07-01 15:47:09 +02:00
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
2018-01-15 15:49:16 +11:00
|
|
|
const int value,
|
2009-12-07 00:16:57 +00:00
|
|
|
const char **identifier);
|
2008-12-02 14:36:35 +00:00
|
|
|
|
2009-06-07 13:09:18 +00:00
|
|
|
StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop);
|
2018-07-02 11:47:00 +02:00
|
|
|
bool RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *value);
|
2009-06-07 13:09:18 +00:00
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop);
|
2016-09-22 00:10:53 +02:00
|
|
|
bool RNA_property_editable_info(PointerRNA *ptr, PropertyRNA *prop, const char **r_info);
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_property_editable_index(PointerRNA *ptr, PropertyRNA *prop, int index);
|
2019-08-14 23:29:46 +10:00
|
|
|
|
|
|
|
|
/* without lib check, only checks the flag */
|
|
|
|
|
bool RNA_property_editable_flag(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
bool RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop);
|
2018-04-17 18:03:41 +02:00
|
|
|
bool RNA_property_overridable_get(PointerRNA *ptr, PropertyRNA *prop);
|
2019-06-14 23:16:04 +02:00
|
|
|
bool RNA_property_overridable_library_set(PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
const bool is_overridable);
|
2018-03-23 16:30:57 +01:00
|
|
|
bool RNA_property_overridden(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
bool RNA_property_comparable(PointerRNA *ptr, PropertyRNA *prop);
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_property_path_from_ID_check(PointerRNA *ptr, PropertyRNA *prop); /* slow, use with care */
|
2008-11-14 14:34:19 +00:00
|
|
|
|
2009-01-01 15:52:51 +00:00
|
|
|
void RNA_property_update(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop);
|
2009-12-08 17:23:48 +00:00
|
|
|
void RNA_property_update_main(struct Main *bmain,
|
|
|
|
|
struct Scene *scene,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop);
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_property_update_check(struct PropertyRNA *prop);
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2008-11-14 14:34:19 +00:00
|
|
|
/* Property Data */
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2018-07-01 15:47:09 +02:00
|
|
|
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, bool value);
|
|
|
|
|
void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, bool *values);
|
|
|
|
|
bool RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index);
|
|
|
|
|
void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const bool *values);
|
|
|
|
|
void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, bool value);
|
|
|
|
|
bool RNA_property_boolean_get_default(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
void RNA_property_boolean_get_default_array(PointerRNA *ptr, PropertyRNA *prop, bool *values);
|
|
|
|
|
bool RNA_property_boolean_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int index);
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2008-11-24 15:51:55 +00:00
|
|
|
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value);
|
2009-02-02 19:57:57 +00:00
|
|
|
void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values);
|
2011-06-16 06:47:54 +00:00
|
|
|
void RNA_property_int_get_array_range(PointerRNA *ptr, PropertyRNA *prop, int values[2]);
|
2009-02-02 19:57:57 +00:00
|
|
|
int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index);
|
|
|
|
|
void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *values);
|
|
|
|
|
void RNA_property_int_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, int value);
|
2009-12-17 10:47:55 +00:00
|
|
|
int RNA_property_int_get_default(PointerRNA *ptr, PropertyRNA *prop);
|
2018-12-15 22:37:12 +03:00
|
|
|
bool RNA_property_int_set_default(PointerRNA *ptr, PropertyRNA *prop, int value);
|
2009-12-17 10:47:55 +00:00
|
|
|
void RNA_property_int_get_default_array(PointerRNA *ptr, PropertyRNA *prop, int *values);
|
|
|
|
|
int RNA_property_int_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int index);
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2008-11-24 15:51:55 +00:00
|
|
|
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value);
|
2009-02-02 19:57:57 +00:00
|
|
|
void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *values);
|
2011-06-16 06:47:54 +00:00
|
|
|
void RNA_property_float_get_array_range(PointerRNA *ptr, PropertyRNA *prop, float values[2]);
|
2009-02-02 19:57:57 +00:00
|
|
|
float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index);
|
|
|
|
|
void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const float *values);
|
|
|
|
|
void RNA_property_float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, float value);
|
2009-12-17 10:47:55 +00:00
|
|
|
float RNA_property_float_get_default(PointerRNA *ptr, PropertyRNA *prop);
|
2018-12-15 22:37:12 +03:00
|
|
|
bool RNA_property_float_set_default(PointerRNA *ptr, PropertyRNA *prop, float value);
|
2009-12-17 10:47:55 +00:00
|
|
|
void RNA_property_float_get_default_array(PointerRNA *ptr, PropertyRNA *prop, float *values);
|
|
|
|
|
float RNA_property_float_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int index);
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2008-11-24 15:51:55 +00:00
|
|
|
void RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop, char *value);
|
2011-10-22 10:49:35 +00:00
|
|
|
char *RNA_property_string_get_alloc(
|
|
|
|
|
PointerRNA *ptr, PropertyRNA *prop, char *fixedbuf, int fixedlen, int *r_len);
|
2008-11-24 15:51:55 +00:00
|
|
|
void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *value);
|
2018-01-15 15:49:16 +11:00
|
|
|
void RNA_property_string_set_bytes(PointerRNA *ptr, PropertyRNA *prop, const char *value, int len);
|
2008-11-24 15:51:55 +00:00
|
|
|
int RNA_property_string_length(PointerRNA *ptr, PropertyRNA *prop);
|
2010-02-08 09:22:17 +00:00
|
|
|
void RNA_property_string_get_default(PointerRNA *ptr, PropertyRNA *prop, char *value);
|
|
|
|
|
char *RNA_property_string_get_default_alloc(PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
char *fixedbuf,
|
|
|
|
|
int fixedlen);
|
|
|
|
|
int RNA_property_string_default_length(PointerRNA *ptr, PropertyRNA *prop);
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2008-11-24 15:51:55 +00:00
|
|
|
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value);
|
2009-12-17 10:47:55 +00:00
|
|
|
int RNA_property_enum_get_default(PointerRNA *ptr, PropertyRNA *prop);
|
2016-09-18 21:36:34 +02:00
|
|
|
int RNA_property_enum_step(
|
|
|
|
|
const struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int from_value, int step);
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2019-05-20 18:06:09 +10:00
|
|
|
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop) ATTR_NONNULL(1, 2);
|
|
|
|
|
void RNA_property_pointer_set(PointerRNA *ptr,
|
2019-05-17 13:59:59 +02:00
|
|
|
PropertyRNA *prop,
|
2019-05-20 18:06:09 +10:00
|
|
|
PointerRNA ptr_value,
|
|
|
|
|
struct ReportList *reports) ATTR_NONNULL(1, 2);
|
|
|
|
|
PointerRNA RNA_property_pointer_get_default(PointerRNA *ptr, PropertyRNA *prop) ATTR_NONNULL(1, 2);
|
2008-11-07 02:58:25 +00:00
|
|
|
|
2008-11-24 15:51:55 +00:00
|
|
|
void RNA_property_collection_begin(PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
CollectionPropertyIterator *iter);
|
|
|
|
|
void RNA_property_collection_next(CollectionPropertyIterator *iter);
|
2013-05-10 22:05:47 +00:00
|
|
|
void RNA_property_collection_skip(CollectionPropertyIterator *iter, int num);
|
2008-11-24 15:51:55 +00:00
|
|
|
void RNA_property_collection_end(CollectionPropertyIterator *iter);
|
|
|
|
|
int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop);
|
2009-10-27 10:14:02 +00:00
|
|
|
int RNA_property_collection_lookup_index(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *t_ptr);
|
2008-11-24 15:51:55 +00:00
|
|
|
int RNA_property_collection_lookup_int(PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
int key,
|
|
|
|
|
PointerRNA *r_ptr);
|
|
|
|
|
int RNA_property_collection_lookup_string(PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
const char *key,
|
|
|
|
|
PointerRNA *r_ptr);
|
2020-09-18 15:16:30 +02:00
|
|
|
int RNA_property_collection_lookup_string_index(
|
|
|
|
|
PointerRNA *ptr, PropertyRNA *prop, const char *key, PointerRNA *r_ptr, int *r_index);
|
2011-10-01 17:54:33 +00:00
|
|
|
int RNA_property_collection_assign_int(PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
const int key,
|
|
|
|
|
const PointerRNA *assign_ptr);
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_property_collection_type_get(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr);
|
2008-11-07 02:58:25 +00:00
|
|
|
|
2009-07-02 03:32:57 +00:00
|
|
|
/* efficient functions to set properties for arrays */
|
|
|
|
|
int RNA_property_collection_raw_array(PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
PropertyRNA *itemprop,
|
|
|
|
|
RawArray *array);
|
2011-02-01 23:53:54 +00:00
|
|
|
int RNA_property_collection_raw_get(struct ReportList *reports,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
const char *propname,
|
|
|
|
|
void *array,
|
|
|
|
|
RawPropertyType type,
|
|
|
|
|
int len);
|
|
|
|
|
int RNA_property_collection_raw_set(struct ReportList *reports,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
const char *propname,
|
|
|
|
|
void *array,
|
|
|
|
|
RawPropertyType type,
|
|
|
|
|
int len);
|
2009-07-02 03:32:57 +00:00
|
|
|
int RNA_raw_type_sizeof(RawPropertyType type);
|
|
|
|
|
RawPropertyType RNA_property_raw_type(PropertyRNA *prop);
|
|
|
|
|
|
RNA:
* Added support for using pointers + collections as operator properties,
but with the restriction that they must point to other type derived from
ID property groups. The "add" function for these properties will allocate
a new ID property group and point to that.
* Added support for arrays with type IDP_GROUP in ID properties.
* Fix bug getting/setting float array values.
Example code for collections, note the "OperatorMousePath" type is defined
in rna_wm.c and has a float[2] property named "loc".
Defining the operator property:
prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath);
Adding values:
PointerRNA itemptr;
float loc[2] = {1, 1},
RNA_collection_add(op->ptr, "path", &itemptr);
RNA_float_set_array(&itemptr, "loc", loc);
Iterating:
RNA_BEGIN(op->ptr, itemptr, "path") {
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
printf("Location: %f %f\n", loc[0], loc[1]);
}
RNA_END;
2008-12-26 20:38:52 +00:00
|
|
|
/* to create ID property groups */
|
|
|
|
|
void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop);
|
2009-05-28 23:23:47 +00:00
|
|
|
void RNA_property_pointer_remove(PointerRNA *ptr, PropertyRNA *prop);
|
RNA:
* Added support for using pointers + collections as operator properties,
but with the restriction that they must point to other type derived from
ID property groups. The "add" function for these properties will allocate
a new ID property group and point to that.
* Added support for arrays with type IDP_GROUP in ID properties.
* Fix bug getting/setting float array values.
Example code for collections, note the "OperatorMousePath" type is defined
in rna_wm.c and has a float[2] property named "loc".
Defining the operator property:
prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath);
Adding values:
PointerRNA itemptr;
float loc[2] = {1, 1},
RNA_collection_add(op->ptr, "path", &itemptr);
RNA_float_set_array(&itemptr, "loc", loc);
Iterating:
RNA_BEGIN(op->ptr, itemptr, "path") {
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
printf("Location: %f %f\n", loc[0], loc[1]);
}
RNA_END;
2008-12-26 20:38:52 +00:00
|
|
|
void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr);
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key);
|
RNA:
* Added support for using pointers + collections as operator properties,
but with the restriction that they must point to other type derived from
ID property groups. The "add" function for these properties will allocate
a new ID property group and point to that.
* Added support for arrays with type IDP_GROUP in ID properties.
* Fix bug getting/setting float array values.
Example code for collections, note the "OperatorMousePath" type is defined
in rna_wm.c and has a float[2] property named "loc".
Defining the operator property:
prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath);
Adding values:
PointerRNA itemptr;
float loc[2] = {1, 1},
RNA_collection_add(op->ptr, "path", &itemptr);
RNA_float_set_array(&itemptr, "loc", loc);
Iterating:
RNA_BEGIN(op->ptr, itemptr, "path") {
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
printf("Location: %f %f\n", loc[0], loc[1]);
}
RNA_END;
2008-12-26 20:38:52 +00:00
|
|
|
void RNA_property_collection_clear(PointerRNA *ptr, PropertyRNA *prop);
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_property_collection_move(PointerRNA *ptr, PropertyRNA *prop, int key, int pos);
|
RNA:
* Added support for using pointers + collections as operator properties,
but with the restriction that they must point to other type derived from
ID property groups. The "add" function for these properties will allocate
a new ID property group and point to that.
* Added support for arrays with type IDP_GROUP in ID properties.
* Fix bug getting/setting float array values.
Example code for collections, note the "OperatorMousePath" type is defined
in rna_wm.c and has a float[2] property named "loc".
Defining the operator property:
prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath);
Adding values:
PointerRNA itemptr;
float loc[2] = {1, 1},
RNA_collection_add(op->ptr, "path", &itemptr);
RNA_float_set_array(&itemptr, "loc", loc);
Iterating:
RNA_BEGIN(op->ptr, itemptr, "path") {
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
printf("Location: %f %f\n", loc[0], loc[1]);
}
RNA_END;
2008-12-26 20:38:52 +00:00
|
|
|
|
2009-12-17 17:15:38 +00:00
|
|
|
/* copy/reset */
|
2018-06-29 12:46:54 +02:00
|
|
|
bool RNA_property_copy(
|
|
|
|
|
struct Main *bmain, PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, int index);
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index);
|
2018-12-15 22:37:12 +03:00
|
|
|
bool RNA_property_assign_default(PointerRNA *ptr, PropertyRNA *prop);
|
2009-12-17 17:15:38 +00:00
|
|
|
|
2008-11-07 02:58:25 +00:00
|
|
|
/* Path
|
|
|
|
|
*
|
|
|
|
|
* Experimental method to refer to structs and properties with a string,
|
|
|
|
|
* using a syntax like: scenes[0].objects["Cube"].data.verts[7].co
|
|
|
|
|
*
|
|
|
|
|
* This provides a way to refer to RNA data while being detached from any
|
|
|
|
|
* particular pointers, which is useful in a number of applications, like
|
|
|
|
|
* UI code or Actions, though efficiency is a concern. */
|
|
|
|
|
|
2008-11-17 18:44:06 +00:00
|
|
|
char *RNA_path_append(
|
|
|
|
|
const char *path, PointerRNA *ptr, PropertyRNA *prop, int intkey, const char *strkey);
|
2008-11-07 02:58:25 +00:00
|
|
|
char *RNA_path_back(const char *path);
|
|
|
|
|
|
Bugfix [#34836] Crash when driver variable has path == 'data'
Most of the places which relied on RNA_path_resolve() did so believing that if
it returned true, that it had found a valid property, and that the returned
pointer+property combination would be what the path referred to. However, it
turns out that if the property at the end of the path turns out to be a
"pointer" property (e.g. "data" for Object.data), this would automatically
become the pointer part, while the prop part would be set to null. Hence, if a
user accidentally (or otherwise) specifies a path for the single-property driver
variable type like this, then Blender would crash.
This commit introduces two convenience functions - RNA_path_resolve_property()
and RNA_path_resolve_property_full() - which mirror/wrap the existing
RNA_path_resolve() functions. The only difference though is that these include a
check to ensure that what was found from resolving the path was in fact a
property (they only return true iff this is the case), and make it explicitly
clear in the name that this is what they will do so that there's no further
confusion. It is possible to do without these wrapper functions by doing these
checks inline, but the few cases that had been patched already were pretty
hideous looking specimens. Using these just make it clearer and simpler for all.
I've also beefed up the docs on these a bit, and changed these to using bools.
2013-04-22 13:22:07 +00:00
|
|
|
/* path_resolve() variants only ensure that a valid pointer (and optionally property) exist */
|
|
|
|
|
bool RNA_path_resolve(PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop);
|
2009-11-26 11:13:10 +00:00
|
|
|
|
Bugfix [#34836] Crash when driver variable has path == 'data'
Most of the places which relied on RNA_path_resolve() did so believing that if
it returned true, that it had found a valid property, and that the returned
pointer+property combination would be what the path referred to. However, it
turns out that if the property at the end of the path turns out to be a
"pointer" property (e.g. "data" for Object.data), this would automatically
become the pointer part, while the prop part would be set to null. Hence, if a
user accidentally (or otherwise) specifies a path for the single-property driver
variable type like this, then Blender would crash.
This commit introduces two convenience functions - RNA_path_resolve_property()
and RNA_path_resolve_property_full() - which mirror/wrap the existing
RNA_path_resolve() functions. The only difference though is that these include a
check to ensure that what was found from resolving the path was in fact a
property (they only return true iff this is the case), and make it explicitly
clear in the name that this is what they will do so that there's no further
confusion. It is possible to do without these wrapper functions by doing these
checks inline, but the few cases that had been patched already were pretty
hideous looking specimens. Using these just make it clearer and simpler for all.
I've also beefed up the docs on these a bit, and changed these to using bools.
2013-04-22 13:22:07 +00:00
|
|
|
bool RNA_path_resolve_full(
|
2014-03-11 14:57:11 +01:00
|
|
|
PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index);
|
2014-02-22 11:14:15 +11:00
|
|
|
|
Bugfix [#34836] Crash when driver variable has path == 'data'
Most of the places which relied on RNA_path_resolve() did so believing that if
it returned true, that it had found a valid property, and that the returned
pointer+property combination would be what the path referred to. However, it
turns out that if the property at the end of the path turns out to be a
"pointer" property (e.g. "data" for Object.data), this would automatically
become the pointer part, while the prop part would be set to null. Hence, if a
user accidentally (or otherwise) specifies a path for the single-property driver
variable type like this, then Blender would crash.
This commit introduces two convenience functions - RNA_path_resolve_property()
and RNA_path_resolve_property_full() - which mirror/wrap the existing
RNA_path_resolve() functions. The only difference though is that these include a
check to ensure that what was found from resolving the path was in fact a
property (they only return true iff this is the case), and make it explicitly
clear in the name that this is what they will do so that there's no further
confusion. It is possible to do without these wrapper functions by doing these
checks inline, but the few cases that had been patched already were pretty
hideous looking specimens. Using these just make it clearer and simpler for all.
I've also beefed up the docs on these a bit, and changed these to using bools.
2013-04-22 13:22:07 +00:00
|
|
|
/* path_resolve_property() variants ensure that pointer + property both exist */
|
|
|
|
|
bool RNA_path_resolve_property(PointerRNA *ptr,
|
|
|
|
|
const char *path,
|
2014-03-11 14:57:11 +01:00
|
|
|
PointerRNA *r_ptr,
|
|
|
|
|
PropertyRNA **r_prop);
|
Bugfix [#34836] Crash when driver variable has path == 'data'
Most of the places which relied on RNA_path_resolve() did so believing that if
it returned true, that it had found a valid property, and that the returned
pointer+property combination would be what the path referred to. However, it
turns out that if the property at the end of the path turns out to be a
"pointer" property (e.g. "data" for Object.data), this would automatically
become the pointer part, while the prop part would be set to null. Hence, if a
user accidentally (or otherwise) specifies a path for the single-property driver
variable type like this, then Blender would crash.
This commit introduces two convenience functions - RNA_path_resolve_property()
and RNA_path_resolve_property_full() - which mirror/wrap the existing
RNA_path_resolve() functions. The only difference though is that these include a
check to ensure that what was found from resolving the path was in fact a
property (they only return true iff this is the case), and make it explicitly
clear in the name that this is what they will do so that there's no further
confusion. It is possible to do without these wrapper functions by doing these
checks inline, but the few cases that had been patched already were pretty
hideous looking specimens. Using these just make it clearer and simpler for all.
I've also beefed up the docs on these a bit, and changed these to using bools.
2013-04-22 13:22:07 +00:00
|
|
|
|
|
|
|
|
bool RNA_path_resolve_property_full(
|
2014-03-11 14:57:11 +01:00
|
|
|
PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index);
|
2008-11-07 02:58:25 +00:00
|
|
|
|
2018-06-28 11:56:30 +02:00
|
|
|
/* path_resolve_property_and_item_pointer() variants ensure that pointer + property both exist,
|
|
|
|
|
* and resolve last Pointer value if possible (Pointer prop or item of a Collection prop). */
|
|
|
|
|
bool RNA_path_resolve_property_and_item_pointer(PointerRNA *ptr,
|
|
|
|
|
const char *path,
|
|
|
|
|
PointerRNA *r_ptr,
|
|
|
|
|
PropertyRNA **r_prop,
|
|
|
|
|
PointerRNA *r_item_ptr);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-06-28 11:56:30 +02:00
|
|
|
bool RNA_path_resolve_property_and_item_pointer_full(PointerRNA *ptr,
|
|
|
|
|
const char *path,
|
|
|
|
|
PointerRNA *r_ptr,
|
|
|
|
|
PropertyRNA **r_prop,
|
|
|
|
|
int *r_index,
|
|
|
|
|
PointerRNA *r_item_ptr);
|
|
|
|
|
|
2014-08-05 18:59:02 +02:00
|
|
|
typedef struct PropertyElemRNA PropertyElemRNA;
|
|
|
|
|
struct PropertyElemRNA {
|
|
|
|
|
PropertyElemRNA *next, *prev;
|
|
|
|
|
PointerRNA ptr;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
int index;
|
|
|
|
|
};
|
|
|
|
|
bool RNA_path_resolve_elements(PointerRNA *ptr, const char *path, struct ListBase *r_elements);
|
|
|
|
|
|
2019-11-16 20:50:59 +03:00
|
|
|
char *RNA_path_from_struct_to_idproperty(PointerRNA *ptr, struct IDProperty *needle);
|
|
|
|
|
|
2019-08-22 20:43:19 +03:00
|
|
|
struct ID *RNA_find_real_ID_and_path(struct Main *bmain, struct ID *id, const char **r_path);
|
|
|
|
|
|
2009-09-17 10:14:56 +00:00
|
|
|
char *RNA_path_from_ID_to_struct(PointerRNA *ptr);
|
2019-08-22 20:43:19 +03:00
|
|
|
|
|
|
|
|
char *RNA_path_from_real_ID_to_struct(struct Main *bmain, PointerRNA *ptr, struct ID **r_real);
|
|
|
|
|
|
2009-03-25 20:29:01 +00:00
|
|
|
char *RNA_path_from_ID_to_property(PointerRNA *ptr, PropertyRNA *prop);
|
2016-05-28 22:23:39 +10:00
|
|
|
char *RNA_path_from_ID_to_property_index(PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
2020-10-20 23:33:34 +05:30
|
|
|
int index_dim,
|
2016-05-28 22:23:39 +10:00
|
|
|
int index);
|
2012-12-18 15:22:06 +00:00
|
|
|
|
2019-08-22 20:43:19 +03:00
|
|
|
char *RNA_path_from_real_ID_to_property_index(struct Main *bmain,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
2020-10-20 23:33:34 +05:30
|
|
|
int index_dim,
|
2019-08-22 20:43:19 +03:00
|
|
|
int index,
|
2019-09-02 18:33:55 +02:00
|
|
|
struct ID **r_real_id);
|
2019-08-22 20:43:19 +03:00
|
|
|
|
2014-08-05 18:59:02 +02:00
|
|
|
char *RNA_path_resolve_from_type_to_property(struct PointerRNA *ptr,
|
|
|
|
|
struct PropertyRNA *prop,
|
|
|
|
|
const struct StructRNA *type);
|
|
|
|
|
|
2019-08-22 20:43:19 +03:00
|
|
|
char *RNA_path_full_ID_py(struct Main *bmain, struct ID *id);
|
|
|
|
|
char *RNA_path_full_struct_py(struct Main *bmain, struct PointerRNA *ptr);
|
|
|
|
|
char *RNA_path_full_property_py_ex(
|
|
|
|
|
struct Main *bmain, PointerRNA *ptr, PropertyRNA *prop, int index, bool use_fallback);
|
|
|
|
|
char *RNA_path_full_property_py(struct Main *bmain,
|
|
|
|
|
struct PointerRNA *ptr,
|
|
|
|
|
struct PropertyRNA *prop,
|
|
|
|
|
int index);
|
2012-12-18 16:20:30 +00:00
|
|
|
char *RNA_path_struct_property_py(struct PointerRNA *ptr, struct PropertyRNA *prop, int index);
|
|
|
|
|
char *RNA_path_property_py(struct PointerRNA *ptr, struct PropertyRNA *prop, int index);
|
2009-03-25 20:29:01 +00:00
|
|
|
|
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
|
|
|
/* Quick name based property access
|
|
|
|
|
*
|
|
|
|
|
* These are just an easier way to access property values without having to
|
|
|
|
|
* call RNA_struct_find_property. The names have to exist as RNA properties
|
|
|
|
|
* for the type in the pointer, if they do not exist an error will be printed.
|
|
|
|
|
*
|
2017-11-29 15:31:31 +01:00
|
|
|
* There is no support for pointers and collections here yet, these can be
|
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
|
|
|
* added when ID properties support them. */
|
|
|
|
|
|
2018-07-01 15:47:09 +02:00
|
|
|
bool RNA_boolean_get(PointerRNA *ptr, const char *name);
|
|
|
|
|
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value);
|
|
|
|
|
void RNA_boolean_get_array(PointerRNA *ptr, const char *name, bool *values);
|
|
|
|
|
void RNA_boolean_set_array(PointerRNA *ptr, const char *name, const bool *values);
|
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
int RNA_int_get(PointerRNA *ptr, const char *name);
|
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
|
|
|
void RNA_int_set(PointerRNA *ptr, const char *name, int value);
|
|
|
|
|
void RNA_int_get_array(PointerRNA *ptr, const char *name, int *values);
|
|
|
|
|
void RNA_int_set_array(PointerRNA *ptr, const char *name, const int *values);
|
|
|
|
|
|
|
|
|
|
float RNA_float_get(PointerRNA *ptr, const char *name);
|
2013-03-07 02:44:55 +00:00
|
|
|
void RNA_float_set(PointerRNA *ptr, const char *name, float value);
|
|
|
|
|
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values);
|
|
|
|
|
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values);
|
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
int RNA_enum_get(PointerRNA *ptr, const char *name);
|
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
|
|
|
void RNA_enum_set(PointerRNA *ptr, const char *name, int value);
|
2016-01-07 21:52:54 +01:00
|
|
|
void RNA_enum_set_identifier(struct bContext *C,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
const char *name,
|
|
|
|
|
const char *id);
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_enum_is_equal(struct bContext *C,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
const char *name,
|
|
|
|
|
const char *enumname);
|
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
|
|
|
|
2019-06-26 12:40:22 +10:00
|
|
|
/* Lower level functions that don't use a PointerRNA. */
|
2017-10-18 15:07:26 +11:00
|
|
|
bool RNA_enum_value_from_id(const EnumPropertyItem *item, const char *identifier, int *r_value);
|
|
|
|
|
bool RNA_enum_id_from_value(const EnumPropertyItem *item, int value, const char **r_identifier);
|
|
|
|
|
bool RNA_enum_icon_from_value(const EnumPropertyItem *item, int value, int *r_icon);
|
|
|
|
|
bool RNA_enum_name_from_value(const EnumPropertyItem *item, int value, const char **r_name);
|
2009-04-01 12:43:07 +00:00
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
void RNA_string_get(PointerRNA *ptr, const char *name, char *value);
|
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
|
|
|
char *RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen);
|
2013-03-07 02:44:55 +00:00
|
|
|
int RNA_string_length(PointerRNA *ptr, const char *name);
|
|
|
|
|
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value);
|
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
|
|
|
|
2010-10-09 21:17:14 +00:00
|
|
|
/**
|
|
|
|
|
* Retrieve the named property from PointerRNA.
|
|
|
|
|
*/
|
2009-02-02 19:57:57 +00:00
|
|
|
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name);
|
2010-10-09 21:17:14 +00:00
|
|
|
/* Set the property name of PointerRNA ptr to ptr_value */
|
2009-07-25 19:10:24 +00:00
|
|
|
void RNA_pointer_set(PointerRNA *ptr, const char *name, PointerRNA ptr_value);
|
RNA:
* Added support for using pointers + collections as operator properties,
but with the restriction that they must point to other type derived from
ID property groups. The "add" function for these properties will allocate
a new ID property group and point to that.
* Added support for arrays with type IDP_GROUP in ID properties.
* Fix bug getting/setting float array values.
Example code for collections, note the "OperatorMousePath" type is defined
in rna_wm.c and has a float[2] property named "loc".
Defining the operator property:
prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath);
Adding values:
PointerRNA itemptr;
float loc[2] = {1, 1},
RNA_collection_add(op->ptr, "path", &itemptr);
RNA_float_set_array(&itemptr, "loc", loc);
Iterating:
RNA_BEGIN(op->ptr, itemptr, "path") {
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
printf("Location: %f %f\n", loc[0], loc[1]);
}
RNA_END;
2008-12-26 20:38:52 +00:00
|
|
|
void RNA_pointer_add(PointerRNA *ptr, const char *name);
|
|
|
|
|
|
|
|
|
|
void RNA_collection_begin(PointerRNA *ptr, const char *name, CollectionPropertyIterator *iter);
|
2013-03-07 02:44:55 +00:00
|
|
|
int RNA_collection_length(PointerRNA *ptr, const char *name);
|
RNA:
* Added support for using pointers + collections as operator properties,
but with the restriction that they must point to other type derived from
ID property groups. The "add" function for these properties will allocate
a new ID property group and point to that.
* Added support for arrays with type IDP_GROUP in ID properties.
* Fix bug getting/setting float array values.
Example code for collections, note the "OperatorMousePath" type is defined
in rna_wm.c and has a float[2] property named "loc".
Defining the operator property:
prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath);
Adding values:
PointerRNA itemptr;
float loc[2] = {1, 1},
RNA_collection_add(op->ptr, "path", &itemptr);
RNA_float_set_array(&itemptr, "loc", loc);
Iterating:
RNA_BEGIN(op->ptr, itemptr, "path") {
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
printf("Location: %f %f\n", loc[0], loc[1]);
}
RNA_END;
2008-12-26 20:38:52 +00:00
|
|
|
void RNA_collection_add(PointerRNA *ptr, const char *name, PointerRNA *r_value);
|
|
|
|
|
void RNA_collection_clear(PointerRNA *ptr, const char *name);
|
|
|
|
|
|
2011-11-05 05:44:52 +00:00
|
|
|
#define RNA_BEGIN(sptr, itemptr, propname) \
|
|
|
|
|
{ \
|
|
|
|
|
CollectionPropertyIterator rna_macro_iter; \
|
2012-04-15 07:24:14 +00:00
|
|
|
for (RNA_collection_begin(sptr, propname, &rna_macro_iter); rna_macro_iter.valid; \
|
|
|
|
|
RNA_property_collection_next(&rna_macro_iter)) { \
|
|
|
|
|
PointerRNA itemptr = rna_macro_iter.ptr;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-11-05 05:44:52 +00:00
|
|
|
#define RNA_END \
|
|
|
|
|
} \
|
|
|
|
|
RNA_property_collection_end(&rna_macro_iter); \
|
2018-11-30 15:35:15 +11:00
|
|
|
} \
|
|
|
|
|
((void)0)
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-11-05 05:44:52 +00:00
|
|
|
#define RNA_PROP_BEGIN(sptr, itemptr, prop) \
|
|
|
|
|
{ \
|
|
|
|
|
CollectionPropertyIterator rna_macro_iter; \
|
2012-04-15 07:24:14 +00:00
|
|
|
for (RNA_property_collection_begin(sptr, prop, &rna_macro_iter); rna_macro_iter.valid; \
|
|
|
|
|
RNA_property_collection_next(&rna_macro_iter)) { \
|
|
|
|
|
PointerRNA itemptr = rna_macro_iter.ptr;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-11-05 05:44:52 +00:00
|
|
|
#define RNA_PROP_END \
|
|
|
|
|
} \
|
|
|
|
|
RNA_property_collection_end(&rna_macro_iter); \
|
2019-04-02 17:54:04 +11:00
|
|
|
} \
|
|
|
|
|
((void)0)
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-11-05 05:44:52 +00:00
|
|
|
#define RNA_STRUCT_BEGIN(sptr, prop) \
|
|
|
|
|
{ \
|
|
|
|
|
CollectionPropertyIterator rna_macro_iter; \
|
2012-04-15 07:24:14 +00:00
|
|
|
for (RNA_property_collection_begin( \
|
2014-09-11 13:41:14 +09:00
|
|
|
sptr, RNA_struct_iterator_property((sptr)->type), &rna_macro_iter); \
|
2012-04-15 07:24:14 +00:00
|
|
|
rna_macro_iter.valid; \
|
|
|
|
|
RNA_property_collection_next(&rna_macro_iter)) { \
|
2014-09-11 13:41:14 +09:00
|
|
|
PropertyRNA *prop = (PropertyRNA *)rna_macro_iter.ptr.data;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-06-17 09:08:17 +10:00
|
|
|
#define RNA_STRUCT_BEGIN_SKIP_RNA_TYPE(sptr, prop) \
|
|
|
|
|
{ \
|
|
|
|
|
CollectionPropertyIterator rna_macro_iter; \
|
|
|
|
|
RNA_property_collection_begin( \
|
|
|
|
|
sptr, RNA_struct_iterator_property((sptr)->type), &rna_macro_iter); \
|
|
|
|
|
if (rna_macro_iter.valid) { \
|
|
|
|
|
RNA_property_collection_next(&rna_macro_iter); \
|
|
|
|
|
} \
|
|
|
|
|
for (; rna_macro_iter.valid; RNA_property_collection_next(&rna_macro_iter)) { \
|
|
|
|
|
PropertyRNA *prop = (PropertyRNA *)rna_macro_iter.ptr.data;
|
|
|
|
|
|
2011-11-05 05:44:52 +00:00
|
|
|
#define RNA_STRUCT_END \
|
|
|
|
|
} \
|
|
|
|
|
RNA_property_collection_end(&rna_macro_iter); \
|
2019-04-02 17:54:04 +11:00
|
|
|
} \
|
|
|
|
|
((void)0)
|
2009-06-24 21:27:10 +00:00
|
|
|
|
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
|
|
|
/* check if the idproperty exists, for operators */
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_property_is_set_ex(PointerRNA *ptr, PropertyRNA *prop, bool use_ghost);
|
|
|
|
|
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop);
|
2013-03-18 16:34:57 +00:00
|
|
|
void RNA_property_unset(PointerRNA *ptr, PropertyRNA *prop);
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_struct_property_is_set_ex(PointerRNA *ptr, const char *identifier, bool use_ghost);
|
|
|
|
|
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier);
|
2017-12-04 15:26:43 +01:00
|
|
|
bool RNA_property_is_idprop(const PropertyRNA *prop);
|
2013-05-02 21:27:19 +00:00
|
|
|
bool RNA_property_is_unlink(PropertyRNA *prop);
|
2013-03-18 16:34:57 +00:00
|
|
|
void RNA_struct_property_unset(PointerRNA *ptr, const char *identifier);
|
RNA
* More ID property support. What was already possible was showing
ID properties as RNA properties. Now it is possible to define
RNA properties and have an ID property automatically created the
first time it is set (if not set it retuns the default).
* Added support for defining RNA structs and properties at runtime.
This is useful for python and plugins, and could also be used
for operators, not sure yet what is best there, they could be done
in preprocess for speed, but not sure how to do that while keeping
operator registration a single function.
* Added quick functions to get/set properties based on names, to be
used for operators.
* Added some simple support for inheritance, was already doing this
but having it as a feature simplifies things. Two things were added
for this: when defining a struct you can give a 'from' struct whose
properties will be copied, and structs like ID, operator, modifier,
can define a refine callback that will return the more specific type
of the struct like ID -> Object, Mesh, .. .
* Added simple windowmanager wrap with only the registered operators
list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
|
|
|
|
2008-12-26 03:56:52 +00:00
|
|
|
/* python compatible string representation of this property, (must be freed!) */
|
2013-05-15 14:37:01 +00:00
|
|
|
char *RNA_property_as_string(
|
|
|
|
|
struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int index, int max_prop_length);
|
2013-11-06 20:56:18 +00:00
|
|
|
char *RNA_pointer_as_string_id(struct bContext *C, PointerRNA *ptr);
|
2012-12-18 15:22:06 +00:00
|
|
|
char *RNA_pointer_as_string(struct bContext *C,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop_ptr,
|
|
|
|
|
PointerRNA *ptr_prop);
|
2013-09-18 01:22:28 +00:00
|
|
|
char *RNA_pointer_as_string_keywords_ex(struct bContext *C,
|
|
|
|
|
PointerRNA *ptr,
|
2020-10-20 23:33:34 +05:30
|
|
|
const bool as_function,
|
2013-11-26 08:59:14 +11:00
|
|
|
const bool all_args,
|
|
|
|
|
const bool nested_args,
|
2013-05-15 14:37:01 +00:00
|
|
|
const int max_prop_length,
|
2012-03-20 07:41:47 +00:00
|
|
|
PropertyRNA *iterprop);
|
2013-09-18 01:22:28 +00:00
|
|
|
char *RNA_pointer_as_string_keywords(struct bContext *C,
|
|
|
|
|
PointerRNA *ptr,
|
2020-10-20 23:33:34 +05:30
|
|
|
const bool as_function,
|
2013-11-26 08:59:14 +11:00
|
|
|
const bool all_args,
|
|
|
|
|
const bool nested_args,
|
2013-05-15 14:37:01 +00:00
|
|
|
const int max_prop_length);
|
2013-09-18 01:22:28 +00:00
|
|
|
char *RNA_function_as_string_keywords(struct bContext *C,
|
|
|
|
|
FunctionRNA *func,
|
|
|
|
|
const bool as_function,
|
|
|
|
|
const bool all_args,
|
2013-05-15 14:37:01 +00:00
|
|
|
const int max_prop_length);
|
2008-12-26 03:56:52 +00:00
|
|
|
|
2009-04-07 00:49:39 +00:00
|
|
|
/* Function */
|
|
|
|
|
|
2009-04-19 13:37:59 +00:00
|
|
|
const char *RNA_function_identifier(FunctionRNA *func);
|
|
|
|
|
const char *RNA_function_ui_description(FunctionRNA *func);
|
2013-03-18 16:34:57 +00:00
|
|
|
const char *RNA_function_ui_description_raw(FunctionRNA *func);
|
2009-04-19 13:37:59 +00:00
|
|
|
int RNA_function_flag(FunctionRNA *func);
|
2009-12-28 22:48:10 +00:00
|
|
|
int RNA_function_defined(FunctionRNA *func);
|
2009-04-07 00:49:39 +00:00
|
|
|
|
|
|
|
|
PropertyRNA *RNA_function_get_parameter(PointerRNA *ptr, FunctionRNA *func, int index);
|
|
|
|
|
PropertyRNA *RNA_function_find_parameter(PointerRNA *ptr,
|
|
|
|
|
FunctionRNA *func,
|
|
|
|
|
const char *identifier);
|
2009-04-19 13:37:59 +00:00
|
|
|
const struct ListBase *RNA_function_defined_parameters(FunctionRNA *func);
|
2009-04-07 00:49:39 +00:00
|
|
|
|
|
|
|
|
/* Utility */
|
|
|
|
|
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
int RNA_parameter_flag(PropertyRNA *prop);
|
|
|
|
|
|
2009-07-17 02:31:28 +00:00
|
|
|
ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *ptr, FunctionRNA *func);
|
2009-04-07 00:49:39 +00:00
|
|
|
void RNA_parameter_list_free(ParameterList *parms);
|
2009-07-17 02:31:28 +00:00
|
|
|
int RNA_parameter_list_size(ParameterList *parms);
|
2010-03-23 15:04:06 +00:00
|
|
|
int RNA_parameter_list_arg_count(ParameterList *parms);
|
|
|
|
|
int RNA_parameter_list_ret_count(ParameterList *parms);
|
2009-04-07 00:49:39 +00:00
|
|
|
|
|
|
|
|
void RNA_parameter_list_begin(ParameterList *parms, ParameterIterator *iter);
|
|
|
|
|
void RNA_parameter_list_next(ParameterIterator *iter);
|
|
|
|
|
void RNA_parameter_list_end(ParameterIterator *iter);
|
|
|
|
|
|
|
|
|
|
void RNA_parameter_get(ParameterList *parms, PropertyRNA *parm, void **value);
|
|
|
|
|
void RNA_parameter_get_lookup(ParameterList *parms, const char *identifier, void **value);
|
2010-12-19 16:34:58 +00:00
|
|
|
void RNA_parameter_set(ParameterList *parms, PropertyRNA *parm, const void *value);
|
|
|
|
|
void RNA_parameter_set_lookup(ParameterList *parms, const char *identifier, const void *value);
|
2013-08-26 16:08:03 +00:00
|
|
|
/* Only for PROP_DYNAMIC properties! */
|
|
|
|
|
int RNA_parameter_dynamic_length_get(ParameterList *parms, PropertyRNA *parm);
|
|
|
|
|
int RNA_parameter_dynamic_length_get_data(ParameterList *parms, PropertyRNA *parm, void *data);
|
|
|
|
|
void RNA_parameter_dynamic_length_set(ParameterList *parms, PropertyRNA *parm, int length);
|
|
|
|
|
void RNA_parameter_dynamic_length_set_data(ParameterList *parms,
|
|
|
|
|
PropertyRNA *parm,
|
|
|
|
|
void *data,
|
|
|
|
|
int length);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
int RNA_function_call(struct bContext *C,
|
|
|
|
|
struct ReportList *reports,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
FunctionRNA *func,
|
|
|
|
|
ParameterList *parms);
|
|
|
|
|
int RNA_function_call_lookup(struct bContext *C,
|
|
|
|
|
struct ReportList *reports,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
const char *identifier,
|
|
|
|
|
ParameterList *parms);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
int RNA_function_call_direct(struct bContext *C,
|
|
|
|
|
struct ReportList *reports,
|
|
|
|
|
PointerRNA *ptr,
|
2013-09-01 15:01:15 +00:00
|
|
|
FunctionRNA *func,
|
|
|
|
|
const char *format,
|
|
|
|
|
...) ATTR_PRINTF_FORMAT(5, 6);
|
2013-03-07 02:44:55 +00:00
|
|
|
int RNA_function_call_direct_lookup(struct bContext *C,
|
|
|
|
|
struct ReportList *reports,
|
|
|
|
|
PointerRNA *ptr,
|
2013-09-01 15:01:15 +00:00
|
|
|
const char *identifier,
|
|
|
|
|
const char *format,
|
|
|
|
|
...) ATTR_PRINTF_FORMAT(5, 6);
|
2013-03-07 02:44:55 +00:00
|
|
|
int RNA_function_call_direct_va(struct bContext *C,
|
|
|
|
|
struct ReportList *reports,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
FunctionRNA *func,
|
|
|
|
|
const char *format,
|
|
|
|
|
va_list args);
|
|
|
|
|
int RNA_function_call_direct_va_lookup(struct bContext *C,
|
|
|
|
|
struct ReportList *reports,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
const char *identifier,
|
|
|
|
|
const char *format,
|
|
|
|
|
va_list args);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2017-11-29 14:09:49 +11:00
|
|
|
const char *RNA_translate_ui_text(const char *text,
|
|
|
|
|
const char *text_ctxt,
|
|
|
|
|
struct StructRNA *type,
|
|
|
|
|
struct PropertyRNA *prop,
|
|
|
|
|
int translate);
|
2017-07-05 14:43:43 +02:00
|
|
|
|
2009-06-07 13:09:18 +00:00
|
|
|
/* ID */
|
|
|
|
|
|
2017-05-12 01:42:42 +02:00
|
|
|
short RNA_type_to_ID_code(const StructRNA *type);
|
2009-06-07 13:09:18 +00:00
|
|
|
StructRNA *ID_code_to_RNA_type(short idcode);
|
|
|
|
|
|
2012-11-01 15:56:42 +00:00
|
|
|
#define RNA_POINTER_INVALIDATE(ptr) \
|
|
|
|
|
{ \
|
|
|
|
|
/* this is checked for validity */ \
|
2019-08-23 09:52:12 +02:00
|
|
|
(ptr)->type = NULL; /* should not be needed but prevent bad pointer access, just in case */ \
|
|
|
|
|
(ptr)->owner_id = NULL; \
|
2012-11-01 15:56:42 +00:00
|
|
|
} \
|
|
|
|
|
(void)0
|
|
|
|
|
|
2011-09-09 01:29:53 +00:00
|
|
|
/* macro which inserts the function name */
|
2017-09-29 19:10:08 +10:00
|
|
|
#if defined __GNUC__
|
2012-06-10 19:59:02 +00:00
|
|
|
# define RNA_warning(format, args...) _RNA_warning("%s: " format "\n", __func__, ##args)
|
2011-11-23 15:39:29 +00:00
|
|
|
#else
|
2011-12-01 18:38:03 +00:00
|
|
|
# define RNA_warning(format, ...) _RNA_warning("%s: " format "\n", __FUNCTION__, __VA_ARGS__)
|
2011-09-09 11:54:13 +00:00
|
|
|
#endif
|
2011-09-09 01:29:53 +00:00
|
|
|
|
2013-09-01 15:01:15 +00:00
|
|
|
void _RNA_warning(const char *format, ...) ATTR_PRINTF_FORMAT(1, 2);
|
2011-03-27 23:11:22 +00:00
|
|
|
|
2017-11-29 15:31:31 +01:00
|
|
|
/* Equals test. */
|
2012-11-20 19:44:20 +00:00
|
|
|
|
2019-06-26 12:40:22 +10:00
|
|
|
/**
|
|
|
|
|
* \note In practice, #EQ_STRICT and #EQ_COMPARE have same behavior currently,
|
|
|
|
|
* and will yield same result.
|
|
|
|
|
*/
|
2017-11-29 15:31:31 +01:00
|
|
|
typedef enum eRNACompareMode {
|
|
|
|
|
/* Only care about equality, not full comparison. */
|
2019-06-26 12:40:22 +10:00
|
|
|
/** Set/unset ignored. */
|
|
|
|
|
RNA_EQ_STRICT,
|
|
|
|
|
/** Unset property matches anything. */
|
|
|
|
|
RNA_EQ_UNSET_MATCH_ANY,
|
|
|
|
|
/** Unset property never matches set property. */
|
|
|
|
|
RNA_EQ_UNSET_MATCH_NONE,
|
|
|
|
|
/** Full comparison. */
|
2017-11-29 15:31:31 +01:00
|
|
|
RNA_EQ_COMPARE,
|
|
|
|
|
} eRNACompareMode;
|
2013-09-20 09:10:17 +00:00
|
|
|
|
2018-06-29 12:46:54 +02:00
|
|
|
bool RNA_property_equals(struct Main *bmain,
|
|
|
|
|
struct PointerRNA *ptr_a,
|
|
|
|
|
struct PointerRNA *ptr_b,
|
|
|
|
|
struct PropertyRNA *prop,
|
|
|
|
|
eRNACompareMode mode);
|
|
|
|
|
bool RNA_struct_equals(struct Main *bmain,
|
|
|
|
|
struct PointerRNA *ptr_a,
|
|
|
|
|
struct PointerRNA *ptr_b,
|
|
|
|
|
eRNACompareMode mode);
|
2017-11-29 15:31:31 +01:00
|
|
|
|
|
|
|
|
/* Override. */
|
|
|
|
|
|
2019-06-26 12:40:22 +10:00
|
|
|
/** Flags for #RNA_struct_override_matches. */
|
2017-12-18 10:13:43 +01:00
|
|
|
typedef enum eRNAOverrideMatch {
|
2019-06-26 12:40:22 +10:00
|
|
|
/** Do not compare properties that are not overridable. */
|
2017-12-18 10:13:43 +01:00
|
|
|
RNA_OVERRIDE_COMPARE_IGNORE_NON_OVERRIDABLE = 1 << 0,
|
2019-06-26 12:40:22 +10:00
|
|
|
/** Do not compare properties that are already overridden. */
|
2017-12-18 10:13:43 +01:00
|
|
|
RNA_OVERRIDE_COMPARE_IGNORE_OVERRIDDEN = 1 << 1,
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-06-26 12:40:22 +10:00
|
|
|
/** Create new property override if needed and possible. */
|
2017-12-18 10:13:43 +01:00
|
|
|
RNA_OVERRIDE_COMPARE_CREATE = 1 << 16,
|
2019-06-26 12:40:22 +10:00
|
|
|
/** Restore property's value(s) to reference ones if needed and possible. */
|
2017-12-18 10:13:43 +01:00
|
|
|
RNA_OVERRIDE_COMPARE_RESTORE = 1 << 17,
|
|
|
|
|
} eRNAOverrideMatch;
|
|
|
|
|
|
|
|
|
|
typedef enum eRNAOverrideMatchResult {
|
2019-06-26 12:40:22 +10:00
|
|
|
/**
|
|
|
|
|
* Some new property overrides were created to take into account
|
|
|
|
|
* differences between local and reference.
|
|
|
|
|
*/
|
2017-12-18 10:13:43 +01:00
|
|
|
RNA_OVERRIDE_MATCH_RESULT_CREATED = 1 << 0,
|
2019-06-26 12:40:22 +10:00
|
|
|
/** Some properties were reset to reference values. */
|
2017-12-18 10:13:43 +01:00
|
|
|
RNA_OVERRIDE_MATCH_RESULT_RESTORED = 1 << 1,
|
|
|
|
|
} eRNAOverrideMatchResult;
|
|
|
|
|
|
2018-03-14 11:47:35 +01:00
|
|
|
typedef enum eRNAOverrideStatus {
|
2019-06-26 12:40:22 +10:00
|
|
|
/** The property is overridable. */
|
|
|
|
|
RNA_OVERRIDE_STATUS_OVERRIDABLE = 1 << 0,
|
|
|
|
|
/** The property is overridden. */
|
|
|
|
|
RNA_OVERRIDE_STATUS_OVERRIDDEN = 1 << 1,
|
|
|
|
|
/** Overriding this property is mandatory when creating an override. */
|
|
|
|
|
RNA_OVERRIDE_STATUS_MANDATORY = 1 << 2,
|
|
|
|
|
/** The override status of this property is locked. */
|
|
|
|
|
RNA_OVERRIDE_STATUS_LOCKED = 1 << 3,
|
2018-03-14 11:47:35 +01:00
|
|
|
} eRNAOverrideStatus;
|
|
|
|
|
|
2017-12-13 12:46:25 +01:00
|
|
|
bool RNA_struct_override_matches(struct Main *bmain,
|
2017-12-18 10:13:43 +01:00
|
|
|
struct PointerRNA *ptr_local,
|
|
|
|
|
struct PointerRNA *ptr_reference,
|
|
|
|
|
const char *root_path,
|
2020-06-18 17:58:26 +02:00
|
|
|
const size_t root_path_len,
|
2019-06-14 23:16:04 +02:00
|
|
|
struct IDOverrideLibrary *override,
|
2017-12-18 10:13:43 +01:00
|
|
|
const eRNAOverrideMatch flags,
|
|
|
|
|
eRNAOverrideMatchResult *r_report_flags);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2017-11-29 15:31:31 +01:00
|
|
|
bool RNA_struct_override_store(struct Main *bmain,
|
2017-12-13 12:46:25 +01:00
|
|
|
struct PointerRNA *ptr_local,
|
|
|
|
|
struct PointerRNA *ptr_reference,
|
|
|
|
|
PointerRNA *ptr_storage,
|
2019-06-14 23:16:04 +02:00
|
|
|
struct IDOverrideLibrary *override);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2021-03-12 12:31:25 +01:00
|
|
|
typedef enum eRNAOverrideApplyFlag {
|
|
|
|
|
RNA_OVERRIDE_APPLY_FLAG_NOP = 0,
|
|
|
|
|
/**
|
|
|
|
|
* Hack to work around/fix older broken overrides: Do not apply override operations affecting ID
|
|
|
|
|
* pointers properties, unless the destination original value (the one being overridden) is NULL.
|
|
|
|
|
*/
|
|
|
|
|
RNA_OVERRIDE_APPLY_FLAG_IGNORE_ID_POINTERS = 1 << 0,
|
|
|
|
|
} eRNAOverrideApplyFlag;
|
|
|
|
|
|
2017-11-29 15:31:31 +01:00
|
|
|
void RNA_struct_override_apply(struct Main *bmain,
|
2019-08-22 12:19:37 +02:00
|
|
|
struct PointerRNA *ptr_dst,
|
|
|
|
|
struct PointerRNA *ptr_src,
|
2018-05-01 16:59:48 +02:00
|
|
|
struct PointerRNA *ptr_storage,
|
2021-03-12 12:31:25 +01:00
|
|
|
struct IDOverrideLibrary *override,
|
|
|
|
|
const eRNAOverrideApplyFlag flag);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-07-16 11:03:11 +02:00
|
|
|
struct IDOverrideLibraryProperty *RNA_property_override_property_find(struct Main *bmain,
|
|
|
|
|
PointerRNA *ptr,
|
2020-06-30 11:55:11 +02:00
|
|
|
PropertyRNA *prop,
|
|
|
|
|
struct ID **r_owner_id);
|
2020-07-16 11:03:11 +02:00
|
|
|
struct IDOverrideLibraryProperty *RNA_property_override_property_get(struct Main *bmain,
|
|
|
|
|
PointerRNA *ptr,
|
2019-06-14 23:16:04 +02:00
|
|
|
PropertyRNA *prop,
|
|
|
|
|
bool *r_created);
|
2017-11-29 15:31:31 +01:00
|
|
|
|
2019-06-14 23:16:04 +02:00
|
|
|
struct IDOverrideLibraryPropertyOperation *RNA_property_override_property_operation_find(
|
2020-07-16 11:03:11 +02:00
|
|
|
struct Main *bmain,
|
|
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
const int index,
|
|
|
|
|
const bool strict,
|
|
|
|
|
bool *r_strict);
|
2019-06-14 23:16:04 +02:00
|
|
|
struct IDOverrideLibraryPropertyOperation *RNA_property_override_property_operation_get(
|
2020-07-16 11:03:11 +02:00
|
|
|
struct Main *bmain,
|
2017-11-29 15:31:31 +01:00
|
|
|
PointerRNA *ptr,
|
|
|
|
|
PropertyRNA *prop,
|
|
|
|
|
const short operation,
|
|
|
|
|
const int index,
|
|
|
|
|
const bool strict,
|
|
|
|
|
bool *r_strict,
|
|
|
|
|
bool *r_created);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-07-16 11:03:11 +02:00
|
|
|
eRNAOverrideStatus RNA_property_override_library_status(struct Main *bmainm,
|
|
|
|
|
PointerRNA *ptr,
|
2019-06-14 23:16:04 +02:00
|
|
|
PropertyRNA *prop,
|
|
|
|
|
const int index);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-03-01 01:26:02 +11:00
|
|
|
void RNA_struct_state_owner_set(const char *name);
|
|
|
|
|
const char *RNA_struct_state_owner_get(void);
|
|
|
|
|
|
2009-03-14 23:17:55 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2008-12-01 21:23:58 +00:00
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#endif /* __RNA_ACCESS_H__ */
|