Pine, unfortuantely, is not recommended. It's usually sappy and many reptiles have bad reactions to living with pine shavings, typically respiratory issues. Now, a branch isn't as bad as lots of mulchy pine shavings but it's one of those things, it's easier to avoid possible problems than to treat them later.
If you have other tree species, then yes, you can use them. Natural branches are fine (live branches that you cut down seem to last better, in my opinion, vs. dead ones on the ground) but just make sure they don't come from a sappy species or something in the pine family. Also, baking pine will make your house smell amazing but will leave your oven a horrible, smokey, sticky mess.