diff options
Diffstat (limited to 'source/blender/makesrna/RNA_access.h')
-rw-r--r-- | source/blender/makesrna/RNA_access.h | 207 |
1 files changed, 156 insertions, 51 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index a026d8e875e..8036f9edaa7 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -39,6 +39,9 @@ extern "C" { struct bContext; struct ID; +struct IDOverrideStatic; +struct IDOverrideStaticProperty; +struct IDOverrideStaticPropertyOperation; struct ListBase; struct Main; struct ReportList; @@ -66,7 +69,7 @@ extern StructRNA RNA_AnimVizMotionPaths; extern StructRNA RNA_AnimVizOnionSkinning; extern StructRNA RNA_AnyType; extern StructRNA RNA_Area; -extern StructRNA RNA_AreaLamp; +extern StructRNA RNA_AreaLight; extern StructRNA RNA_Armature; extern StructRNA RNA_ArmatureModifier; extern StructRNA RNA_ArmatureSensor; @@ -106,6 +109,8 @@ extern StructRNA RNA_ClothCollisionSettings; extern StructRNA RNA_ClothModifier; extern StructRNA RNA_ClothSettings; extern StructRNA RNA_CloudsTexture; +extern StructRNA RNA_Collection; +extern StructRNA RNA_CollectionEngineSettings; extern StructRNA RNA_CollectionProperty; extern StructRNA RNA_CollisionModifier; extern StructRNA RNA_CollisionSensor; @@ -204,12 +209,16 @@ extern StructRNA RNA_CurveMapPoint; extern StructRNA RNA_CurveMapping; extern StructRNA RNA_CurveModifier; extern StructRNA RNA_CurvePoint; +extern StructRNA RNA_Depsgraph; +extern StructRNA RNA_DepsgraphObjectInstance; +extern StructRNA RNA_DepsgraphUpdate; extern StructRNA RNA_DampedTrackConstraint; extern StructRNA RNA_DataTransferModifier; extern StructRNA RNA_DecimateModifier; extern StructRNA RNA_DelaySensor; extern StructRNA RNA_CorrectiveSmoothModifier; extern StructRNA RNA_DisplaceModifier; +extern StructRNA RNA_SceneDisplay; extern StructRNA RNA_DisplaySafeAreas; extern StructRNA RNA_DistortedNoiseTexture; extern StructRNA RNA_DomainFluidSettings; @@ -217,7 +226,6 @@ extern StructRNA RNA_DopeSheet; extern StructRNA RNA_Driver; extern StructRNA RNA_DriverTarget; extern StructRNA RNA_DriverVariable; -extern StructRNA RNA_DupliObject; extern StructRNA RNA_DynamicPaintBrushSettings; extern StructRNA RNA_DynamicPaintCanvasSettings; extern StructRNA RNA_DynamicPaintModifier; @@ -228,11 +236,10 @@ extern StructRNA RNA_EffectSequence; extern StructRNA RNA_EffectorWeights; extern StructRNA RNA_EnumProperty; extern StructRNA RNA_EnumPropertyItem; -extern StructRNA RNA_EnvironmentMap; -extern StructRNA RNA_EnvironmentMapTexture; extern StructRNA RNA_Event; extern StructRNA RNA_ExplodeModifier; extern StructRNA RNA_ExpressionController; +extern StructRNA RNA_FaceMap; extern StructRNA RNA_FCurve; extern StructRNA RNA_FCurveSample; extern StructRNA RNA_FFmpegSettings; @@ -262,31 +269,21 @@ extern StructRNA RNA_FreestyleSettings; extern StructRNA RNA_Function; extern StructRNA RNA_GPencilFrame; extern StructRNA RNA_GPencilLayer; -extern StructRNA RNA_GPencilPalette; -extern StructRNA RNA_GPencilPaletteColor; -extern StructRNA RNA_GPencilBrush; extern StructRNA RNA_GPencilInterpolateSettings; extern StructRNA RNA_GPencilStroke; extern StructRNA RNA_GPencilStrokePoint; extern StructRNA RNA_GPencilSculptSettings; extern StructRNA RNA_GPencilSculptBrush; -extern StructRNA RNA_GameBooleanProperty; -extern StructRNA RNA_GameFloatProperty; -extern StructRNA RNA_GameIntProperty; -extern StructRNA RNA_GameObjectSettings; -extern StructRNA RNA_GameProperty; -extern StructRNA RNA_GameSoftBodySettings; -extern StructRNA RNA_GameStringProperty; -extern StructRNA RNA_GameTimerProperty; extern StructRNA RNA_GaussianBlurSequence; extern StructRNA RNA_GlowSequence; extern StructRNA RNA_GreasePencil; -extern StructRNA RNA_Group; extern StructRNA RNA_Header; -extern StructRNA RNA_HemiLamp; +extern StructRNA RNA_HemiLight; extern StructRNA RNA_Histogram; extern StructRNA RNA_HookModifier; extern StructRNA RNA_ID; +extern StructRNA RNA_IDOverrideStatic; +extern StructRNA RNA_IDOverrideStaticProperty; extern StructRNA RNA_IKParam; extern StructRNA RNA_Image; extern StructRNA RNA_ImageFormatSettings; @@ -312,14 +309,15 @@ extern StructRNA RNA_KeyingSetInfo; extern StructRNA RNA_KeyingSetPath; extern StructRNA RNA_KeyingSetsAll; extern StructRNA RNA_KinematicConstraint; -extern StructRNA RNA_Lamp; -extern StructRNA RNA_LampSkySettings; -extern StructRNA RNA_LampTextureSlot; +extern StructRNA RNA_Light; +extern StructRNA RNA_LightSkySettings; +extern StructRNA RNA_LightTextureSlot; extern StructRNA RNA_LaplacianDeformModifier; extern StructRNA RNA_LaplacianSmoothModifier; extern StructRNA RNA_Lattice; extern StructRNA RNA_LatticeModifier; extern StructRNA RNA_LatticePoint; +extern StructRNA RNA_LayerCollection; extern StructRNA RNA_Library; extern StructRNA RNA_LimitDistanceConstraint; extern StructRNA RNA_LimitLocationConstraint; @@ -373,19 +371,14 @@ extern StructRNA RNA_LineStyleThicknessModifier_Tangent; extern StructRNA RNA_LockedTrackConstraint; extern StructRNA RNA_Macro; extern StructRNA RNA_MagicTexture; +extern StructRNA RNA_Gizmo; +extern StructRNA RNA_GizmoProperties; extern StructRNA RNA_MarbleTexture; extern StructRNA RNA_MaskModifier; extern StructRNA RNA_MaskSequence; extern StructRNA RNA_Material; -extern StructRNA RNA_MaterialHalo; -extern StructRNA RNA_MaterialPhysics; extern StructRNA RNA_MaterialRaytraceMirror; -extern StructRNA RNA_MaterialRaytraceTransparency; extern StructRNA RNA_MaterialSlot; -extern StructRNA RNA_MaterialStrand; -extern StructRNA RNA_MaterialSubsurfaceScattering; -extern StructRNA RNA_MaterialTextureSlot; -extern StructRNA RNA_MaterialVolume; extern StructRNA RNA_Mask; extern StructRNA RNA_MaskLayer; extern StructRNA RNA_Menu; @@ -446,6 +439,7 @@ extern StructRNA RNA_NoiseTexture; extern StructRNA RNA_NorController; extern StructRNA RNA_Object; extern StructRNA RNA_ObjectBase; +extern StructRNA RNA_ObjectDisplay; extern StructRNA RNA_ObstacleFluidSettings; extern StructRNA RNA_OceanModifier; extern StructRNA RNA_OceanTexData; @@ -479,12 +473,11 @@ extern StructRNA RNA_ParticleSystemModifier; extern StructRNA RNA_ParticleTarget; extern StructRNA RNA_PivotConstraint; extern StructRNA RNA_PointCache; -extern StructRNA RNA_PointDensity; -extern StructRNA RNA_PointDensityTexture; -extern StructRNA RNA_PointLamp; +extern StructRNA RNA_PointLight; extern StructRNA RNA_PointerProperty; extern StructRNA RNA_Pose; extern StructRNA RNA_PoseBone; +extern StructRNA RNA_LightProbe; extern StructRNA RNA_Property; extern StructRNA RNA_PropertyGroup; extern StructRNA RNA_PropertyGroupItem; @@ -500,15 +493,17 @@ extern StructRNA RNA_RenderLayer; extern StructRNA RNA_RenderPass; extern StructRNA RNA_RenderResult; extern StructRNA RNA_RenderSettings; +extern StructRNA RNA_RenderEngineSettings; +extern StructRNA RNA_RenderEngineSettingsClay; extern StructRNA RNA_RigidBodyWorld; extern StructRNA RNA_RigidBodyObject; extern StructRNA RNA_RigidBodyJointConstraint; extern StructRNA RNA_SPHFluidSettings; extern StructRNA RNA_Scene; -extern StructRNA RNA_SceneGameData; +extern StructRNA RNA_SceneEEVEE; +extern StructRNA RNA_SceneObjects; extern StructRNA RNA_SceneRenderLayer; extern StructRNA RNA_SceneSequence; -extern StructRNA RNA_SceneObjects; extern StructRNA RNA_Scopes; extern StructRNA RNA_Screen; extern StructRNA RNA_ScrewModifier; @@ -531,7 +526,7 @@ extern StructRNA RNA_ShaderNodeGeometry; extern StructRNA RNA_ShaderNodeHueSaturation; extern StructRNA RNA_ShaderNodeIESLight; extern StructRNA RNA_ShaderNodeInvert; -extern StructRNA RNA_ShaderNodeLampData; +extern StructRNA RNA_ShaderNodeLightData; extern StructRNA RNA_ShaderNodeMapping; extern StructRNA RNA_ShaderNodeMaterial; extern StructRNA RNA_ShaderNodeMath; @@ -576,14 +571,12 @@ extern StructRNA RNA_SpaceFileBrowser; extern StructRNA RNA_SpaceGraphEditor; extern StructRNA RNA_SpaceImageEditor; extern StructRNA RNA_SpaceInfo; -extern StructRNA RNA_SpaceLogicEditor; extern StructRNA RNA_SpaceNLA; extern StructRNA RNA_SpaceNodeEditor; extern StructRNA RNA_SpaceOutliner; extern StructRNA RNA_SpaceProperties; extern StructRNA RNA_SpaceSequenceEditor; extern StructRNA RNA_SpaceTextEditor; -extern StructRNA RNA_SpaceTimeline; extern StructRNA RNA_SpaceUVEditor; extern StructRNA RNA_SpaceUserPreferences; extern StructRNA RNA_SpaceView3D; @@ -592,17 +585,43 @@ extern StructRNA RNA_Speaker; extern StructRNA RNA_SpeedControlSequence; extern StructRNA RNA_Spline; extern StructRNA RNA_SplineIKConstraint; -extern StructRNA RNA_SpotLamp; +extern StructRNA RNA_SpotLight; extern StructRNA RNA_Stereo3dDisplay; extern StructRNA RNA_StretchToConstraint; extern StructRNA RNA_StringProperty; extern StructRNA RNA_Struct; extern StructRNA RNA_StucciTexture; +extern StructRNA RNA_StudioLight; extern StructRNA RNA_SubsurfModifier; -extern StructRNA RNA_SunLamp; +extern StructRNA RNA_SunLight; extern StructRNA RNA_SurfaceCurve; extern StructRNA RNA_SurfaceDeformModifier; extern StructRNA RNA_SurfaceModifier; +extern StructRNA RNA_GpencilModifier; +extern StructRNA RNA_BuildGpencilModifier; +extern StructRNA RNA_NoiseGpencilModifier; +extern StructRNA RNA_SubdivGpencilModifier; +extern StructRNA RNA_SimplifyGpencilModifier; +extern StructRNA RNA_ThickGpencilModifier; +extern StructRNA RNA_TintGpencilModifier; +extern StructRNA RNA_ColorGpencilModifier; +extern StructRNA RNA_InstanceGpencilModifier; +extern StructRNA RNA_DupliGpencilModifier; +extern StructRNA RNA_OpacityGpencilModifier; +extern StructRNA RNA_LatticeGpencilModifier; +extern StructRNA RNA_MirrorGpencilModifier; +extern StructRNA RNA_SmoothGpencilModifier; +extern StructRNA RNA_HookGpencilModifier; +extern StructRNA RNA_OffsetGpencilModifier; +extern StructRNA RNA_ShaderFx; +extern StructRNA RNA_ShaderFxBlur; +extern StructRNA RNA_ShaderFxColorize; +extern StructRNA RNA_ShaderFxFlip; +extern StructRNA RNA_ShaderFxLight; +extern StructRNA RNA_ShaderFxPixel; +extern StructRNA RNA_ShaderFxRim; +extern StructRNA RNA_ShaderFxSwirl; +extern StructRNA RNA_ShaderFxWave; extern StructRNA RNA_TexMapping; extern StructRNA RNA_Text; extern StructRNA RNA_TextBox; @@ -657,7 +676,6 @@ extern StructRNA RNA_ThemeSpaceGradient; extern StructRNA RNA_ThemeSpaceListGeneric; extern StructRNA RNA_ThemeStyle; extern StructRNA RNA_ThemeTextEditor; -extern StructRNA RNA_ThemeTimeline; extern StructRNA RNA_ThemeUserInterface; extern StructRNA RNA_ThemeUserPreferences; extern StructRNA RNA_ThemeView3D; @@ -672,6 +690,7 @@ extern StructRNA RNA_TransformSequence; extern StructRNA RNA_UILayout; extern StructRNA RNA_UIList; extern StructRNA RNA_UIPieMenu; +extern StructRNA RNA_uiPopover; extern StructRNA RNA_UIPopupMenu; extern StructRNA RNA_UVWarpModifier; extern StructRNA RNA_UVProjectModifier; @@ -691,18 +710,22 @@ extern StructRNA RNA_VertexGroup; extern StructRNA RNA_VertexGroupElement; extern StructRNA RNA_VertexPaint; extern StructRNA RNA_VoronoiTexture; -extern StructRNA RNA_VoxelData; -extern StructRNA RNA_VoxelDataTexture; extern StructRNA RNA_WarpModifier; extern StructRNA RNA_WaveModifier; extern StructRNA RNA_VertexWeightEditModifier; extern StructRNA RNA_VertexWeightMixModifier; extern StructRNA RNA_VertexWeightProximityModifier; +extern StructRNA RNA_WeightedNormalModifier; +extern StructRNA RNA_View3DOverlay; +extern StructRNA RNA_View3DShading; +extern StructRNA RNA_ViewLayer; extern StructRNA RNA_Window; extern StructRNA RNA_WindowManager; extern StructRNA RNA_WipeSequence; extern StructRNA RNA_WireframeModifier; extern StructRNA RNA_WoodTexture; +extern StructRNA RNA_WorkSpace; +extern StructRNA RNA_wmOwnerIDs; extern StructRNA RNA_World; extern StructRNA RNA_WorldAmbientOcclusion; extern StructRNA RNA_WorldLighting; @@ -807,6 +830,7 @@ PropertyType RNA_property_type(PropertyRNA *prop); PropertySubType RNA_property_subtype(PropertyRNA *prop); PropertyUnit RNA_property_unit(PropertyRNA *prop); int RNA_property_flag(PropertyRNA *prop); +int RNA_property_override_flag(PropertyRNA *prop); int RNA_property_tags(PropertyRNA *prop); bool RNA_property_builtin(PropertyRNA *prop); void *RNA_property_py_data_get(PropertyRNA *prop); @@ -881,6 +905,10 @@ 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_overridable_get(PointerRNA *ptr, PropertyRNA *prop); +bool RNA_property_overridable_static_set(PointerRNA *ptr, PropertyRNA *prop, const bool is_overridable); +bool RNA_property_overridden(PointerRNA *ptr, PropertyRNA *prop); +bool RNA_property_comparable(PointerRNA *ptr, PropertyRNA *prop); bool RNA_property_path_from_ID_check(PointerRNA *ptr, PropertyRNA *prop); /* slow, use with care */ void RNA_property_update(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop); @@ -972,7 +1000,7 @@ void RNA_property_collection_clear(PointerRNA *ptr, PropertyRNA *prop); bool RNA_property_collection_move(PointerRNA *ptr, PropertyRNA *prop, int key, int pos); /* copy/reset */ -bool RNA_property_copy(PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, int index); +bool RNA_property_copy(struct Main *bmain, PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, int index); bool RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index); /* Path @@ -1002,6 +1030,16 @@ bool RNA_path_resolve_property(PointerRNA *ptr, const char *path, bool RNA_path_resolve_property_full(PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index); +/* path_resolve_property_and_item_pointer() variants ensure that pointer + property both exist, + * and resolve last Pointer value if possible (Pointer prop or item of a Collection prop). */ +bool RNA_path_resolve_property_and_item_pointer( + PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, + PointerRNA *r_item_ptr); + +bool RNA_path_resolve_property_and_item_pointer_full( + PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index, + PointerRNA *r_item_ptr); + typedef struct PropertyElemRNA PropertyElemRNA; struct PropertyElemRNA { PropertyElemRNA *next, *prev; @@ -1224,17 +1262,84 @@ StructRNA *ID_code_to_RNA_type(short idcode); void _RNA_warning(const char *format, ...) ATTR_PRINTF_FORMAT(1, 2); -/* Equals test (skips pointers and collections) - * is_strict false assumes uninitialized properties are equal */ - -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; +/* Equals test. */ + +/* Note: In practice, EQ_STRICT and EQ_COMPARE have same behavior currently, and will yield same result. */ +typedef enum eRNACompareMode { + /* Only care about equality, not full comparison. */ + 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 */ + /* Full comparison. */ + RNA_EQ_COMPARE, +} eRNACompareMode; + +bool RNA_property_equals( + struct Main *bmain, + struct PointerRNA *ptr_a, struct PointerRNA *ptr_b, struct PropertyRNA *prop, eRNACompareMode mode); +bool RNA_struct_equals( + struct Main *bmain, + struct PointerRNA *ptr_a, struct PointerRNA *ptr_b, eRNACompareMode mode); + +/* Override. */ + +/* flags for RNA_struct_override_matches. */ +typedef enum eRNAOverrideMatch { + /* Do not compare properties that are not overridable. */ + RNA_OVERRIDE_COMPARE_IGNORE_NON_OVERRIDABLE = 1 << 0, + /* Do not compare properties that are already overridden. */ + RNA_OVERRIDE_COMPARE_IGNORE_OVERRIDDEN = 1 << 1, + + /* Create new property override if needed and possible. */ + RNA_OVERRIDE_COMPARE_CREATE = 1 << 16, + /* Restore property's value(s) to reference ones if needed and possible. */ + RNA_OVERRIDE_COMPARE_RESTORE = 1 << 17, +} eRNAOverrideMatch; + +typedef enum eRNAOverrideMatchResult { + /* Some new property overrides were created to take into account differences between local and reference. */ + RNA_OVERRIDE_MATCH_RESULT_CREATED = 1 << 0, + /* Some properties were reset to reference values. */ + RNA_OVERRIDE_MATCH_RESULT_RESTORED = 1 << 1, +} eRNAOverrideMatchResult; + +typedef enum eRNAOverrideStatus { + RNA_OVERRIDE_STATUS_OVERRIDABLE = 1 << 0, /* The property is overridable. */ + RNA_OVERRIDE_STATUS_OVERRIDDEN = 1 << 1, /* The property is overridden. */ + RNA_OVERRIDE_STATUS_MANDATORY = 1 << 2, /* Overriding this property is mandatory when creating an override. */ + RNA_OVERRIDE_STATUS_LOCKED = 1 << 3, /* The override status of this property is locked. */ +} eRNAOverrideStatus; + +bool RNA_struct_override_matches( + struct Main *bmain, + struct PointerRNA *ptr_local, struct PointerRNA *ptr_reference, const char *root_path, + struct IDOverrideStatic *override, const eRNAOverrideMatch flags, + eRNAOverrideMatchResult *r_report_flags); + +bool RNA_struct_override_store( + struct Main *bmain, + struct PointerRNA *ptr_local, struct PointerRNA *ptr_reference, PointerRNA *ptr_storage, + struct IDOverrideStatic *override); + +void RNA_struct_override_apply( + struct Main *bmain, + struct PointerRNA *ptr_local, struct PointerRNA *ptr_override, struct PointerRNA *ptr_storage, + struct IDOverrideStatic *override); + +struct IDOverrideStaticProperty *RNA_property_override_property_find(PointerRNA *ptr, PropertyRNA *prop); +struct IDOverrideStaticProperty *RNA_property_override_property_get(PointerRNA *ptr, PropertyRNA *prop, bool *r_created); + +struct IDOverrideStaticPropertyOperation *RNA_property_override_property_operation_find( + PointerRNA *ptr, PropertyRNA *prop, const int index, const bool strict, bool *r_strict); +struct IDOverrideStaticPropertyOperation *RNA_property_override_property_operation_get( + PointerRNA *ptr, PropertyRNA *prop, const short operation, const int index, + const bool strict, bool *r_strict, bool *r_created); + +eRNAOverrideStatus RNA_property_static_override_status(PointerRNA *ptr, PropertyRNA *prop, const int index); + +void RNA_struct_state_owner_set(const char *name); +const char *RNA_struct_state_owner_get(void); -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); #ifdef __cplusplus } |