[Robotics] Verson Control of .blend files

Campbell Barton ideasman42 at gmail.com
Fri Nov 13 16:44:28 CET 2009


for python its normally best to only have stubs internally and import
external modules, in blender 2.49 the directory that the blend file is
in will automatically be added to the sys.path (as well as dirs of
libs this blend file uses)
So you should always be able to import the python scripts if they are
next to a blend file you use.

to avoid having stubs you can use module execution too. see this post
(includes example blend).
http://blenderartists.org/forum/showpost.php?p=1383303&postcount=15

Having python scripts external is good because you can edit them as
the game runs (if D is pressed) and it gives useful diff's

On Fri, Nov 13, 2009 at 3:57 PM, Gilberto Echeverria
<gilberto.echeverria at laas.fr> wrote:
> We had considered whether to keep external copies of the python scripts.
> Using 'append' to create the scenes this created a problem because it
> required copying the python files to the location of the new scene.
>
> So using 'link' seems to be the better solution. It is also not an ideal
> solution, but it can work for now.
> We were using object Groups to 'append' complext objects like robots.
> But linking groups doesn't seem to work. It is necessary to link all the
> individual objects.
> I also found out that instead of creating an Empty as a way of parenting
> linked objects, it is simpler to duplicate them with Alt-D. This will
> create a copy which can be manipulated normally as any Blender object.
>
> The Blender-aid software seems very promising, we'll look into it.
> Thanks for bringing it to my attention.
>
> Cheers.
> Gilberto
>
>
> On 11/09/2009 11:22 PM, Benoit Bolsee wrote:
>> Production team use library blend files: many small blend containing
>> only 1 item.
>> As you guessed, merging is not possible with blend file, so no concurent
>> access is possible.
>> If you have large script on which concurent access should be possible,
>> my suggestion is that you put them outside the blend file. Blender
>> allows to use external files for scripts. The script file can then
>> support concurent access and merging under SVN.
>>
>> Regarding the name conflict when appending items, you should use link
>> item and not append. This keeps the name. Trouble with linked item is
>> that you cannot parent them but I indicated on this list a way to work
>> around that using Dupligroup instantiation that should give equivalent
>> results.
>>
>> I any case I suggest you have a look at this software:
>>   http://sidedish.atmind.nl/
>>
>> It should be adapted to your situation: it allows to visualize
>> complicated connections between blend files.
>>
>> Regards,
>> Benoit
>>
>>
>>
>>> -----Original Message-----
>>> From:robotics-bounces at blender.org
>>> [mailto:robotics-bounces at blender.org] On Behalf Of Gilberto Echeverria
>>> Sent: lundi 9 novembre 2009 18:37
>>> To:robotics at blender.org
>>> Subject: [Robotics] Verson Control of .blend files
>>>
>>>
>>> Hello everybody,
>>>
>>> We are now a bit further in the development of the
>>> openRobotSimulator on
>>> Blender, working with two developers. We have a fair amount of
>>> components defined, each of them in separate .blend files.
>>> The idea is to be able to store each component separately (sensors,
>>> robotic parts, cameras, etc.) and put them together into a new .blend
>>> file to assemble any particular kind of robot.
>>>
>>> It is at this point that we come to face two problems:
>>>
>>> 1. Maintaining a consistent repository of the .blend files
>>> We are currently using a repository in Launchpad, using
>>> bazaar. This is
>>> now creating a problem, since there doesn't seem to be any
>>> change merger
>>> inside of the .blend files, because they are binary files. So working
>>> concurrently makes change control a problem. This applies to changes
>>> both to the python scripts inside the blender files, as well
>>> as to the
>>> 3D models of the components.
>>> How do the Blender Foundation projects keep track of their files? For
>>> instance for the films and games developed in Blender.
>>>
>>> 2. To create a new robot, we do 'appends' of the component
>>> pieces. For example, append a camera to a robot. If the same
>>> process is repeated, the new objects for the robot and
>>> components get new names like robot.001, camera.001, along with the
>>> scripts and textures associated to them. This creates a lot
>>> of problems
>>> with the python scripts, since they have to guess the new names. Is
>>> there a way to keep things like scripts and materials as
>>> links shared by
>>> several objects?
>>>
>>> I hope my questions are not too confusing. Any help with this
>>> problems
>>> will be greatly appreciated.
>>>
>>> All the best
>>>
>>> Gilberto
>>> _______________________________________________
>>> Robotics mailing list
>>> Robotics at blender.org
>>> http://lists.blender.org/mailman/listinfo/robo>  tics
>>>
>>>
>> _______________________________________________
>> Robotics mailing list
>> Robotics at blender.org
>> http://lists.blender.org/mailman/listinfo/robotics
>>
>
> _______________________________________________
> Robotics mailing list
> Robotics at blender.org
> http://lists.blender.org/mailman/listinfo/robotics
>



-- 
- Campbell


More information about the Robotics mailing list