Skip to content

Commit

Permalink
databinding
Browse files Browse the repository at this point in the history
Diffs=
75823467d databinding (#7341)

Co-authored-by: hernan <[email protected]>
  • Loading branch information
bodymovin and bodymovin committed Jun 20, 2024
1 parent e1e125a commit 2d4e534
Show file tree
Hide file tree
Showing 148 changed files with 5,193 additions and 307 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7e1b3027d5ea97c7950b8f5951b0b44f33413987
75823467d0c007983e66df245f1e9c27d707728c
5 changes: 5 additions & 0 deletions dev/core_generator/lib/src/property.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Property {
bool isSetOverride = false;
bool isGetOverride = false;
bool isEncoded = false;
bool isBindable = false;
bool isPureVirtual = false;
FieldType? typeRuntime;

Expand Down Expand Up @@ -94,6 +95,10 @@ class Property {
if (rt is String) {
typeRuntime = FieldType.find(rt);
}
dynamic b = data['bindable'];
if (b is bool) {
isBindable = b;
}
dynamic pv = data['pureVirtual'];
if (pv is bool) {
isPureVirtual = pv;
Expand Down
21 changes: 21 additions & 0 deletions dev/defs/artboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,27 @@
"description": "List of selected animations",
"runtime": false,
"coop": false
},
"viewModelId": {
"type": "Id",
"typeRuntime": "uint",
"initialValue": "Core.missingId",
"initialValueRuntime": "-1",
"key": {
"int": 583,
"string": "viewmodelid"
},
"description": "The view model attached to this artboard data context."
},
"viewModelInstanceId": {
"type": "Id",
"initialValue": "Core.missingId",
"key": {
"int": 584,
"string": "viewmodelinstanceid"
},
"description": "A view model instance attached for editing purposes.",
"runtime": false
}
}
}
40 changes: 40 additions & 0 deletions dev/defs/data_bind/data_bind.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "DataBind",
"key": {
"int": 446,
"string": "databind"
},
"extends": "component.json",
"properties": {
"targetId": {
"type": "Id",
"typeRuntime": "uint",
"initialValue": "Core.missingId",
"initialValueRuntime": "-1",
"key": {
"int": 585,
"string": "targetid"
},
"description": "Identifier used to track the object that is targetted."
},
"propertyKey": {
"type": "uint",
"initialValue": "CoreContext.invalidPropertyKey",
"key": {
"int": 586,
"string": "propertykey"
},
"description": "The property that is targeted."
},
"modeValue": {
"type": "uint",
"typeRuntime": "uint",
"initialValue": "0",
"key": {
"int": 587,
"string": "modevalue"
},
"description": "Backing enum value for the binding mode."
}
}
}
21 changes: 21 additions & 0 deletions dev/defs/data_bind/data_bind_context.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "DataBindContext",
"key": {
"int": 447,
"string": "databindcontext"
},
"extends": "data_bind/data_bind.json",
"properties": {
"sourcePathIds": {
"type": "List<Id>",
"typeRuntime": "Bytes",
"encoded": true,
"initialValue": "[]",
"key": {
"int": 588,
"string": "sourcepathids"
},
"description": "Path to the selected property."
}
}
}
11 changes: 11 additions & 0 deletions dev/defs/nested_artboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@
"string": "alignment"
},
"description": "Alignment type for the nested artboard's runtime artboard."
},
"dataBindPathIds": {
"type": "List<Id>",
"typeRuntime": "Bytes",
"encoded": true,
"initialValue": "[]",
"key": {
"int": 580,
"string": "databindpathids"
},
"description": "Path to the selected property."
}
}
}
40 changes: 40 additions & 0 deletions dev/defs/viewmodel/data_enum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "DataEnum",
"key": {
"int": 438,
"string": "dataenum"
},
"properties": {
"order": {
"type": "FractionalIndex",
"initialValue": "FractionalIndex.invalid",
"initialValueRuntime": "0",
"key": {
"int": 570,
"string": "order"
},
"description": "Order value for sorting data enums.",
"runtime": false
},
"splitKeyValues": {
"type": "bool",
"initialValue": "false",
"key": {
"int": 571,
"string": "splitkeyvalues"
},
"description": "Whether the user can edit keys and values separately.",
"runtime": false
},
"name": {
"type": "String",
"initialValue": "''",
"key": {
"int": 572,
"string": "name"
},
"description": "Non-unique identifier, used to give friendly names to enums.",
"runtime": false
}
}
}
48 changes: 48 additions & 0 deletions dev/defs/viewmodel/data_enum_value.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "DataEnumValue",
"key": {
"int": 445,
"string": "dataenumvalue"
},
"properties": {
"key": {
"type": "String",
"initialValue": "''",
"key": {
"int": 578,
"string": "key"
},
"description": "The key of this key value enum pair."
},
"value": {
"type": "String",
"initialValue": "''",
"key": {
"int": 579,
"string": "value"
},
"description": "The value of this key value enum pair."
},
"enumId": {
"type": "Id",
"initialValue": "Core.missingId",
"key": {
"int": 580,
"string": "enumid"
},
"description": "The id of the enum property this value belongs to.",
"runtime": false
},
"order": {
"type": "FractionalIndex",
"initialValue": "FractionalIndex.invalid",
"initialValueRuntime": "0",
"key": {
"int": 581,
"string": "order"
},
"description": "Order value for sorting enum values.",
"runtime": false
}
}
}
32 changes: 32 additions & 0 deletions dev/defs/viewmodel/viewmodel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "ViewModel",
"key": {
"int": 435,
"string": "viewmodel"
},
"extends": "viewmodel/viewmodel_component.json",
"properties": {
"viewModelOrder": {
"type": "FractionalIndex",
"initialValue": "FractionalIndex.invalid",
"initialValueRuntime": "0",
"key": {
"int": 563,
"string": "viewmodelorder"
},
"description": "Order value for sorting View Models.",
"runtime": false
},
"defaultInstanceId": {
"type": "Id",
"typeRuntime": "uint",
"initialValue": "Core.missingId",
"initialValueRuntime": "-1",
"key": {
"int": 564,
"string": "defaultinstanceid"
},
"description": "The default instance attached to the view model."
}
}
}
18 changes: 18 additions & 0 deletions dev/defs/viewmodel/viewmodel_component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "ViewModelComponent",
"key": {
"int": 429,
"string": "viewmodelcomponent"
},
"properties": {
"name": {
"type": "String",
"initialValue": "''",
"key": {
"int": 557,
"string": "name"
},
"description": "Non-unique identifier, used to give friendly names to any view model component."
}
}
}
50 changes: 50 additions & 0 deletions dev/defs/viewmodel/viewmodel_instance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "ViewModelInstance",
"key": {
"int": 437,
"string": "viewmodelinstance"
},
"extends": "component.json",
"properties": {
"viewModelId": {
"type": "Id",
"typeRuntime": "uint",
"initialValue": "Core.missingId",
"initialValueRuntime": "0",
"key": {
"int": 566,
"string": "viewmodelid"
}
},
"x": {
"type": "double",
"initialValue": "0",
"key": {
"int": 567,
"string": "x"
},
"description": "The x coordinate of the stage representation.",
"runtime": false
},
"y": {
"type": "double",
"initialValue": "0",
"key": {
"int": 568,
"string": "y"
},
"description": "The y coordinate of the stage representation.",
"runtime": false
},
"onStage": {
"type": "bool",
"initialValue": "false",
"key": {
"int": 569,
"string": "onstage"
},
"description": "Whether it is visible on stage or not.",
"runtime": false
}
}
}
29 changes: 29 additions & 0 deletions dev/defs/viewmodel/viewmodel_instance_color.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "ViewModelInstanceColor",
"key": {
"int": 426,
"string": "viewmodelinstancecolor"
},
"extends": "viewmodel/viewmodel_instance_value.json",
"properties": {
"propertyValue": {
"type": "Color",
"initialValue": "0xFF1D1D1D",
"key": {
"int": 555,
"string": "propertyvalue"
},
"description": "The color value"
},
"playbackValue": {
"type": "Color",
"initialValue": "0xFF1D1D1D",
"key": {
"int": 556,
"string": "playbackvalue"
},
"runtime": false,
"coop": false
}
}
}
21 changes: 21 additions & 0 deletions dev/defs/viewmodel/viewmodel_instance_enum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "ViewModelInstanceEnum",
"key": {
"int": 432,
"string": "viewmodelinstanceenum"
},
"extends": "viewmodel/viewmodel_instance_value.json",
"properties": {
"propertyValue": {
"type": "Id",
"typeRuntime": "uint",
"initialValue": "Core.missingId",
"initialValueRuntime": "0",
"key": {
"int": 560,
"string": "propertyvalue"
},
"description": "The id of the enum value."
}
}
}
8 changes: 8 additions & 0 deletions dev/defs/viewmodel/viewmodel_instance_list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "ViewModelInstanceList",
"key": {
"int": 441,
"string": "viewmodelinstancelist"
},
"extends": "viewmodel/viewmodel_instance_value.json"
}
Loading

0 comments on commit 2d4e534

Please sign in to comment.