NEW ANIMATION / RIGGING FEATURES2

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
ace1
Posts: 0
Joined: Mon Feb 19, 2007 4:21 am
Location: Miami,Florida
Contact:

NEW ANIMATION / RIGGING FEATURES2

Post by ace1 »

For anyone that downloaded the new empty types patch and found that it didn't work correctly, a fixed patch now exists. It works fine now. A test .blend file has been also provided.
Now, on to the bone pose slider project for Blender. :D

Again, thanks for the coding help that the community provided. :D :D
DIGIMATOR

ace1
Posts: 0
Joined: Mon Feb 19, 2007 4:21 am
Location: Miami,Florida
Contact:

Post by ace1 »

uiNewPanel(curarea, block, "Shapes", "Editing", 640, 0, 318, 204)==0) return;

Can anyone define the parameters fot the UI functions?
Is there any references?
Not just the above function but the UI function parameters as a whole.
I think it would help to publish them because it would help other future developers understand the codebase better.

Thanks in advance :D :D :D
DIGIMATOR

BeBraw
Posts: 0
Joined: Sun Feb 19, 2006 4:14 pm

Post by BeBraw »

Take a look at <some directory>/blender (branch)/doc/interface_API.txt. Generally it is easiest to figure out how something works by first seeking wanted feature and then seeing how it's done.

ace1
Posts: 0
Joined: Mon Feb 19, 2007 4:21 am
Location: Miami,Florida
Contact:

Post by ace1 »

Thanks! I also see that the header files are somewhat descriptive themselves.Also reading the definitions in interface.c made it more clearer also.Thanks for helping me maneuver. :D
DIGIMATOR

ace1
Posts: 0
Joined: Mon Feb 19, 2007 4:21 am
Location: Miami,Florida
Contact:

Post by ace1 »

uiDefBut(block, BUT,ADD_SLIDER, "Add Slider" , 10, 180, 150, 20, NULL, 0.0, 0.0, 0, 0, "Add new bone control sliders");


This is a panel button function.Can ayone tell me how to get the numrical value out of this button after it has been clicked?
I need to obtain the value for a flag in an if() statement.

The project I'm working on is UI heavy and I'm new to the UI code.
Any other tips concerning UI would be helpful as well.

Thanks in advance :D :D :D
DIGIMATOR

BeBraw
Posts: 0
Joined: Sun Feb 19, 2006 4:14 pm

Post by BeBraw »

uiDefBut(block, BUT,ADD_SLIDER, "Add Slider" , 10, 180, 150, 20, NULL, 0.0, 0.0, 0, 0, "Add new bone control sliders");


This is a panel button function.Can ayone tell me how to get the numrical value out of this button after it has been clicked?
I need to obtain the value for a flag in an if() statement.
There are two ways to handle this. You could add a callback function (search for uiButSetFunc ) or you could handle ADD_SLIDER case in event handler of the panel (check how vertex groups are added). Event handler functions are normally called as do_foo(unsigned short event).

You can set the flag in either of these cases. If you need to do more than just to set the flag, either of these will do just fine although I would prefer latter option (case ADD_SLIDER: <do stuff>; break; in event handler) first and callback after. Both have their uses depending on situation.

ace1
Posts: 0
Joined: Mon Feb 19, 2007 4:21 am
Location: Miami,Florida
Contact:

Post by ace1 »

Thanks! :D :D :D
You don't know how much i sweated over this problem yesterday!
I just could'nt figure it out! But, I'm not finished yet!
Again, thanks!
DIGIMATOR

Post Reply