Page 1 of 1

NEW ANIMATION / RIGGING FEATURES2

Posted: Fri Aug 24, 2007 7:06 am
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

Posted: Mon Aug 27, 2007 2:05 am
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

Posted: Mon Aug 27, 2007 8:04 am
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.

Posted: Mon Aug 27, 2007 10:49 am
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

Posted: Wed Aug 29, 2007 5:15 am
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

Posted: Wed Aug 29, 2007 7:38 am
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.

Posted: Wed Aug 29, 2007 12:07 pm
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!