Logo by Pauldelbrot - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. April 16, 2024, 04:45:02 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Setting a parameter in all keyframes at once...  (Read 2744 times)
0 Members and 1 Guest are viewing this topic.
nameinuse2
Alien
***
Posts: 21


WWW
« on: January 13, 2011, 10:40:56 AM »

Here's a little bash/perl script that sets a parameter to the same value across all keyframes at once:

Code:
#!/bin/bash
#
# Quick and dirty script to set a mandelbulber parameter to
# the same value across all keyframe*.fract files in the current
# directory.
#
# Give the parameter name to search for as the first command line
# argument and the new value as the second command line argument.
# Note that replacement only happens if the parameter name is found
# followed by something that vaguely looks like a number, then a
# semicolon, but the replacement value is treated as straight text.
#
# Always make backups and use at your own risk!

if [ "$2" ]; then
perl -p -i -e "s/$1 [-e.0-9]+;/$1 $2;/g;" keyframe*.fract
# find $1 followed by digits, minus signs,
# exponential 'e's, decimal points then a semicolon -
# replace with just $1 $2 then a semicolon.
else
echo "usage: $0 parameter_name value"
echo "example: $0 DE_factor 0.2"
echo " will set DE_factor to 0.2 in all keyframe files."
fi

exit 0

I was getting a bit sick of setting up a bunch of keyframes, then having to go through them one by one after finding a better fog setting, or realising the resolution had been set really low the whole time.  Save this script as something like "setall.sh" in your .mandelbulber/keyframes directory, give it execute permission, and invoke it like

Code:
./setall.sh parameter_name new_value

Then it's all good!  Found the exact most aesthetically pleasing glow intensity at the end of a grueling dive?

Code:
./setall.sh glow_intensity 1.775

Bam!  Forgot you disabled shadows for speed but now you're at keyframe 181?

Code:
./setall.sh shadows_enabled 1

Blammo!

Say no to manual editing!
Logged

bib
Global Moderator
Fractal Senior
******
Posts: 2070


At the borders...


100008697663777 @bib993
WWW
« Reply #1 on: January 13, 2011, 10:47:34 AM »

Say no to manual editing!

Say no to scripting, use Mandelbulb3D!
Just kidding wink
Logged

Between order and disorder reigns a delicious moment. (Paul Valéry)
Buddhi
Fractal Iambus
***
Posts: 895



WWW
« Reply #2 on: January 25, 2011, 07:56:58 PM »

Here's a little bash/perl script that sets a parameter to the same value across all keyframes at once:

Thank you for this useful script. I have to add option like this directly in Mandelbulber, because I know how annoying is when there is needed to change the same parameter for all keyframes.
Logged

Pages: [1]   Go Down
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.153 seconds with 25 queries. (Pretty URLs adds 0.007s, 2q)