o3-2025-04-16· OpenAI
LMArena Human Preference 140K
houdini 에서 이 파이썬 코드의 이름을 뭘로 설정해야 깔끔하고 직관적으로 이해가 될 수 있을지, 영어 3단어 이내로 이름 후보들을 작성해줘 import…
- User
houdini 에서 이 파이썬 코드의 이름을 뭘로 설정해야 깔끔하고 직관적으로 이해가 될 수 있을지, 영어 3단어 이내로 이름 후보들을 작성해줘
import hou
def create_sim_rops_from_filecaches(): """ 선택된 '여러 개'의 filecache 노드를 기반으로 ROP 노드를 생성합니다. - filemethod 파라미터(0=Constructed, 1=Explicit)를 정확히 확인하여 모드를 판별합니다. - Constructed 모드일 때 디렉토리와 파일명을 Houdini 규칙에 따라 완벽하게 조합합니다. - 유효하지 않은 노드는 건너뛰고 계속 진행하며, 콘솔에는 아무것도 출력하지 않습니다. """ # 1. 선택된 노드 가져오기 및 유효성 검사 selected_nodes = hou.selectedNodes()
if not selected_nodes: hou.ui.displayMessage("오류: 노드를 선택해주세요.", severity=hou.severityType.Error) return # 결과 요약을 위한 카운터 초기화 success_count = 0 skipped_count = 0 created_rop_names = [] out_net = hou.node('/out') if not out_net: hou.ui.displayMessage("오류: /out 네트워크를 찾을 수 없습니다.", severity=hou.severityType.Error) return # 2. 선택된 각 노드에 대해 작업 반복 for source_node in selected_nodes: # --- 유효성 검사 --- node_type_name = source_node.type().name() allowed_types = ['filecache', 'filecache::2.0'] if node_type_name not in allowed_types: skipped_count += 1 continue input_nodes = source_node.inputs() if not input_nodes: skipped_count += 1 continue # --- ROP 생성 및 기본 파라미터 설정 --- try: new_rop_name = f"SIM_{source_node.name()}" new_rop = out_net.createNode('geometry', node_name=new_rop_name, run_init_scripts=False) except hou.OperationFailed: new_rop = out_net.createNode('geometry', run_init_scripts=False) new_rop.setName(f"SIM_{source_node.name()}", unique_name=True) new_rop.parm('trange').set(1) for parm_name in ['f1', 'f2', 'f3']: target_parm = new_rop.parm(parm_name) source_parm = source_node.parm(parm_name) if target_parm and source_parm: target_parm.deleteAllKeyframes() target_parm.set(source_parm.eval()) sop_source_node = input_nodes[0] new_rop.parm('soppath').set(sop_source_node.path()) # --- 모드에 따라 Output File 경로 생성 --- raw_file_path = "" filemethod_parm = source_node.parm('filemethod') if filemethod_parm and filemethod_parm.eval() == 0: # --- Constructed 모드 --- basedir = source_node.parm('basedir').unexpandedString() basename = source_node.parm('basename').unexpandedString() extension = source_node.parm('filetype').evalAsString() version_number = 0 if version_parm := source_node.parm('version'): version_number = version_parm.evalAsInt() padding = 4 if padding_parm := source_node.parm('fpadding'): padding = padding_parm.evalAsInt() version_folder_str = "" version_filename_str = "" if version_number > 0: version_folder_str = f"v{version_number}" version_filename_str = f"_{version_folder_str}" frame_str = f"$F{padding}" full_filename = f"{basename}{version_filename_str}.{frame_str}{extension}" dir_components = [basedir, basename] if version_folder_str: dir_components.append(version_folder_str) full_directory_path = "/".join(dir_components) raw_file_path = f"{full_directory_path}/{full_filename}" else: # --- Explicit 모드 --- raw_file_path = source_node.parm('file').unexpandedString() # 경로 설정 new_rop.parm('sopoutput').set(raw_file_path) # 노드 위치 정리 및 카운터 증가 new_rop.moveToGoodPosition() success_count += 1 created_rop_names.append(new_rop.name()) # 5. 최종 결과 요약 메시지 표시 total_selected = len(selected_nodes) summary_message = f"총 {total_selected}개의 노드에 대해 작업 완료.\n\n" \ f"✅ 성공: {success_count}개 ROP 노드 생성됨\n" if created_rop_names: summary_message += f" - {', '.join(created_rop_names)}\n" if skipped_count > 0: summary_message += f"\n❌ 건너뜀: {skipped_count}개 노드" hou.ui.displayMessage(summary_message, title="스크립트 실행 결과")스크립트 실행
create_sim_rops_from_filecaches()
- Assistant
아래 후보들은 모두 3 단어 이내(공백 기준)로, 스크립트의 기능 ‑- “선택한 File Cache 노드들을 기반으로 Simulation ROP을 자동 생성” ‑- 을 직관적으로 드러내도록 짧고 간결하게 짜봤습니다.
- Cache to ROP
- FileCache 2 ROP
- Cache ROP Maker
- Sim ROP Builder
- Auto Sim ROPs
- Generate Sim ROP
- Cache-Driven ROPs
- ROP from Cache
- Sim ROPify
- Cache ROP Convert
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.