[Bf-committers] Adding new panels/buttons and properties to the global variable.

Jingyuan Huang jingyuan.huang at gmail.com
Wed Mar 18 07:43:24 CET 2009


Thanks for all the replies. I think I had an alignment issue with 2.48.
I changed my code so that it now compiles with 2.5. (screenshot..:
http://www.cgl.uwaterloo.ca/~j23huang/projects/shlight/images/screenshot-mar17.png)

The new UI changes make it much easier to work with. Good job!
In the future I will post similar questions to irc channel. Thanks again.


Best Wishes
Jingyuan Huang
------------------------------------
Computer Graphics Lab
University of Waterloo




On Fri, Mar 13, 2009 at 6:52 AM, Brecht Van Lommel <brecht at blender.org> wrote:
>
> Hi,
>
> Jingyuan Huang wrote:
>> I tried to add two new fields to RenderData. However, since all the
>> buttons reference to the global variable G and G is initialized by
>> reading .B.blend, I got segfault because the scene data is not loaded
>> properly. I wonder if there is a work around to this. Can I add
>> buttons without touching the main blender data structure and yet still
>> make it work?
>
> I'm not sure why there would be a problem here, adding more members to
> RenderData should work OK. The button drawing code may use G.scene->r
> but you shouldn't worry about that. When you add a new member variable
> to RenderData, Blender will initialize it to 0 on load. Also make sure
> you don't have any "makesdna" warnings or errors during the compile
> process, there's some restrictions on alignment.
>
> Some more information in the form of a diff of the DNA header file
> changes and a crash backtrace would be helpful. Or drop by in
> #blendercoders on irc.freenode.net, it's quicker to resolve this kind
> of issue there.
>
> Brecht.
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list