Jump to content

Search the Community

Showing results for tags 'custom save pycustom save'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Lounge/General chat
    • Education
    • Jobs
    • Marketplace
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering + Solaris!
    • Compositing
    • Games
    • Tools (HDA's etc.)
  • Coders Corner
    • HDK : Houdini Development Kit
    • Scripting
    • Shaders
  • Art and Challenges
    • Finished Work
    • Work in Progress
    • VFX Challenge
    • Effects Challenge Archive
  • Systems and Other Applications
    • Other 3d Packages
    • Operating Systems
    • Hardware
    • Pipeline
  • od|force
    • Feedback, Suggestions, Bugs

Product Groups

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Name


Location


Interests

Found 1 result

  1. Hi, I am a very beginner of coding and looking for a custom save shell by python. This time, especially I'd like to ask for how to replace ".comment." part. Example file is "fx_dest_vocity_v051.04.comment.hip" and a procedure is : 1 - click shelf dock 2 - show a popUpWindow and type a comment 3 - click the popUpWindow, close it, and a script replaces "comment" part and new file name is saved, for example, "fx_dest_vocity_v051.04.vel2xfaster.hip" my best guess is; fileName = hou.hipFile.basename() ## for instance, file name is "fx_dest_vocity_v051.04.comment.hip" hou.ui.displayMessage("type comments", variable ) ## save comment hou.ui.displayMessage.close result = re.search( "([0-9]{2})\.???????\.hip", fileName ) ## get comment part newFileName = fileName.replace( result.group(1), variable ) hou.hipFile.save(newFileName) ## new file name "fx_dest_vocity_v051.04.vel2xfaster.hip" I know it's so many broken lines, so if someone helps to rewrite it, it would be great, thanks!
×
×
  • Create New...