Skip to content

Commit

Permalink
fix type handling in ops with targeting
Browse files Browse the repository at this point in the history
see #1019
  • Loading branch information
t3kt committed Feb 24, 2023
1 parent 1c34845 commit f2819e8
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/operators/filter/scale.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"meta": {
"opStatus": "default",
"opType": "raytk.operators.filter.scale",
"opVersion": 26
"opVersion": 27
}
}
Binary file modified src/operators/filter/scale.tox
Binary file not shown.
46 changes: 38 additions & 8 deletions src/operators/filter/scale.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
!rop
meta: !meta
opType: raytk.operators.filter.scale
opVersion: '26'
opVersion: '27'
opStatus: default
opDef: !def
enable: !expr
expr: op('..').par.Enable
useRuntimeBypass: true
typeSpec: !ropTypes
Useinputreturntype: !expr
expr: op('definition_1').numRows > 1
coordType: !coordT
Coordtypefloat: true
Coordtypevec2: true
Coordtypevec3: true
contextType: !contextT
Allcontexttype: true
Allcontexttype: !expr
expr: op('targetInfo')[1, 'contextType'] == '*'
Contexttypematerialcontext: !expr
expr: op('targetInfo')[1, 'contextType'] == 'MaterialContext'
returnType: !returnT
Allreturntype: !expr
expr: op('definition_1').numRows > 1
Returntypevec4: true
expr: op('definition_1').numRows > 1 and op('targetInfo')[1, 'returnType']
== '*'
Returntypesdf: !expr
expr: op('definition_1').numRows > 1 and op('targetInfo')[1, 'returnType']
in ('*', 'Sdf')
Returntypevec4: !expr
expr: op('targetInfo')[1, 'returnType'] in ('*', 'vec4')
function: !text
file: src/operators/filter/scale.glsl
name: function
Expand Down Expand Up @@ -73,17 +83,32 @@ inputs:
Coordtypevec2: true
Coordtypevec3: true
contextType: !contextT
Allcontexttype: true
Allcontexttype: !expr
expr: op('targetInfo')[1, 'contextType'] == '*'
Contexttypecontext: true
Contexttypematerialcontext: !expr
expr: op('targetInfo')[1, 'contextType'] == 'MaterialContext'
returnType: !returnT
Allreturntype: true
Allreturntype: !expr
expr: op('targetInfo')[1, 'returnType'] == '*'
Returntypesdf: !expr
expr: op('targetInfo')[1, 'returnType'] in ('*', 'Sdf')
Returntypefloat: !expr
expr: op('targetInfo')[1, 'returnType'] == '*'
Returntypevec4: !expr
expr: op('targetInfo')[1, 'returnType'] in ('*', 'vec4')
- !input
Localalias: scaleField
coordType: !coordT
Coordtypefloat: true
Coordtypevec2: true
Coordtypevec3: true
contextType: !contextT
Allcontexttype: true
Allcontexttype: !expr
expr: op('targetInfo')[1, 'contextType'] == '*'
Contexttypecontext: true
Contexttypematerialcontext: !expr
expr: op('targetInfo')[1, 'contextType'] == 'MaterialContext'
returnType: !returnT
Returntypesdf: true
Returntypefloat: true
Expand All @@ -92,10 +117,15 @@ inputs:
- !input
Localalias: pivotField
coordType: !coordT
Coordtypefloat: true
Coordtypevec2: true
Coordtypevec3: true
contextType: !contextT
Allcontexttype: true
Allcontexttype: !expr
expr: op('targetInfo')[1, 'contextType'] == '*'
Contexttypecontext: true
Contexttypematerialcontext: !expr
expr: op('targetInfo')[1, 'contextType'] == 'MaterialContext'
returnType: !returnT
Returntypevec4: true
elements:
Expand Down
2 changes: 1 addition & 1 deletion src/operators/filter/transform.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"meta": {
"opStatus": "default",
"opType": "raytk.operators.filter.transform",
"opVersion": 15
"opVersion": 16
}
}
Binary file modified src/operators/filter/transform.tox
Binary file not shown.
32 changes: 26 additions & 6 deletions src/operators/filter/transform.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
!rop
meta: !meta
opType: raytk.operators.filter.transform
opVersion: '15'
opVersion: '16'
opStatus: default
opDef: !def
enable: !expr
expr: op('..').par.Enable
useRuntimeBypass: true
typeSpec: !ropTypes
Useinputreturntype: !expr
expr: op('definition_1').numRows > 1
coordType: !coordT
Coordtypevec2: true
Coordtypevec3: true
contextType: !contextT
Allcontexttype: true
Allcontexttype: !expr
expr: op('targetInfo')[1, 'contextType'] == '*'
Contexttypematerialcontext: !expr
expr: op('targetInfo')[1, 'contextType'] == 'MaterialContext'
returnType: !returnT
Allreturntype: !expr
expr: op('definition_1').numRows > 1
Returntypevec4: true
expr: op('definition_1').numRows > 1 and op('targetInfo')[1, 'returnType']
== '*'
Returntypesdf: !expr
expr: op('definition_1').numRows > 1 and op('targetInfo')[1, 'returnType']
in ('*', 'Sdf')
Returntypevec4: !expr
expr: op('targetInfo')[1, 'returnType'] in ('*', 'vec4')
function: !text
file: src/operators/filter/transform.glsl
name: function_template
Expand Down Expand Up @@ -164,9 +174,19 @@ inputs:
Coordtypevec2: true
Coordtypevec3: true
contextType: !contextT
Allcontexttype: true
Allcontexttype: !expr
expr: op('targetInfo')[1, 'contextType'] == '*'
Contexttypematerialcontext: !expr
expr: op('targetInfo')[1, 'contextType'] == 'MaterialContext'
returnType: !returnT
Allreturntype: true
Allreturntype: !expr
expr: op('targetInfo')[1, 'returnType'] == '*'
Returntypesdf: !expr
expr: op('targetInfo')[1, 'returnType'] in ('*', 'Sdf')
Returntypefloat: !expr
expr: op('targetInfo')[1, 'returnType'] == '*'
Returntypevec4: !expr
expr: op('targetInfo')[1, 'returnType'] in ('*', 'vec4')
elements:
- !opElement
name: transformTarget
Expand Down

0 comments on commit f2819e8

Please sign in to comment.