2011-02-17 05:57:18 +00:00
|
|
|
/*
|
2008-10-31 23:50:02 +00:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
|
*
|
|
|
|
|
* 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
|
|
|
*
|
|
|
|
|
* Contributor(s): Blender Foundation (2008).
|
|
|
|
|
*
|
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
*/
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __RNA_ACCESS_H__
|
|
|
|
|
#define __RNA_ACCESS_H__
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2011-02-17 05:57:18 +00:00
|
|
|
/** \file RNA_access.h
|
|
|
|
|
* \ingroup RNA
|
|
|
|
|
*/
|
|
|
|
|
|
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-10-31 23:50:02 +00:00
|
|
|
struct bContext;
|
2008-11-24 15:51:55 +00:00
|
|
|
struct ID;
|
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;
|
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;
|
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;
|
2008-11-30 19:52:21 +00:00
|
|
|
extern StructRNA RNA_Actuator;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_ActuatorSensor;
|
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;
|
|
|
|
|
extern StructRNA RNA_AndController;
|
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;
|
2010-02-10 08:53:08 +00:00
|
|
|
extern StructRNA RNA_AnimVizOnionSkinning;
|
2009-04-07 00:49:39 +00:00
|
|
|
extern StructRNA RNA_AnyType;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_Area;
|
|
|
|
|
extern StructRNA RNA_AreaLamp;
|
2008-12-09 11:29:40 +00:00
|
|
|
extern StructRNA RNA_Armature;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_ArmatureModifier;
|
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_ArmatureSensor;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_ArrayModifier;
|
2009-05-31 01:22:34 +00:00
|
|
|
extern StructRNA RNA_BackgroundImage;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_BevelModifier;
|
2011-11-03 12:28:32 +00:00
|
|
|
extern StructRNA RNA_SplinePoint;
|
2009-11-29 16:42:51 +00:00
|
|
|
extern StructRNA RNA_BezierSplinePoint;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_BlendData;
|
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;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_BooleanModifier;
|
2011-12-01 22:08:42 +00:00
|
|
|
extern StructRNA RNA_BoolProperty;
|
2008-12-01 06:52:18 +00:00
|
|
|
extern StructRNA RNA_Brush;
|
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;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_BuildModifier;
|
2013-01-21 15:41:00 +00:00
|
|
|
extern StructRNA RNA_MeshCacheModifier;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Camera;
|
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;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_CollectionProperty;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_CollisionModifier;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_CollisionSensor;
|
2009-01-02 13:47:33 +00:00
|
|
|
extern StructRNA RNA_CollisionSettings;
|
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_ColorManagedDisplaySettings;
|
|
|
|
|
extern StructRNA RNA_ColorManagedViewSettings;
|
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;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeCrop;
|
|
|
|
|
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;
|
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;
|
2012-01-10 19:08:08 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeDoubleEdgeMask;
|
2009-06-07 13:09:18 +00:00
|
|
|
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;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeMapUV;
|
|
|
|
|
extern StructRNA RNA_CompositorNodeMapValue;
|
2012-11-14 19:53:46 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeMapRange;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeMath;
|
2012-06-04 16:42:58 +00:00
|
|
|
extern StructRNA RNA_CompositorNodeMask;
|
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;
|
|
|
|
|
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;
|
2009-03-19 19:03:38 +00:00
|
|
|
extern StructRNA RNA_Context;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_ControlFluidSettings;
|
2008-12-02 23:45:11 +00:00
|
|
|
extern StructRNA RNA_Controller;
|
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;
|
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;
|
2009-10-30 06:33:40 +00:00
|
|
|
extern StructRNA RNA_DampedTrackConstraint;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_DecimateModifier;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_DelaySensor;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_DisplaceModifier;
|
2009-04-09 20:33:39 +00:00
|
|
|
extern StructRNA RNA_DistortedNoiseTexture;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_DomainFluidSettings;
|
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;
|
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_DupliObject;
|
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-01-03 07:20:11 +00:00
|
|
|
extern StructRNA RNA_EnvironmentMap;
|
2009-04-09 20:33:39 +00:00
|
|
|
extern StructRNA RNA_EnvironmentMapTexture;
|
2009-07-21 14:11:51 +00:00
|
|
|
extern StructRNA RNA_Event;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_ExplodeModifier;
|
2008-12-02 23:45:11 +00:00
|
|
|
extern StructRNA RNA_ExpressionController;
|
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;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_FieldSettings;
|
|
|
|
|
extern StructRNA RNA_FileSelectParams;
|
|
|
|
|
extern StructRNA RNA_FloatProperty;
|
|
|
|
|
extern StructRNA RNA_FloorConstraint;
|
|
|
|
|
extern StructRNA RNA_FluidFluidSettings;
|
|
|
|
|
extern StructRNA RNA_FluidSettings;
|
|
|
|
|
extern StructRNA RNA_FluidSimulationModifier;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_FollowPathConstraint;
|
2010-06-25 22:45:42 +00:00
|
|
|
extern StructRNA RNA_FreestyleLineStyle;
|
|
|
|
|
extern StructRNA RNA_FreestyleLineSet;
|
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;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_GPencilFrame;
|
|
|
|
|
extern StructRNA RNA_GPencilLayer;
|
|
|
|
|
extern StructRNA RNA_GPencilStroke;
|
|
|
|
|
extern StructRNA RNA_GPencilStrokePoint;
|
2008-12-02 01:05:23 +00:00
|
|
|
extern StructRNA RNA_GameBooleanProperty;
|
|
|
|
|
extern StructRNA RNA_GameFloatProperty;
|
|
|
|
|
extern StructRNA RNA_GameIntProperty;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_GameObjectSettings;
|
2008-12-02 23:45:11 +00:00
|
|
|
extern StructRNA RNA_GameProperty;
|
2009-01-02 13:47:33 +00:00
|
|
|
extern StructRNA RNA_GameSoftBodySettings;
|
2008-12-02 01:05:23 +00:00
|
|
|
extern StructRNA RNA_GameStringProperty;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_GameTimerProperty;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_GlowSequence;
|
2009-08-27 06:03:41 +00:00
|
|
|
extern StructRNA RNA_GreasePencil;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Group;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_Header;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_HemiLamp;
|
2010-01-19 01:32:06 +00:00
|
|
|
extern StructRNA RNA_Histogram;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_HookModifier;
|
2008-11-24 15:51:55 +00:00
|
|
|
extern StructRNA RNA_ID;
|
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;
|
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;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_InflowFluidSettings;
|
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-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_JoystickSensor;
|
2008-12-03 21:18:10 +00:00
|
|
|
extern StructRNA RNA_Key;
|
2009-11-29 16:42:51 +00:00
|
|
|
extern StructRNA RNA_KeyConfig;
|
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;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_KeyboardSensor;
|
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;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Lamp;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_LampSkySettings;
|
|
|
|
|
extern StructRNA RNA_LampTextureSlot;
|
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;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_LatticeModifier;
|
2009-01-02 14:48:03 +00:00
|
|
|
extern StructRNA RNA_LatticePoint;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Library;
|
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;
|
|
|
|
|
extern StructRNA RNA_LineStyleAlphaModifier_DistanceFromCamera;
|
|
|
|
|
extern StructRNA RNA_LineStyleAlphaModifier_DistanceFromObject;
|
2011-07-24 23:29:19 +00:00
|
|
|
extern StructRNA RNA_LineStyleAlphaModifier_Material;
|
2010-07-20 17:57:33 +00:00
|
|
|
extern StructRNA RNA_LineStyleColorModifier;
|
|
|
|
|
extern StructRNA RNA_LineStyleColorModifier_AlongStroke;
|
|
|
|
|
extern StructRNA RNA_LineStyleColorModifier_DistanceFromCamera;
|
|
|
|
|
extern StructRNA RNA_LineStyleColorModifier_DistanceFromObject;
|
2011-07-24 23:29:19 +00:00
|
|
|
extern StructRNA RNA_LineStyleColorModifier_Material;
|
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;
|
|
|
|
|
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;
|
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;
|
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;
|
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-01-03 20:20:09 +00:00
|
|
|
extern StructRNA RNA_MaterialHalo;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_MaterialPhysics;
|
2009-01-03 20:20:09 +00:00
|
|
|
extern StructRNA RNA_MaterialRaytraceMirror;
|
|
|
|
|
extern StructRNA RNA_MaterialRaytraceTransparency;
|
2009-06-03 23:22:43 +00:00
|
|
|
extern StructRNA RNA_MaterialSlot;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_MaterialStrand;
|
2009-01-05 05:09:20 +00:00
|
|
|
extern StructRNA RNA_MaterialSubsurfaceScattering;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_MaterialTextureSlot;
|
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_MaterialVolume;
|
2012-06-04 16:42:58 +00:00
|
|
|
extern StructRNA RNA_Mask;
|
|
|
|
|
extern StructRNA RNA_MaskLayer;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_Menu;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Mesh;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_MeshColor;
|
|
|
|
|
extern StructRNA RNA_MeshColorLayer;
|
2011-11-25 13:28:04 +00:00
|
|
|
extern StructRNA RNA_MeshLoopColorLayer;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_MeshDeformModifier;
|
2009-01-02 14:48:03 +00:00
|
|
|
extern StructRNA RNA_MeshEdge;
|
2011-08-31 05:13:21 +00:00
|
|
|
extern StructRNA RNA_MeshPolygon;
|
2012-03-23 00:28:29 +00:00
|
|
|
extern StructRNA RNA_MeshTessFace;
|
2011-08-31 11:21:54 +00:00
|
|
|
extern StructRNA RNA_MeshLoop;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_MeshFloatProperty;
|
|
|
|
|
extern StructRNA RNA_MeshFloatPropertyLayer;
|
|
|
|
|
extern StructRNA RNA_MeshIntProperty;
|
|
|
|
|
extern StructRNA RNA_MeshIntPropertyLayer;
|
2012-05-22 15:18:43 +00:00
|
|
|
extern StructRNA RNA_MeshSkinVertexLayer;
|
|
|
|
|
extern StructRNA RNA_MeshSkinVertex;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_MeshSticky;
|
|
|
|
|
extern StructRNA RNA_MeshStringProperty;
|
|
|
|
|
extern StructRNA RNA_MeshStringPropertyLayer;
|
2009-01-02 14:48:03 +00:00
|
|
|
extern StructRNA RNA_MeshTextureFace;
|
|
|
|
|
extern StructRNA RNA_MeshTextureFaceLayer;
|
2011-11-25 13:28:04 +00:00
|
|
|
extern StructRNA RNA_MeshTexturePoly;
|
|
|
|
|
extern StructRNA RNA_MeshTexturePolyLayer;
|
2009-01-02 14:48:03 +00:00
|
|
|
extern StructRNA RNA_MeshVertex;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_MessageSensor;
|
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;
|
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;
|
2010-02-10 08:53:08 +00:00
|
|
|
extern StructRNA RNA_MouseSensor;
|
|
|
|
|
extern StructRNA RNA_MovieSequence;
|
2012-03-21 18:02:29 +00:00
|
|
|
extern StructRNA RNA_MovieClipSequence;
|
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;
|
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_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;
|
2009-01-06 20:15:23 +00:00
|
|
|
extern StructRNA RNA_MultiresModifier;
|
2009-04-09 20:33:39 +00:00
|
|
|
extern StructRNA RNA_MusgraveTexture;
|
2008-12-02 23:45:11 +00:00
|
|
|
extern StructRNA RNA_NandController;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_NearSensor;
|
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;
|
2012-05-11 08:06:01 +00:00
|
|
|
extern StructRNA RNA_NodeOutputFileSlotFile;
|
|
|
|
|
extern StructRNA RNA_NodeOutputFileSlotLayer;
|
2013-03-18 16:34:57 +00:00
|
|
|
extern StructRNA RNA_NodeInstanceHash;
|
2010-11-14 08:11:58 +00:00
|
|
|
extern StructRNA RNA_NodeLink;
|
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;
|
2009-04-09 20:33:39 +00:00
|
|
|
extern StructRNA RNA_NoiseTexture;
|
2008-12-02 23:45:11 +00:00
|
|
|
extern StructRNA RNA_NorController;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Object;
|
2009-11-11 09:16:53 +00:00
|
|
|
extern StructRNA RNA_ObjectBase;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_ObstacleFluidSettings;
|
2011-11-13 12:17:27 +00:00
|
|
|
extern StructRNA RNA_OceanModifier;
|
|
|
|
|
extern StructRNA RNA_OceanTexData;
|
|
|
|
|
extern StructRNA RNA_OceanTexture;
|
2008-11-24 15:51:55 +00:00
|
|
|
extern StructRNA RNA_Operator;
|
2009-06-05 16:11:35 +00:00
|
|
|
extern StructRNA RNA_OperatorFileListElement;
|
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;
|
2011-10-05 00:19:33 +00:00
|
|
|
extern StructRNA RNA_OperatorMacro;
|
2008-12-02 23:45:11 +00:00
|
|
|
extern StructRNA RNA_OrController;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_OutflowFluidSettings;
|
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;
|
|
|
|
|
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;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_ParticleFluidSettings;
|
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;
|
2009-08-13 05:21:25 +00:00
|
|
|
extern StructRNA RNA_PointDensity;
|
|
|
|
|
extern StructRNA RNA_PointDensityTexture;
|
2009-11-29 16:42:51 +00:00
|
|
|
extern StructRNA RNA_PointLamp;
|
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;
|
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;
|
2008-11-29 22:16:23 +00:00
|
|
|
extern StructRNA RNA_PropertySensor;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_PythonConstraint;
|
2008-12-02 23:45:11 +00:00
|
|
|
extern StructRNA RNA_PythonController;
|
2012-01-13 12:34:41 +00:00
|
|
|
extern StructRNA RNA_QuickTimeSettings;
|
2008-11-29 22:16:23 +00:00
|
|
|
extern StructRNA RNA_RadarSensor;
|
|
|
|
|
extern StructRNA RNA_RandomSensor;
|
|
|
|
|
extern StructRNA RNA_RaySensor;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Region;
|
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;
|
2013-01-23 05:56:22 +00:00
|
|
|
extern StructRNA RNA_RigidBodyWorld;
|
|
|
|
|
extern StructRNA RNA_RigidBodyObject;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_RigidBodyJointConstraint;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_SPHFluidSettings;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_Scene;
|
2009-07-20 20:28:29 +00:00
|
|
|
extern StructRNA RNA_SceneGameData;
|
2009-07-21 14:11:51 +00:00
|
|
|
extern StructRNA RNA_SceneRenderLayer;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_SceneSequence;
|
2011-08-08 08:22:01 +00:00
|
|
|
extern StructRNA RNA_SceneObjects;
|
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;
|
|
|
|
|
extern StructRNA RNA_SequenceCrop;
|
|
|
|
|
extern StructRNA RNA_SequenceEditor;
|
|
|
|
|
extern StructRNA RNA_SequenceElement;
|
|
|
|
|
extern StructRNA RNA_SequenceProxy;
|
|
|
|
|
extern StructRNA RNA_SequenceTransform;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ShaderNode;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeCameraData;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeCombineRGB;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeExtendedMaterial;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeGeometry;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeHueSaturation;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeInvert;
|
2013-11-25 20:58:23 +09:00
|
|
|
extern StructRNA RNA_ShaderNodeLampData;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ShaderNodeMapping;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeMaterial;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeMath;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeMixRGB;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeNormal;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeOutput;
|
2012-11-03 14:32:26 +00:00
|
|
|
extern StructRNA RNA_ShaderNodeScript;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_ShaderNodeRGB;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeRGBCurve;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeRGBToBW;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeSeparateRGB;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeSqueeze;
|
|
|
|
|
extern StructRNA RNA_ShaderNodeTexture;
|
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;
|
2012-05-22 15:29:01 +00:00
|
|
|
extern StructRNA RNA_SkinModifier;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_SmokeCollSettings;
|
|
|
|
|
extern StructRNA RNA_SmokeDomainSettings;
|
|
|
|
|
extern StructRNA RNA_SmokeFlowSettings;
|
2009-07-30 15:00:26 +00:00
|
|
|
extern StructRNA RNA_SmokeModifier;
|
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;
|
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;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_SpaceInfo;
|
|
|
|
|
extern StructRNA RNA_SpaceLogicEditor;
|
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;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_SpaceProperties;
|
2009-06-09 05:39:01 +00:00
|
|
|
extern StructRNA RNA_SpaceSequenceEditor;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_SpaceTextEditor;
|
2009-08-18 12:58:51 +00:00
|
|
|
extern StructRNA RNA_SpaceTimeline;
|
2009-11-29 16:42:51 +00:00
|
|
|
extern StructRNA RNA_SpaceUVEditor;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_SpaceUserPreferences;
|
|
|
|
|
extern StructRNA RNA_SpaceView3D;
|
2011-11-07 12:55:18 +00:00
|
|
|
extern StructRNA RNA_SpaceClipEditor;
|
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;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_SpotLamp;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_StretchToConstraint;
|
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;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_SubsurfModifier;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_SunLamp;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_SurfaceCurve;
|
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;
|
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_ThemeAudioWindow;
|
|
|
|
|
extern StructRNA RNA_ThemeBoneColorSet;
|
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-07-21 14:11:51 +00:00
|
|
|
extern StructRNA RNA_ThemeLogicEditor;
|
2009-01-07 21:05:51 +00:00
|
|
|
extern StructRNA RNA_ThemeNLAEditor;
|
|
|
|
|
extern StructRNA RNA_ThemeNodeEditor;
|
|
|
|
|
extern StructRNA RNA_ThemeOutliner;
|
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_ThemeTimeline;
|
|
|
|
|
extern StructRNA RNA_ThemeUserInterface;
|
|
|
|
|
extern StructRNA RNA_ThemeUserPreferences;
|
|
|
|
|
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;
|
2009-02-24 03:06:23 +00:00
|
|
|
extern StructRNA RNA_TimelineMarker;
|
2011-03-28 04:55:24 +00:00
|
|
|
extern StructRNA RNA_Timer;
|
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;
|
2008-12-15 13:46:50 +00:00
|
|
|
extern StructRNA RNA_TransformSequence;
|
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;
|
2012-12-14 04:07:30 +00:00
|
|
|
extern StructRNA RNA_UVWarpModifier;
|
2011-02-16 02:51:56 +00:00
|
|
|
extern StructRNA RNA_UVProjectModifier;
|
|
|
|
|
extern StructRNA RNA_UVProjector;
|
2009-08-13 07:37:41 +00:00
|
|
|
extern StructRNA RNA_UnitSettings;
|
2008-11-30 15:55:14 +00:00
|
|
|
extern StructRNA RNA_UnknownType;
|
2009-01-02 13:47:33 +00:00
|
|
|
extern StructRNA RNA_UserPreferences;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_UserPreferencesEdit;
|
|
|
|
|
extern StructRNA RNA_UserPreferencesFilePaths;
|
2011-06-24 04:22:27 +00:00
|
|
|
extern StructRNA RNA_UserPreferencesInput;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_UserPreferencesSystem;
|
|
|
|
|
extern StructRNA RNA_UserPreferencesView;
|
2013-12-03 03:14:09 -02:00
|
|
|
extern StructRNA RNA_UserPreferencesWalkNavigation;
|
2009-01-07 21:05:51 +00:00
|
|
|
extern StructRNA RNA_UserSolidLight;
|
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;
|
2009-06-07 13:09:18 +00:00
|
|
|
extern StructRNA RNA_VoronoiTexture;
|
2009-08-13 05:21:25 +00:00
|
|
|
extern StructRNA RNA_VoxelData;
|
|
|
|
|
extern StructRNA RNA_VoxelDataTexture;
|
2011-05-01 15:16:59 +00:00
|
|
|
extern StructRNA RNA_WarpModifier;
|
2008-12-29 17:36:06 +00:00
|
|
|
extern StructRNA RNA_WaveModifier;
|
2012-01-01 16:09:32 +00:00
|
|
|
extern StructRNA RNA_VertexWeightEditModifier;
|
|
|
|
|
extern StructRNA RNA_VertexWeightMixModifier;
|
|
|
|
|
extern StructRNA RNA_VertexWeightProximityModifier;
|
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;
|
2008-11-30 22:48:43 +00:00
|
|
|
extern StructRNA RNA_World;
|
2009-01-05 03:44:19 +00:00
|
|
|
extern StructRNA RNA_WorldAmbientOcclusion;
|
2011-08-18 15:53:30 +00:00
|
|
|
extern StructRNA RNA_WorldLighting;
|
2009-01-10 22:57:33 +00:00
|
|
|
extern StructRNA RNA_WorldMistSettings;
|
|
|
|
|
extern StructRNA RNA_WorldTextureSlot;
|
2008-12-02 23:45:11 +00:00
|
|
|
extern StructRNA RNA_XnorController;
|
|
|
|
|
extern StructRNA RNA_XorController;
|
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);
|
2008-11-14 14:34:19 +00:00
|
|
|
|
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
|
|
|
|
2009-04-19 13:37:59 +00:00
|
|
|
PropertyRNA *RNA_struct_name_property(StructRNA *type);
|
|
|
|
|
PropertyRNA *RNA_struct_iterator_property(StructRNA *type);
|
2009-07-10 04:25:49 +00:00
|
|
|
StructRNA *RNA_struct_base(StructRNA *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);
|
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);
|
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
|
|
|
|
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 */
|
|
|
|
|
|
2009-04-19 13:37:59 +00:00
|
|
|
const char *RNA_property_identifier(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);
|
2009-04-19 13:37:59 +00:00
|
|
|
int RNA_property_flag(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
|
|
|
|
2009-04-19 13:37:59 +00:00
|
|
|
const char *RNA_property_ui_name(PropertyRNA *prop);
|
2013-03-18 16:34:57 +00:00
|
|
|
const char *RNA_property_ui_name_raw(PropertyRNA *prop);
|
2009-04-19 13:37:59 +00:00
|
|
|
const char *RNA_property_ui_description(PropertyRNA *prop);
|
2013-03-18 16:34:57 +00:00
|
|
|
const char *RNA_property_ui_description_raw(PropertyRNA *prop);
|
UI translation from inside Blender UI: first part.
This commit reshapes a bit runtime button info getter, by adding a new uiButGetStrInfo() which accepts a variable number of uiStringInfo parameters, and tries to fill them with the requested strings, for the given button (label, tip, context, RNA identifier, keymap, etc.). Currently used mostly by existing ui_tooltip_create(), and new UI_OT_edittranslation_init operator.
It also adds a few getters (to get RNA i18n context, and current language iso code).
Finally, it adds to C operators needed for the py ui_translation addon:
*UI_OT_edittranslation_init, which gathers requested data and launch the py operator.
*UI_OT_reloadtranslation, which forces a full reload of the whole UI translation (including rechecking the directory containing mo files).
For the first operator to work, it also adds a new user preferences path: i18n_branches_directory, to point to the /branch part of a bf-translation checkout.
2012-07-09 14:25:35 +00:00
|
|
|
const char *RNA_property_translation_context(PropertyRNA *prop);
|
2009-06-16 00:52:21 +00:00
|
|
|
int RNA_property_ui_icon(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);
|
|
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_enum_identifier(EnumPropertyItem *item, const int value, const char **identifier);
|
|
|
|
|
int RNA_enum_bitflag_identifiers(EnumPropertyItem *item, const int value, const char **identifier);
|
|
|
|
|
bool RNA_enum_name(EnumPropertyItem *item, const int value, const char **r_name);
|
|
|
|
|
bool RNA_enum_description(EnumPropertyItem *item, const int value, const char **description);
|
2014-02-09 17:31:02 +11:00
|
|
|
int RNA_enum_from_value(EnumPropertyItem *item, const int value);
|
|
|
|
|
int RNA_enum_from_identifier(EnumPropertyItem *item, const char *identifier);
|
2009-06-21 14:30:59 +00:00
|
|
|
|
2014-02-17 23:28:09 +11:00
|
|
|
void RNA_property_enum_items(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop,
|
|
|
|
|
EnumPropertyItem **item, int *r_totitem, bool *r_free);
|
|
|
|
|
void RNA_property_enum_items_gettexted(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop,
|
|
|
|
|
EnumPropertyItem **r_item, int *r_totitem, bool *r_free);
|
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
|
|
|
void RNA_property_enum_items_gettexted_all(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop,
|
|
|
|
|
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(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **name);
|
2014-02-19 11:30:06 +11:00
|
|
|
bool RNA_property_enum_name_gettexted(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **name);
|
2009-12-07 00:16:57 +00:00
|
|
|
int RNA_property_enum_bitflag_identifiers(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, 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);
|
2010-08-03 06:51:36 +00:00
|
|
|
int 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);
|
|
|
|
|
bool RNA_property_editable_index(PointerRNA *ptr, PropertyRNA *prop, int index);
|
|
|
|
|
bool RNA_property_editable_flag(PointerRNA *ptr, PropertyRNA *prop); /* without lib check, only checks the flag */
|
|
|
|
|
bool RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
bool RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
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
|
|
|
|
== RNA Property Updates get called by Animation System now ==
This fixes bug #26764 and several others like it, where modifier
properties (and others, but most visibly modifiers) would not do
anything when animated or driven, as modifier properties require the
RNA update calls to tag the modifiers to get recalculated.
While just adding a call to RNA_property_update() could have gotten
this working (as per the Campbell's patch attached in the report, and
also my own attempt #25881). However, on production rigs, the
performance cost of this is untenatable (on my own tests, without
these updates, I was getting ~5fps on such a rig, but only 0.9fps or
possibly even worse with the updates added).
Hence, this commit adds a property-update caching system to the RNA
level, which aims to reduce to the number of times that the update
functions end up needing to get called.
While this is much faster than without the caching, I also added an
optimisation for pose bones (which are numerous in production rigs) so
that their property updates are skipped, since they are useless to the
animsys (they only tag the depsgraph for updating). This gets things
moving at a more acceptable framerate.
2011-07-24 04:34:46 +00:00
|
|
|
void RNA_property_update_cache_add(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
void RNA_property_update_cache_flush(struct Main *bmain, struct Scene *scene);
|
|
|
|
|
void RNA_property_update_cache_free(void);
|
|
|
|
|
|
2008-11-14 14:34:19 +00:00
|
|
|
/* Property Data */
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2008-11-24 15:51:55 +00:00
|
|
|
int RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value);
|
2009-02-02 19:57:57 +00:00
|
|
|
void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values);
|
|
|
|
|
int RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index);
|
|
|
|
|
void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *values);
|
|
|
|
|
void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, int value);
|
2009-12-17 10:47:55 +00:00
|
|
|
int RNA_property_boolean_get_default(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
void RNA_property_boolean_get_default_array(PointerRNA *ptr, PropertyRNA *prop, int *values);
|
|
|
|
|
int 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);
|
|
|
|
|
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);
|
|
|
|
|
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);
|
|
|
|
|
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);
|
2011-05-26 16:07:28 +00:00
|
|
|
void *RNA_property_enum_py_data_get(PropertyRNA *prop);
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2009-02-02 19:57:57 +00:00
|
|
|
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop);
|
|
|
|
|
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value);
|
2011-01-11 22:32:18 +00:00
|
|
|
PointerRNA RNA_property_pointer_get_default(PointerRNA *ptr, PropertyRNA *prop);
|
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);
|
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 */
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_property_copy(PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, int index);
|
|
|
|
|
bool RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index);
|
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,
|
2012-06-10 19:59:02 +00:00
|
|
|
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,
|
2012-06-10 19:59:02 +00:00
|
|
|
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(PointerRNA *ptr, const char *path,
|
2014-03-11 14:57:11 +01:00
|
|
|
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(PointerRNA *ptr, const char *path,
|
2014-03-11 14:57:11 +01:00
|
|
|
PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index);
|
2008-11-07 02:58:25 +00:00
|
|
|
|
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);
|
|
|
|
|
|
2009-09-17 10:14:56 +00:00
|
|
|
char *RNA_path_from_ID_to_struct(PointerRNA *ptr);
|
2009-03-25 20:29:01 +00:00
|
|
|
char *RNA_path_from_ID_to_property(PointerRNA *ptr, PropertyRNA *prop);
|
2012-12-18 15:22:06 +00: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);
|
|
|
|
|
|
2012-12-18 15:22:06 +00:00
|
|
|
char *RNA_path_full_ID_py(struct ID *id);
|
|
|
|
|
char *RNA_path_full_struct_py(struct PointerRNA *ptr);
|
|
|
|
|
char *RNA_path_full_property_py(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.
|
|
|
|
|
*
|
|
|
|
|
* There is no support for pointers and collections here yet, these can be
|
|
|
|
|
* added when ID properties support them. */
|
|
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
int RNA_boolean_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_boolean_set(PointerRNA *ptr, const char *name, int value);
|
|
|
|
|
void RNA_boolean_get_array(PointerRNA *ptr, const char *name, int *values);
|
|
|
|
|
void RNA_boolean_set_array(PointerRNA *ptr, const char *name, const int *values);
|
|
|
|
|
|
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);
|
2010-02-25 15:41:46 +00:00
|
|
|
void RNA_enum_set_identifier(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
|
|
|
|
2010-07-26 02:35:43 +00:00
|
|
|
/* lower level functions that don't use a PointerRNA */
|
2013-03-07 02:44:55 +00:00
|
|
|
bool RNA_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *r_value);
|
|
|
|
|
bool RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **r_identifier);
|
|
|
|
|
bool RNA_enum_icon_from_value(EnumPropertyItem *item, int value, int *r_icon);
|
|
|
|
|
bool RNA_enum_name_from_value(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)) \
|
2011-11-05 05:44:52 +00:00
|
|
|
{ \
|
2012-04-15 07:24:14 +00:00
|
|
|
PointerRNA itemptr = rna_macro_iter.ptr;
|
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
|
|
|
|
2011-11-05 05:44:52 +00:00
|
|
|
#define RNA_END \
|
|
|
|
|
} \
|
|
|
|
|
RNA_property_collection_end(&rna_macro_iter); \
|
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
|
|
|
}
|
|
|
|
|
|
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)) \
|
2011-11-05 05:44:52 +00:00
|
|
|
{ \
|
2012-04-15 07:24:14 +00:00
|
|
|
PointerRNA itemptr = rna_macro_iter.ptr;
|
2009-06-24 21:27:10 +00:00
|
|
|
|
2011-11-05 05:44:52 +00:00
|
|
|
#define RNA_PROP_END \
|
|
|
|
|
} \
|
|
|
|
|
RNA_property_collection_end(&rna_macro_iter); \
|
2009-06-24 21:27:10 +00: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( \
|
|
|
|
|
sptr, \
|
|
|
|
|
RNA_struct_iterator_property(sptr->type), \
|
|
|
|
|
&rna_macro_iter); \
|
|
|
|
|
rna_macro_iter.valid; \
|
|
|
|
|
RNA_property_collection_next(&rna_macro_iter)) \
|
2011-11-05 05:44:52 +00:00
|
|
|
{ \
|
2012-04-15 07:24:14 +00:00
|
|
|
PropertyRNA *prop = rna_macro_iter.ptr.data;
|
2009-06-24 21:27:10 +00:00
|
|
|
|
2011-11-05 05:44:52 +00:00
|
|
|
#define RNA_STRUCT_END \
|
|
|
|
|
} \
|
|
|
|
|
RNA_property_collection_end(&rna_macro_iter); \
|
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);
|
|
|
|
|
bool RNA_property_is_idprop(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,
|
2013-11-26 08:59:14 +11:00
|
|
|
const bool skip_optional_value, 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,
|
2013-11-26 08:59:14 +11:00
|
|
|
const bool skip_optional_value, 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 */
|
|
|
|
|
|
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);
|
2009-04-07 00:49:39 +00: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);
|
2009-04-07 00:49:39 +00: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);
|
2009-04-07 00:49:39 +00:00
|
|
|
|
2009-06-07 13:09:18 +00:00
|
|
|
/* ID */
|
|
|
|
|
|
|
|
|
|
short RNA_type_to_ID_code(StructRNA *type);
|
|
|
|
|
StructRNA *ID_code_to_RNA_type(short idcode);
|
|
|
|
|
|
2011-09-09 01:29:53 +00:00
|
|
|
|
2012-11-01 15:56:42 +00:00
|
|
|
#define RNA_POINTER_INVALIDATE(ptr) { \
|
|
|
|
|
/* this is checked for validity */ \
|
|
|
|
|
(ptr)->type = \
|
|
|
|
|
/* should not be needed but prevent bad pointer access, just in case */ \
|
|
|
|
|
(ptr)->id.data = NULL; \
|
|
|
|
|
} (void)0
|
|
|
|
|
|
2011-09-09 01:29:53 +00:00
|
|
|
/* macro which inserts the function name */
|
2012-01-12 16:31:27 +00:00
|
|
|
#if defined __GNUC__ || defined __sun
|
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
|
|
|
|
2013-04-05 00:53:37 +00:00
|
|
|
/* Equals test (skips pointers and collections)
|
|
|
|
|
* is_strict false assumes uninitialized properties are equal */
|
2012-11-20 19:44:20 +00:00
|
|
|
|
2013-09-20 09:10:17 +00:00
|
|
|
typedef enum eRNAEqualsMode {
|
|
|
|
|
RNA_EQ_STRICT, /* set/unset ignored */
|
|
|
|
|
RNA_EQ_UNSET_MATCH_ANY, /* unset property matches anything */
|
|
|
|
|
RNA_EQ_UNSET_MATCH_NONE /* unset property never matches set property */
|
|
|
|
|
} eRNAEqualsMode;
|
|
|
|
|
|
|
|
|
|
bool RNA_property_equals(struct PointerRNA *a, struct PointerRNA *b, struct PropertyRNA *prop, eRNAEqualsMode mode);
|
|
|
|
|
bool RNA_struct_equals(struct PointerRNA *a, struct PointerRNA *b, eRNAEqualsMode mode);
|
2012-11-20 19:44:20 +00:00
|
|
|
|
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__ */
|