def sv_copy(self, other): ''' self: is the new node, other: is the old node by the time this function is called the new node has a new empty n_id a new n_id will be generated as a side effect of _get_curve_node_name ''' new_curve_node_name = self._get_curve_node_name() _ = get_evaluator(node_group_name, new_curve_node_name) old_curve_node_name = other._get_curve_node_name() data = get_rgb_curve(node_group_name, old_curve_node_name) set_rgb_curve(data, new_curve_node_name) self.refresh_node(None)
def save_to_json(self, node_data: dict): '''function to set data for exporting json''' curve_node_name = self._get_curve_node_name() data = get_rgb_curve(node_group_name, curve_node_name) data_json_str = json.dumps(data) node_data['curve_data'] = data_json_str