Skip to content

Commit

Permalink
#268 refinement the define of the dict
Browse files Browse the repository at this point in the history
  • Loading branch information
toru-ver4 committed Feb 6, 2025
1 parent 98d1118 commit c33ce04
Showing 1 changed file with 36 additions and 47 deletions.
83 changes: 36 additions & 47 deletions 2025/02_Countdown_V2/create_countdown_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from pathlib import Path
from pprint import pprint
import copy
from collections import OrderedDict

# import third-party libraries
import numpy as np
Expand Down Expand Up @@ -869,52 +868,42 @@ def create_motion_blur_animation_core(comp, c_idx, ppp: FusionParams, tool_pos=(
"Blue1": ppp.motion_blur_text_color,
}

user_control = OrderedDict()
user_control["CircleC"] = {
"ICS_ControlPage": "Controls",
"INPID_PreviewControl": "PointControl",
"LINKID_DataType": "Point",
"LINKS_Name": "CircleCenter",
}
user_control["CircleCenter"] = {
"INPID_PreviewControl": "PointControl",
"LINKID_DataType": "Point",
"ICS_ControlPage": "Controls",
"INPID_InputControl": "OffsetControl",
"LINKS_Name": "CircleCenter",
}
user_control["CircleAngle"] = {
"ICS_ControlPage": "Controls",
"INPID_PreviewControl": "AngleControl",
"INP_SplineType": "Default",
"LINKID_DataType": "Number",
"INPID_InputControl": "SliderControl",
"INP_Integer": False,
"INP_MaxScale": 360,
"LINKS_Name": "CircleAngle",
}
user_control["Radius"] = {
"INP_Integer": False,
"INPID_InputControl": "SliderControl",
"INP_SplineType": "Default",
"PC_ControlID": 0,
"INPID_PreviewControl": "EllipseControl",
"LINKID_DataType": "Number",
"PC_ControlGroup": 3,
"ICS_ControlPage": "Controls",
"LINKS_Name": "Radius",
}

ctrl = {}
ctrl['RENAME2'] = {
'ICD_Width': 0.5,
'INP_Default': 0,
'ICS_ControlPage': "File",
'BTNCS_Execute': " tool:SetAttrs({TOOLS_Name = 'w_' .. tool.Input:GetConnectedOutput():GetTool():GetAttrs()['TOOLS_Name']}) ",
'INPID_InputControl': "ButtonControl",
'LINKID_DataType': "Number",
'LINKS_Name': "Rename2"
}
user_control = dict(
CircleC=dict(
ICS_ControlPage="Controls",
INPID_PreviewControl="PointControl",
LINKID_DataType="Point",
LINKS_Name="CircleCenter",
),
CircleCenter=dict(
INPID_PreviewControl="PointControl",
LINKID_DataType="Point",
ICS_ControlPage="Controls",
INPID_InputControl="OffsetControl",
LINKS_Name="CircleCenter",
),
CircleAngle=dict(
ICS_ControlPage="Controls",
INPID_PreviewControl="AngleControl",
INP_SplineType="Default",
LINKID_DataType="Number",
INPID_InputControl="SliderControl",
INP_Integer=False,
INP_MaxScale=360,
LINKS_Name="CircleAngle",
),
Radius=dict(
INP_Integer=False,
INPID_InputControl="SliderControl",
INP_SplineType="Default",
PC_ControlID=0,
INPID_PreviewControl="EllipseControl",
LINKID_DataType="Number",
PC_ControlGroup=3,
ICS_ControlPage="Controls",
LINKS_Name="Radius",
),
)

transform.UserControls = user_control
transform = transform.Refresh()
Expand Down

0 comments on commit c33ce04

Please sign in to comment.