Transitions, DirectDialog, and DirectRadioButton: changes

Ah, this sounds like a nice improvement for elegance and cleanness of the code.

I might be able to help with the last few questions.

I don’t know if this is the cleanest way to create a patch (I’m a git user so I’m not that familiar with creating patches for projects that use other version control systems), but here’s the procedure I have used.

To begin with, you’ll need two copies of the Panda source tree: your modified one, and the original one you want to patch against. It makes things easier to have both as subdirectories under the same parent directory, for example, ~/Documents/panda/panda3d-1.8.1-original and ~/Documents/panda/panda3d-1.8.1-mycustomversion.

The next step is to diff the trees to produce the actual patch. If you use Linux, there is a command-line diff utility that comes with the system (see below for usage).

But before running a diff, it is useful to specify excludes, i.e. filename patterns that won’t be considered for the diff. This is useful to avoid the need to clean the trees before generating the patch, as you can simply exclude the “built” directory and any temporary files from consideration.

You’ll need to do this step only once. Create a file ~/Documents/panda/myexcludes.txt, and put the following lines into it:

built
targetroot
*.pyc
*.deb
*~
*\(*copy\)*

Note that the patterns match both directories and files. Observe that parentheses in file names need to be escaped by prefixing them with “”.

Most of the entries are pretty much self-explanatory; the second-to-last entry excludes the previous (“backup”) version of a file, as kept by many text editors, and the last entry excludes any copies of files created by Nautilus when you Ctrl+C a file and Ctrl+V it while still in the same directory (assuming the OS language is set to English). (I sometimes use this to store temporary intermediate versions, when I’m about to possibly break something.)

If you’re using another OS, be sure to add any filename patterns that correspond to generated files that are not supposed to be part of a clean source tree.

Now that you have the excludes set up, you can run the actual diff, telling it to compare the trees excluding any file or directory names matching those defined in myexcludes.txt. In a terminal, cd ~/Documents/panda and then:

diff -Naur --exclude-from=myexcludes.txt panda3d-1.8.1-original panda3d-1.8.1-mycustomversion >temp.patch

Once the diff completes (it may take a while), open temp.patch in a text editor and examine your changes. If there are accidental changes that shouldn’t be there, modify your custom source to undo those, and re-run the diff.

Once the patch looks good, rename it and send it in. :slight_smile:

(There may exist GUI tools to create diffs, but I’m not familiar with those, as I’ve just used the command-line utility myself.)

As for how to send the patches, I’ve used the bug tracker to create a bug (providing a link in the description to the relevant forum thread), and attached the patch to that. You’ll need an Ubuntu One account, though.